/* smartLAB — Dashboard Common Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Cairo', sans-serif;
    background: #0a0e1a; color: #e2e8f0; min-height: 100vh;
    padding-top: 64px; color-scheme: dark;
}
:root {
    --accent-blue: #3b82f6; --accent-gold: #fbbf24; --accent-amber: #f59e0b;
    --accent-emerald: #10b981; --accent-red: #f87171; --accent-cyan: #06b6d4;
    --accent-purple: #a855f7; --accent-orange: #fb923c;
    --border-glass: rgba(255,255,255,0.06);
    --text-primary: #f1f5f9; --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-sm: 6px; --radius-md: 10px;
}

/* ========== Header ========== */
.app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: rgba(10,14,26,0.92); -webkit-backdrop-filter:
backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 32px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.app-header .header-left { display: flex; align-items: center; gap: 16px; }
.app-header .header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-header .header-logo img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 20px rgba(59,130,246,0.25); }
.app-header .header-logo span { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.app-header .header-logo span span { color: var(--accent-gold); }
.app-header .header-nav { display: flex; align-items: center; gap: 2px; margin: 0 12px; }
.app-header .header-nav a { color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s; }
.app-header .header-nav a:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.header-right { display: flex; align-items: center; gap: 10px; }
.lang-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); color: var(--text-secondary); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-transform: uppercase; }
.lang-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.lang-btn .lang-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-emerald); display: inline-block; }
body.rtl { direction: rtl; text-align: right; }
body.rtl .app-header .header-left { flex-direction: row-reverse; }
body.rtl .app-header .header-right { flex-direction: row-reverse; }
.btn-signout { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: transparent; border: 1px solid rgba(239,68,68,0.25); border-radius: var(--radius-sm); color: var(--accent-red); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-signout:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.4); }
.btn-signout svg { width: 15px; height: 15px; }

/* ========== Footer ========== */
.app-footer {
    background: rgba(10,14,26,0.95);
    border-top: 1px solid var(--border-glass);
    padding: 48px 32px 32px;
    color: var(--text-secondary);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-col h3 span {
    color: var(--accent-gold);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand .footer-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.footer-brand h3 {
    margin-bottom: 0;
}

.footer-col p {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 3px 0;
    transition: color 0.2s;
    font-size: 13px;
}

.footer-col a:hover {
    color: var(--accent-blue);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.footer-contact-item .flag {
    font-size: 16px;
}

.footer-divider {
    max-width: 1100px;
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

body.rtl .footer-inner {
    direction: rtl;
}

/* ========== Page ========== */
.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 13px; color: var(--text-secondary); }
.breadcrumb a { color: var(--accent-blue); text-decoration: none; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.page-title span { color: var(--accent-blue); }
.page-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

/* Cards */
.stat-card { background: linear-gradient(145deg, rgba(59,130,246,0.08), rgba(59,130,246,0.03)); border: 1px solid rgba(59,130,246,0.15); border-radius: var(--radius-md); padding: 24px; transition: all 0.3s; }
.stat-card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 12px; }
.stat-card .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--accent-blue); font-family: 'SF Mono', monospace; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }

/* Charts */
.chart-section { background: rgba(15,23,42,0.5); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 24px; margin-top: 24px; }
.chart-title { font-size: 14px; font-weight: 600; color: var(--accent-blue); margin-bottom: 16px; }
.chart-canvas { width: 100%; height: 250px; background: rgba(0,0,0,0.2); border-radius: var(--radius-sm); }

/* Tables */
.table-container { overflow-x: auto; margin-top: 24px; }
.table-container table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-container th, .table-container td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-glass); }
.table-container th { color: var(--accent-blue); font-weight: 600; font-size: 11px; text-transform: uppercase; background: rgba(30,41,59,0.5); }
.table-container td { color: var(--text-secondary); }
.table-container tr:hover td { background: rgba(255,255,255,0.02); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.form-field { background: rgba(15,23,42,0.4); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 16px; }
.form-field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; }
.form-field input, .form-field select { width: 100%; background: transparent; border: none; color: var(--text-primary); font-size: 14px; font-family: inherit; outline: none; }

/* Buttons */
.btn { padding: 10px 20px; border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--accent-blue), #6366f1); color: #fff; box-shadow: 0 2px 12px rgba(59,130,246,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.45); }
.btn-gold { background: linear-gradient(135deg, var(--accent-gold), var(--accent-amber)); color: #1e1e1e; }

/* Back Button */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; color: var(--accent-blue); text-decoration: none; font-size: 13px; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 20px; height: 20px; }

/* Two Column Layout */
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 24px; margin-top: 24px; }
.sidebar { background: rgba(15,23,42,0.5); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 24px; height: fit-content; }
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--accent-blue); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-glass); display: flex; align-items: center; gap: 8px; }
.sidebar-field { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sidebar-field > label.sidebar-label { flex: 0 0 100%; }
.sidebar-field > .sidebar-input { flex: 1 1 0; min-width: 0; }
.sidebar-field > .unit { flex-shrink: 0; }
.sidebar-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 6px; }
.sidebar-input { width: 100%; background: rgba(15,23,42,0.4); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text-primary); font-size: 13px; font-family: inherit; outline: none; transition: all 0.2s; }
.sidebar-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.sidebar-input option { background: #1e293b; color: #f1f5f9; }
.unit { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.stat-unit { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* Schedule Day */
.schedule-day { background: rgba(15,23,42,0.4); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 8px; }
.schedule-day .day-label { font-size: 13px; font-weight: 600; color: var(--accent-blue); margin-bottom: 8px; }
.schedule-day .day-items { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }

/* Progress Bars */
.progress-bar { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-emerald), var(--accent-blue)); transition: width 0.5s; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
    .page { padding: 24px 16px 40px; }
    .two-col { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .app-footer { padding: 32px 20px 24px; }
}