:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
.landing {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: white; padding: 2rem 1rem;
}
.auth-box {
    width: 100%; max-width: 440px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px; padding: 2rem; text-align: center;
    backdrop-filter: blur(10px);
}
.logo-icon { font-size: 3.2rem; margin-bottom: 0.5rem; }
.auth-box h1 {
    font-size: 1.9rem; font-weight: 800; margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tagline { font-size: 0.95rem; color: #94a3b8; margin-bottom: 1.5rem; }
.google-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    width: 100%; padding: 0.85rem 1.5rem; background: white; color: #1e293b;
    border: none; border-radius: 10px; font-size: 1rem; font-weight: 700;
    font-family: inherit; cursor: pointer; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow-lg);
}
.google-btn:hover { transform: translateY(-2px); }
.divider {
    display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0;
    color: #94a3b8; font-size: 0.85rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.15); }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab-btn {
    flex: 1; padding: 0.55rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    background: transparent; color: #cbd5e1; font-family: inherit; font-weight: 600; cursor: pointer;
}
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.form-group { margin-bottom: 0.75rem; text-align: right; }
.form-input {
    width: 100%; padding: 0.7rem 0.9rem; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2); background: rgba(15,23,42,0.6);
    color: white; font-family: inherit; font-size: 0.95rem;
}
.form-input::placeholder { color: #64748b; }
.submit-btn {
    width: 100%; padding: 0.8rem; border: none; border-radius: 10px;
    background: var(--primary); color: white; font-family: inherit;
    font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 0.25rem;
}
.submit-btn:hover { background: var(--primary-dark); }
.error-msg {
    margin-top: 1rem; padding: 0.7rem 1rem;
    background: rgba(220,38,38,0.2); border: 1px solid rgba(220,38,38,0.4);
    color: #fca5a5; border-radius: 8px; font-size: 0.9rem;
}
.landing-footer { margin-top: 2rem; color: #64748b; font-size: 0.85rem; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1.5rem; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 100;
}
.topbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.topbar-user { display: flex; align-items: center; gap: 0.75rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--primary-light); display:flex; align-items:center; justify-content:center; font-size:1.5rem; }
.dashboard {
    max-width: 960px; margin: 1.5rem auto; padding: 0 1.25rem;
    display: flex; flex-direction: column; gap: 1.25rem;
}
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); background: #fafbfc;
}
.card-header h2 { font-size: 1.05rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.user-info { display: flex; align-items: center; gap: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.input-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.field {
    padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 0.95rem;
}
.models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-top: 1rem; }
.model-card {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.model-card.model-active { border-color: var(--success); background: var(--success-light); }
.model-name { font-weight: 700; font-size: 1rem; }
.model-id { font-size: 0.85rem; color: var(--text-muted); font-family: monospace; }
.status-badge {
    display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem;
}
.status-badge.success { background: var(--success-light); color: var(--success); }
.status-badge.warning { background: var(--warning-light); color: var(--warning); }
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; width: fit-content; }
.badge-success { background: var(--success); color: white; }
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.1rem;
    border: 2px solid transparent; border-radius: 8px; font-family: inherit;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }