/* ========================================
   Focktrix Internal Framework CSS
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-bg: #f0f0f0;
    --color-surface: #fff;
    --color-text: #1a1a1a;
    --color-text-muted: #666;
    --color-primary: #2CBBBB;
    --color-primary-hover: #34CACA;
    --color-border: #dee2e6;
    --color-dark: #333;
    --color-dark-surface: #444;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --max-width: 1200px;
    --font-base: 16px;
    --font-mono: 'Consolas', 'Monaco', monospace;
    --transition: 0.2s ease;
}

/* --- Reset (minimal, non-conflicting) --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-base); -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; margin-bottom: 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* --- Layout utilities --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* --- Card / Surface --- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-ghost:hover { background: var(--color-bg); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.25rem; font-weight: 500; font-size: 0.875rem; }
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color var(--transition);
    background: var(--color-surface);
}
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(44,187,187,0.15); }
textarea.form-input { min-height: 100px; resize: vertical; }
select.form-input { appearance: auto; }

/* --- Table --- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table th { font-weight: 600; font-size: 0.875rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:hover { background: rgba(0,0,0,0.02); }

/* --- Badge --- */
.badge { display: inline-block; padding: 0.2em 0.6em; font-size: 0.75rem; font-weight: 600; border-radius: 1rem; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }

/* --- Alert --- */
.alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .flex-between { flex-direction: column; gap: 0.5rem; }
}
