/* DReam Team - NFS Assemble Official App & Website v2.0 */
:root {
    --primary: #1a1a2e;
    --primary-light: #2d2d5e;
    --accent: #e94560;
    --accent-light: #ff6b8a;
    --accent-glow: rgba(233, 69, 96, 0.3);
    --bg: #ffffff;
    --bg-secondary: #f4f5f9;
    --bg-tertiary: #ecedf3;
    --text: #2d2d3a;
    --text-secondary: #6c6c80;
    --text-light: #9a9ab0;
    --border: #e8e8ef;
    --border-light: #f0f0f6;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.04);
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-full: 999px;
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-fast: all 0.15s ease;
    --sidebar-width: 260px;
    --header-height: 64px;
    --font: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'PingFang SC','Microsoft YaHei',sans-serif;
}

* { margin:0;padding:0;box-sizing:border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.app-layout { display:flex;min-height:100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 100;
    display: flex; flex-direction: column;
    overflow-y: auto;
    transition: transform .3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
}
.sidebar-logo {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: #fff;
    letter-spacing: 1px; flex-shrink: 0;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.sidebar-title {
    font-size: 18px; font-weight: 700; color: var(--primary);
    line-height: 1.2;
}
.sidebar-title small {
    display: block; font-size: 11px; font-weight: 500;
    color: var(--text-secondary); letter-spacing: .5px;
}
.sidebar-nav { padding: 8px 0; flex: 1; }

.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 20px; margin: 2px 8px;
    cursor: pointer; color: var(--text-secondary);
    transition: var(--transition);
    border: none; background: none;
    width: auto; border-radius: var(--radius-sm);
    text-align: left; font-size: 14px; font-weight: 500;
    position: relative;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text);
}
.nav-item:active { transform: scale(0.97); }
.nav-item.active {
    color: var(--accent);
    background: linear-gradient(135deg, rgba(233,69,96,0.08), rgba(233,69,96,0.03));
    font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px;
    width: 3px; background: var(--accent);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--accent-glow);
}
/* Active indicator dot */
.nav-item.active::after {
    content: ''; position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-glow);
}
.nav-icon { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon svg { stroke: var(--accent); }

/* Sidebar bottom status */
.sidebar-bottom {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.connection-status {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}
.status-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; position: relative;
}
.status-dot::after {
    content: ''; position: absolute; inset: -3px;
    border-radius: 50%; opacity: 0.3;
    animation: ping 2s infinite;
}
.status-online { background: #4caf50; }
.status-online::after { background: #4caf50; }
.status-away { background: #ff9800; }
.status-away::after { background: #ff9800; }
.status-offline { background: #bdbdbd; }

@keyframes ping {
    0% { transform: scale(1); opacity: 0.3; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1; min-height: 100vh;
    display: flex; flex-direction: column;
    scroll-behavior: smooth;
}

/* ===== MOBILE ===== */
.mobile-header {
    display: none;
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    padding: 0 16px;
    align-items: center; justify-content: space-between;
}
.mobile-header .menu-btn {
    width: 40px; height: 40px;
    border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
    border-radius: var(--radius-xs);
    transition: var(--transition);
}
.mobile-header .menu-btn:hover { background: var(--bg-secondary); }
.mobile-header .menu-btn svg { width: 24px; height: 24px; }
.sidebar-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    animation: fadeIn .2s ease;
}

/* ===== PAGE HEADERS ===== */
.page-header {
    padding: 32px 40px 20px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg));
}
.page-title {
    font-size: 28px; font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}
.page-subtitle {
    font-size: 14px; color: var(--text-secondary);
    font-weight: 400;
}

/* ===== PAGE CONTENT ===== */
.page-content { padding: 24px 40px; flex: 1; }

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 40px 0 30px;
    position: relative;
}
.hero::after {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}
.hero h1 {
    font-size: 40px; font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.card-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 16px;
}
.card-title {
    font-size: 16px; font-weight: 700; color: var(--primary);
}

/* ===== STATS GRID ===== */
.card-grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: default;
    text-align: center;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: transparent;
}
.stat-card:hover::before { opacity: 1; }
.stat-value {
    font-size: 28px; font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 13px; color: var(--text-secondary);
    font-weight: 500;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
thead th {
    background: var(--bg-tertiary);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px; font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-secondary); }
tbody tr { transition: var(--transition-fast); }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600;
    letter-spacing: .3px;
}
.badge-pass { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.badge-fail { background: linear-gradient(135deg, #fbe9e7, #ffccbc); color: #c62828; }
.badge-pending { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #f57f17; }
.badge-pro { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1565c0; }

.time-record {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 700; color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ===== CHAT ===== */
.chat-container {
    display: flex; flex-direction: column;
    height: 600px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
}
.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    display: flex; align-items: center; gap: 10px;
}
.chat-header-dot {
    width: 10px; height: 10px;
    border-radius: 50%; background: #4caf50;
    box-shadow: 0 0 6px rgba(76,175,80,0.4);
    animation: ping 2s infinite;
}
.chat-header-title { font-size: 14px; font-weight: 600; color: var(--text); }
.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 20px;
    display: flex; flex-direction: column;
    gap: 12px;
    background: var(--bg-secondary);
}
.chat-msg {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px; line-height: 1.5;
    animation: msgIn .3s ease;
    position: relative;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-msg.self {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(26,26,46,0.15);
}
.chat-msg.other {
    align-self: flex-start;
    background: var(--bg);
    color: var(--text);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.chat-msg .sender {
    font-size: 11px; font-weight: 700;
    margin-bottom: 4px; opacity: .7;
}
.chat-msg.other .sender { color: var(--accent); }
.chat-msg .msg-text { word-break: break-word; }
.chat-msg .time {
    font-size: 10px; opacity: .5;
    margin-top: 6px; text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Chat Input */
.chat-input-area {
    display: flex; gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    align-items: flex-end;
}
.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-secondary);
    font-family: var(--font);
}
.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg);
}
.chat-send {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26,26,46,0.2);
}
.chat-send:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.chat-send:active { transform: scale(0.95); }
.chat-send svg { width: 18px; height: 18px; }

/* ===== TABS ===== */
.tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    background: var(--bg);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px; font-weight: 500;
    color: var(--text-secondary);
    border: none; background: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}
.tab:hover { color: var(--text); background: var(--bg-secondary); }
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .3s ease; }

/* ===== MEMBER CARDS ===== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.member-card {
    text-align: center;
    padding: 24px 16px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.member-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}
.member-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: transparent;
}
.member-card:hover::before { opacity: 1; }
.member-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,26,46,0.15);
}
.member-name {
    font-size: 15px; font-weight: 700;
    margin-bottom: 2px; color: var(--text);
}
.member-role {
    font-size: 12px; color: var(--text-secondary);
    margin-bottom: 8px;
}
.member-status {
    font-size: 11px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center;
    justify-content: center; gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font);
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(233,69,96,0.05);
}

/* ===== ASSESSMENT ===== */
.assessment-group {
    margin-bottom: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.assessment-group:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.assessment-group-title {
    font-size: 17px; font-weight: 700;
    margin-bottom: 12px; color: var(--primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.assessment-group p { margin-bottom: 16px; }
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width .6s cubic-bezier(0.4,0,0.2,1);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state svg {
    width: 48px; height: 48px;
    margin-bottom: 16px;
    opacity: .4;
}
.empty-state h3 {
    font-size: 18px; color: var(--text-secondary);
    margin-bottom: 8px;
}
.empty-state p { font-size: 14px; }

/* ===== LOADING ===== */
.loading {
    display: flex; align-items: center;
    justify-content: center; padding: 40px;
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NOTIFICATION / TOAST ===== */
.notification, .notification-fixed {
    position: fixed; top: 24px; right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 14px; font-weight: 500;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== FOOTER ===== */
.footer {
    padding: 20px 40px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== ANIMATIONS ===== */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== CHAT QUOTE / REPLY ===== */
.quote-preview {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    margin-bottom: 8px; font-size: 12px;
    width: 100%;
    animation: slideIn .2s ease;
}
.quote-preview .qtext {
    flex: 1; color: var(--text-secondary);
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
}
.quote-preview .qcancel {
    cursor: pointer; color: var(--text-light);
    font-size: 16px; padding: 2px;
    transition: var(--transition);
}
.quote-preview .qcancel:hover { color: var(--accent); }
.quote-msg {
    padding: 6px 10px;
    background: rgba(0,0,0,0.05);
    border-left: 2px solid var(--accent);
    border-radius: 6px; margin-bottom: 6px; font-size: 11px;
}
.chat-msg.self .quote-msg { background: rgba(255,255,255,0.1); }
.quote-msg .qsender { font-weight: 600; color: var(--text-secondary); }
.chat-msg.self .quote-msg .qsender { color: rgba(255,255,255,0.7); }
.quote-msg .qtext { color: var(--text-light); margin-top: 2px; }
.quote-btn {
    font-size: 10px; color: var(--text-light);
    cursor: pointer; opacity: 0;
    transition: opacity .2s; margin-left: 8px;
    padding: 2px 6px; border-radius: 4px;
}
.chat-msg:hover .quote-btn { opacity: 0.6; }
.chat-msg:hover .quote-btn:hover {
    opacity: 1; background: rgba(255,255,255,0.1);
}
.chat-msg.other:hover .quote-btn:hover {
    background: var(--bg-tertiary);
}

/* ===== CHAT MEDIA ===== */
.chat-media {
    max-width: 200px; max-height: 200px;
    border-radius: 8px; margin-top: 4px;
    cursor: pointer; display: block; overflow: hidden;
}
.chat-media img {
    width: 100%; height: auto;
    border-radius: 8px; display: block;
    transition: var(--transition);
}
.chat-media img:hover { transform: scale(1.02); }
.chat-media video {
    width: 100%; max-height: 200px;
    border-radius: 8px; display: block;
}

/* ===== CHAT VOICE ===== */
.voice-msg {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 20px; cursor: pointer;
    margin-top: 4px;
    transition: var(--transition);
}
.voice-msg:hover { background: rgba(0,0,0,0.08); }
.chat-msg.self .voice-msg { background: rgba(255,255,255,0.1); }
.chat-msg.self .voice-msg:hover { background: rgba(255,255,255,0.15); }
.voice-msg .play-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; flex-shrink: 0;
    transition: var(--transition);
}
.voice-msg .play-icon.playing { animation: voicePulse .8s infinite; }
@keyframes voicePulse {
    0% { box-shadow: 0 0 0 0 var(--accent-glow); }
    100% { box-shadow: 0 0 0 8px transparent; }
}
.voice-msg .vtime { font-size: 11px; color: var(--text-light); min-width: 30px; }

/* ===== CHAT TOOLBAR ===== */
.chat-toolbar {
    display: flex; gap: 6px; align-items: center;
}
.chat-toolbar button {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: var(--transition);
    flex-shrink: 0;
}
.chat-toolbar button:hover {
    background: var(--accent); color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.chat-toolbar button.recording {
    background: var(--accent); color: #fff;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.rec-time {
    font-size: 11px; color: var(--accent);
    font-weight: 600; min-width: 36px;
    text-align: center; font-variant-numeric: tabular-nums;
}

/* ===== PAGE SECTION ===== */
.page-section { scroll-margin-top: 80px; }

/* ===== RESPONSIVE: TABLETS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .page-header { padding: 24px 24px 16px; }
    .page-content { padding: 20px 24px; }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .sidebar.open { display: flex; position: fixed; z-index: 100; }
    .sidebar-overlay.show { display: block; }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; padding-top: var(--header-height); }
    .page-header { padding: 20px 16px 16px; }
    .page-title { font-size: 22px; }
    .page-subtitle { font-size: 13px; }
    .page-content { padding: 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero { padding: 24px 0 20px; }
    .hero h1 { font-size: 28px; }
    .stat-value { font-size: 22px; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab { padding: 10px 16px; font-size: 13px; white-space: nowrap; }
    .footer { padding: 16px; }
    .nav-item { padding: 14px 20px; font-size: 15px; border-radius: 0; }
    .sidebar-nav { padding: 8px 0; }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .member-card { padding: 16px 10px; }
    .member-avatar { width: 48px; height: 48px; font-size: 20px; }
    table { min-width: 100%; font-size: 12px; }
    thead th { padding: 10px 8px; font-size: 11px; }
    tbody td { padding: 8px; font-size: 12px; }
    .chat-container { height: calc(100vh - 280px); min-height: 350px; }
    .chat-msg { max-width: 85%; padding: 10px 14px; font-size: 13px; }
    .card { padding: 16px; }
    .stat-card { padding: 14px; }
    .assessment-group { padding: 16px; }
    .notification, .notification-fixed { top: 16px; right: 16px; left: 16px; }
}
