/* ===== Loading States ===== */
.loading-dots { display: inline-flex; gap: var(--space-xs); align-items: center; }
.loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); animation: pulse-dot 1.2s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px var(--space-2xl); gap: var(--space-md); color: var(--text-3); font-size: var(--text-sm); }
.skeleton { background: linear-gradient(90deg, var(--border-light) 25%, var(--surface-hover) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
.skeleton-text { height: 14px; margin-bottom: var(--space-sm); width: 100%; }
.skeleton-text.short { width: 60%; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; }
.skeleton-card { height: 120px; }

/* ===== Stats Cards ===== */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-xl); position: relative; transition: all .15s ease; }
.stat-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-focus); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.stat-value { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-3); margin-top: var(--space-xs); }

/* ===== Chips ===== */
.chip { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 2px 8px; border-radius: 6px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.chip-green { background: var(--green-bg); color: #059669; border: 1px solid var(--green-border); }
.chip-red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.chip-amber { background: var(--amber-bg); color: #d97706; border: 1px solid var(--amber-border); }
.chip-blue { background: var(--blue-bg); color: #2563eb; border: 1px solid #bfdbfe; }
.chip-purple { background: var(--purple-bg); color: #7c3aed; border: 1px solid #ddd6fe; }
.chip-teal { background: var(--teal-bg); color: #0d9488; border: 1px solid #99f6e4; }
.chip-gray { background: var(--bg); color: var(--text-3); }

/* ===== Tags (subject, board, class badges) ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.tag-subject { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.tag-board { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag-class { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tag-lang { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }

/* ===== Avatars ===== */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; font-family: var(--font); cursor: pointer; border: none; transition: all .12s ease; white-space: nowrap; line-height: 1.4; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--border-focus); }
.btn-ghost { background: transparent; color: var(--text-3); }
.btn-ghost:hover { background: var(--bg); color: var(--text-2); }
.btn-green { background: var(--green-bg); color: #059669; border: 1px solid var(--green-border); }
.btn-green:hover { background: #d1fae5; }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 2px 7px; font-size: var(--text-xs); border-radius: 5px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease, transform .15s ease; }
.card:hover { border-color: var(--border); }
.card.removing { opacity: 0; transform: translateY(-8px); }
.card-header { padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-body { padding: var(--space-xl); }

.tutor-row { display: flex; align-items: center; gap: var(--space-lg); padding: 12px var(--space-xl); cursor: pointer; transition: background .15s ease; }
.tutor-row:hover { background: var(--surface-hover); }
.tutor-row.focused { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-sm); }
.tutor-row-info { flex: 1; min-width: 0; }
.tutor-row-name { font-size: var(--text-base); font-weight: 600; color: var(--text); display: flex; align-items: center; gap: var(--space-sm); }
.tutor-row-meta { display: flex; align-items: center; gap: var(--space-md); margin-top: 3px; font-size: var(--text-xs); color: var(--text-3); }
.tutor-row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tutor-row-right { display: flex; align-items: center; gap: var(--space-lg); flex-shrink: 0; }
.tutor-row-right .row-delete-btn, .tutor-card .row-delete-btn { font-size:11px;font-weight:600;color:var(--red);cursor:pointer;padding:2px 8px;border-radius:4px;transition:all .12s ease;white-space:nowrap;border:1px solid var(--red-border);background:var(--red-bg);user-select:none }
.tutor-row-right .row-delete-btn:hover, .tutor-card .row-delete-btn:hover { background:#fee2e2;border-color:var(--red);color:#dc2626 }
.tutor-card .row-delete-btn { font-size:10px;padding:1px 6px;position:relative;top:-1px }
.tutor-row-fee { text-align: right; }
.tutor-row-fee .amount { font-size: var(--text-sm); font-weight: 700; color: var(--text); }
.tutor-row-fee .label { font-size: 10px; color: var(--text-4); }
.tutor-card { padding: var(--space-lg); cursor: pointer; transition: all .2s ease; border-color: var(--border-light); }
.tutor-card:hover { box-shadow: var(--shadow-md); border-color: var(--border); }
.tutor-card.focused { outline: 2px solid var(--accent); outline-offset: -2px; }

.command-item mark { background: var(--accent-light); color: var(--accent); border-radius: 2px; padding: 0 2px; }
.tutor-card-header { display: flex; align-items: flex-start; gap: var(--space-md); margin-bottom: var(--space-md); }
.tutor-card-name { font-size: var(--text-base); font-weight: 600; display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.tutor-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tutor-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-md); margin-top: var(--space-md); border-top: 1px solid var(--border-light); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-3xl) var(--space-2xl); text-align: center; }
.empty-state .empty-icon { width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--bg); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); color: var(--text-4); }
.empty-state h3 { font-size: var(--text-base); font-weight: 600; color: var(--text-2); margin-bottom: var(--space-xs); }

/* ===== Forms ===== */
.form-input { width: 100%; padding: var(--space-sm) var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-sm); font-family: var(--font); background: var(--surface); color: var(--text); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: var(--space-xs); }

/* ===== Drawer ===== */
.drawer-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: none; }
.drawer-overlay.open { display: block; animation: fadeIn .2s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 100vw; background: var(--surface); z-index: 301; box-shadow: -8px 0 40px rgba(0,0,0,0.15); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .15s cubic-bezier(.16,1,.3,1); }
.drawer.open { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 10; padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: var(--surface); }
.drawer-header h2 { font-size: var(--text-lg); font-weight: 700; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-xl); scroll-behavior: smooth; }
.drawer-body::-webkit-scrollbar { width: 4px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.drawer-footer { padding: 14px var(--space-xl); border-top: 1px solid var(--border); display: flex; gap: var(--space-sm); justify-content: flex-end; flex-shrink: 0; background: var(--surface); }
.drawer-section { padding: var(--space-lg) 0; }
.drawer-section + .drawer-section { border-top: 1px solid var(--border-light); }
.drawer-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-4); margin-bottom: var(--space-md); }
.drawer-timeline-item { display: flex; align-items: flex-start; gap: var(--space-md); padding: var(--space-sm) 0; }
.drawer-timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); margin-top: 6px; flex-shrink: 0; }
.drawer-timeline-line { width: 1px; background: var(--border-light); margin: 0 auto; flex-shrink: 0; }

/* ===== Toast ===== */
.toast-container { position: fixed; top: var(--space-lg); right: var(--space-lg); z-index: 500; display: flex; flex-direction: column; gap: var(--space-sm); max-width: 380px; }
.toast { padding: 12px var(--space-lg); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: var(--text-sm); animation: slideInRight .2s ease; border: 1px solid var(--border); }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--amber); }
.toast.info { border-left: 3px solid var(--accent); }

/* ===== Tables ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table th { text-align: left; padding: 10px 14px; font-size: var(--text-xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); background: var(--bg); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.data-table td { padding: var(--space-md) 14px; border-bottom: 1px solid var(--border-light); color: var(--text-2); vertical-align: middle; transition: background .12s ease; }
.data-table tbody tr:nth-child(even) td { background: rgba(0,0,0,0.015); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover) !important; }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 75vh; position: relative; }
.table-wrap::after { content: ''; position: sticky; right: 0; top: 0; bottom: 0; width: 24px; background: linear-gradient(to right, transparent, var(--surface)); pointer-events: none; opacity: 0; transition: opacity .2s; }
.table-wrap.can-scroll::after { opacity: 1; }
.divide-y > .tutor-row:nth-child(even) { background: rgba(0,0,0,0.01); }

/* ===== Pages ===== */
.page { display: none; animation: fadeIn .2s ease; }
.page.active { display: block; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); gap: var(--space-md); flex-wrap: wrap; }

/* ===== Dropdown Menu ===== */
.dropdown-menu { position: absolute; right: 0; top: 100%; margin-top: var(--space-xs); min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: var(--space-xs); z-index: 60; display: none; }
.dropdown-menu.open { display: block; }
.dropdown-item { display: flex; align-items: center; gap: var(--space-sm); padding: 7px 10px; border-radius: 6px; font-size: var(--text-sm); color: var(--text-2); cursor: pointer; }
.dropdown-item:hover { background: var(--accent-light); color: var(--accent); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-bg); }

/* ===== Command Palette ===== */
.command-palette { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; display: none; align-items: flex-start; justify-content: center; padding-top: 80px; }
.command-palette.open { display: flex; }
.command-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.command-dialog { position: relative; width: 100%; max-width: 580px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 25px 60px rgba(0,0,0,0.3); overflow: hidden; }
.command-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px var(--space-lg); border-bottom: 1px solid var(--border); }
.command-input-wrap input { flex: 1; border: none; outline: none; font-size: 15px; font-family: var(--font); background: transparent; color: var(--text); }
.command-results { max-height: 380px; overflow-y: auto; padding: 6px; }
.command-item { display: flex; align-items: center; gap: 10px; padding: 9px var(--space-md); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-sm); color: var(--text-2); }
.command-item:hover, .command-item.active { background: var(--accent-light); color: var(--accent); }
.command-item .cmd-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--bg); flex-shrink: 0; }
.command-item .cmd-shortcut { margin-left: auto; font-size: var(--text-xs); color: var(--text-4); background: var(--border-light); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); }
.command-section { padding: 6px var(--space-md) 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-4); }
.command-item.disabled { cursor: default; color: var(--text-4); justify-content: center; }

/* ===== Grid & Layout Helpers ===== */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: var(--space-2xl); }
.filter-bar { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; padding: var(--space-md) var(--space-lg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-lg); }
.filter-toggle { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); cursor: pointer; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
.filter-toggle:hover { background: var(--accent-light); }

/* ===== Progress ===== */
.progress-bar { height: 6px; border-radius: 3px; background: var(--border-light); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.v-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }

/* ===== Category Chip ===== */
.category-chip { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 2px 8px; border-radius: 6px; font-size: var(--text-xs); font-weight: 600; background: var(--cat-bg, #eef2ff); color: var(--cat-text, #4f46e5); border: 1px solid var(--cat-border, #c7d2fe); }
.cat-tutor { --cat-bg: #eef2ff; --cat-text: #4f46e5; --cat-border: #c7d2fe; }

/* ===== Auth Overlay ===== */
.auth-overlay { position: fixed; inset: 0; z-index: 9999; background: linear-gradient(135deg, #0b1120 0%, #1e1b4b 100%); align-items: center; justify-content: center; padding: var(--space-2xl); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.auth-overlay.active { opacity: 1; pointer-events: auto; }
.auth-overlay.js-ready { display: flex; }
.js-auth-fallback { display: none; position: fixed; inset: 0; z-index: 9998; background: linear-gradient(135deg, #0b1120 0%, #1e1b4b 100%); align-items: center; justify-content: center; padding: var(--space-2xl); text-align: center; color: #fff; }
.noscript-warning { display: none; position: fixed; inset: 0; z-index: 10000; background: #0b1120; align-items: center; justify-content: center; padding: var(--space-2xl); color: #fff; text-align: center; }
noscript .noscript-warning { display: flex; }
.auth-card { width: 400px; max-width: 100%; background: var(--surface); border-radius: var(--radius-xl); padding: var(--space-3xl); box-shadow: 0 24px 80px rgba(0,0,0,0.3); animation: scaleIn .25s ease; }
.auth-card h1 { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-xs); }
.auth-card p { font-size: var(--text-sm); color: var(--text-3); margin-bottom: var(--space-xl); }
.auth-error { display: none; margin-top: var(--space-md); padding: 10px var(--space-md); border-radius: var(--radius-sm); background: var(--red-bg); color: var(--red); font-size: 12px; font-weight: 600; }
.auth-loading { display: none; align-items: center; justify-content: center; gap: var(--space-sm); margin-top: var(--space-md); padding: 10px; font-size: var(--text-sm); color: var(--text-3); }
.auth-loading.active { display: flex; }
.auth-hint { font-size: var(--text-xs); color: var(--text-4); text-align: center; margin-top: var(--space-lg); }

/* ===== Inline Context ===== */
.meta-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--text-4); margin: 0 6px; vertical-align: middle; }
.last-active { font-size: 10px; color: var(--text-4); white-space: nowrap; }

/* ===== Bulk Selection ===== */
.selection-bar { display: none; align-items: center; gap: var(--space-md); padding: 8px var(--space-lg); background: var(--accent-light); border: 1px solid var(--accent); border-radius: var(--radius); margin-bottom: var(--space-md); animation: slideDown .2s ease; }
.selection-bar.active { display: flex; }
.selection-count { font-size: var(--text-sm); font-weight: 600; color: var(--accent); }
.selection-actions { display: flex; gap: var(--space-sm); margin-left: auto; }
.tutor-checkbox { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border); cursor: pointer; accent-color: var(--accent); flex-shrink: 0; }

/* ===== Tutor Profile Page ===== */
.profile-page{max-width:1080px;margin:0 auto}
.ph{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-sm);overflow:hidden;margin-bottom:20px}
.ph-cover{height:130px;background:linear-gradient(120deg,#0f1d35 0%,#1a2d4a 40%,#0f766e 100%);position:relative}
.ph-cover-pattern{position:absolute;inset:0;background-image:radial-gradient(circle at 20% 50%,rgba(13,148,136,.25) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(249,115,22,.15) 0%,transparent 45%)}
.ph-avatar-wrap{position:absolute;bottom:-44px;left:28px}
.ph-avatar{width:88px;height:88px;border-radius:20px;border:3px solid #fff;box-shadow:0 4px 16px rgba(0,0,0,.18);background:var(--navy,#0f1d35);display:flex;align-items:center;justify-content:center;font-family:var(--font);font-size:34px;font-weight:900;color:#fff;overflow:hidden;flex-shrink:0}
.ph-avatar img{width:100%;height:100%;object-fit:cover}
.ph-avatar-tier{position:absolute;bottom:-8px;right:-8px;font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:#f59e0b;color:#fff;border:2px solid #fff;white-space:nowrap}
.ph-avatar-tier.verified{background:var(--teal)}
.ph-avatar-tier.standard{background:#1a2d4a}
.ph-identity{padding:56px 28px 24px}
.ph-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.ph-name{font-family:var(--font);font-size:clamp(1.5rem,3vw,2rem);font-weight:900;color:var(--navy,#0f1d35);letter-spacing:-.03em;line-height:1.1;margin-bottom:5px}
.ph-tagline{font-size:14px;color:var(--text-3);font-weight:500;margin-bottom:10px}
.ph-location{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;color:var(--text-3)}
.ph-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.ph-badge{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}
.pb-green{background:rgba(5,150,105,.1);color:#059669;border:1px solid rgba(5,150,105,.2)}
.pb-orange{background:rgba(249,115,22,.1);color:#c2410c;border:1px solid rgba(249,115,22,.2)}
.pb-blue{background:rgba(15,29,53,.07);color:var(--navy-2,#1a2d4a);border:1px solid var(--border)}
.pb-gold{background:rgba(245,158,11,.12);color:#92400e;border:1px solid rgba(245,158,11,.25)}
.ph-response-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:999px;font-size:11px;font-weight:700;background:rgba(16,185,129,.08);color:#065f46;border:1px solid rgba(16,185,129,.18);white-space:nowrap}
.ph-response-pill .dot{width:7px;height:7px;border-radius:50%;background:#10b981;animation:blink 1.8s ease-in-out infinite}
.ph-stats{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--border)}
.ph-stat{padding:16px 12px;text-align:center;border-right:1px solid var(--border);transition:background .15s}
.ph-stat:last-child{border-right:none}
.ph-stat:hover{background:rgba(13,148,136,.03)}
.ph-stat-val{font-family:var(--font);font-size:22px;font-weight:900;color:var(--navy,#0f1d35);line-height:1;margin-bottom:4px}
.ph-stat-icon{font-size:16px;margin-bottom:4px}
.ph-stat-lbl{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3)}
.star-row{display:flex;gap:2px;justify-content:center;margin-bottom:2px}
.star-row svg{width:12px;height:12px}
.profile-cols{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}
.profile-left{display:flex;flex-direction:column;gap:20px}
.ps{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-sm);padding:24px}
.ps-title{font-family:var(--font);font-size:15px;font-weight:800;color:var(--navy,#0f1d35);margin-bottom:16px;display:flex;align-items:center;gap:8px}
.ps-title-icon{width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:14px;background:rgba(13,148,136,.07);flex-shrink:0}
.ps-about-text{font-size:14px;color:#374151;line-height:1.75}
.ps-about-text+.ps-about-text{margin-top:10px}
.ps-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ps-detail-item{background:var(--bg);border-radius:var(--radius-sm);padding:12px 14px}
.ps-detail-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:4px}
.ps-detail-val{font-size:13px;font-weight:700;color:var(--navy,#0f1d35)}
.chip-group{display:flex;flex-wrap:wrap;gap:7px}
.chip-subj{background:rgba(13,148,136,.07);color:#0f766e;border:1px solid rgba(13,148,136,.15)}
.chip-board{background:rgba(15,29,53,.06);color:#1a2d4a;border:1px solid var(--border)}
.chip-class{background:rgba(249,115,22,.08);color:#9a3412;border:1px solid rgba(249,115,22,.18)}
.chip-mode{background:rgba(139,92,246,.07);color:#5b21b6;border:1px solid rgba(139,92,246,.18)}
.chip-section-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);margin-bottom:6px}
.review-item{padding:18px 0;border-bottom:1px solid var(--border)}
.review-item:last-child{border-bottom:none;padding-bottom:0}
.review-item:first-child{padding-top:0}
.ri-header{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.ri-avatar{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-family:var(--font);font-size:15px;font-weight:800;color:#fff;flex-shrink:0}
.ri-meta strong{display:block;font-size:13px;font-weight:700;color:var(--navy,#0f1d35)}
.ri-meta span{font-size:11px;color:var(--text-3)}
.ri-stars{display:flex;gap:2px;margin-left:auto}
.ri-stars svg{width:11px;height:11px}
.ri-comment{font-size:13px;color:#374151;line-height:1.7;font-style:italic}
.ri-empty{text-align:center;padding:28px;color:var(--text-3);font-size:14px}
.booking-col{position:sticky;top:78px}
.booking-card{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-md);overflow:hidden}
.bc-header{padding:20px 22px 18px;border-bottom:1px solid var(--border);background:linear-gradient(135deg,#0f1d35 0%,#1a2d4a 100%)}
.bc-header-title{font-family:var(--font);font-size:17px;font-weight:800;color:#fff;margin-bottom:4px}
.bc-header-sub{font-size:12px;color:rgba(255,255,255,.6)}
.bc-free-badge{display:inline-flex;align-items:center;gap:5px;background:rgba(16,185,129,.18);color:#6ee7b7;font-size:11px;font-weight:700;padding:4px 10px;border-radius:999px;margin-top:10px}
.bc-body{padding:18px 22px;display:flex;flex-direction:column;gap:12px}
.bc-trust-row{display:flex;flex-direction:column;gap:6px}
.bc-trust-item{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--text-3)}
.bc-trust-item .ti-icon{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0;background:rgba(13,148,136,.07)}
.bc-rate{display:flex;align-items:baseline;gap:4px;padding:14px;background:var(--bg);border-radius:var(--radius-sm)}
.bc-rate-num{font-family:var(--font);font-size:26px;font-weight:900;color:var(--navy,#0f1d35)}
.bc-rate-unit{font-size:13px;color:var(--text-3);font-weight:500}
.bc-rate-note{font-size:11px;color:var(--text-3);margin-left:auto;font-weight:600}
.bc-cta-primary{width:100%;padding:13px 20px;border:none;border-radius:var(--radius-sm);background:var(--teal);color:#fff;font-size:14px;font-weight:800;box-shadow:0 4px 14px rgba(13,148,136,.3);transition:all .16s;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}
.bc-cta-primary:hover{background:#0f766e;box-shadow:0 6px 20px rgba(13,148,136,.38);transform:translateY(-1px)}
.bc-cta-secondary{width:100%;padding:11px 20px;border:1.5px solid var(--border);border-radius:var(--radius-sm);background:#fff;color:var(--navy,#0f1d35);font-size:13px;font-weight:700;transition:all .16s;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}
.bc-cta-secondary:hover{border-color:var(--text-3);background:var(--bg)}
.bc-cta-wa{width:100%;padding:11px 20px;border:1.5px solid rgba(37,211,102,.3);border-radius:var(--radius-sm);background:rgba(37,211,102,.07);color:#065f46;font-size:13px;font-weight:700;transition:all .16s;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}
.bc-cta-wa:hover{background:rgba(37,211,102,.13);border-color:rgba(37,211,102,.5)}
.bc-divider{height:1px;background:var(--border);margin:0 -22px}
.bc-safety{font-size:11px;color:var(--text-3);text-align:center;line-height:1.6;padding-top:4px}
.bc-safety strong{color:var(--navy,#0f1d35)}
.bc-similar{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-sm);padding:18px 20px;margin-top:16px}
.bc-similar-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:12px}
.sim-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border);cursor:pointer;transition:background .12s;border-radius:8px}
.sim-row:last-child{border-bottom:none;padding-bottom:0}
.sim-row:hover{background:var(--bg)}
.sim-avatar{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-family:var(--font);font-size:13px;font-weight:800;color:#fff;flex-shrink:0}
.sim-info{flex:1;min-width:0}
.sim-name{font-size:13px;font-weight:700;color:var(--navy,#0f1d35);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sim-sub{font-size:11px;color:var(--text-3)}
.sim-rate{font-size:11px;font-weight:700;color:var(--teal);white-space:nowrap}

/* ===== Responsive ===== */
@media (max-width: 1200px) { .content { max-width: 100%; } .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 var(--space-lg); }
  .content { padding: var(--space-lg); padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom, 0px)); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .drawer { width: 100vw; }
  .drawer-body { padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px)); }
  .drawer-header { padding-top: calc(var(--space-lg) + env(safe-area-inset-top, 0px)); }
  .section-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar.collapsible .filter-toggle { display: flex; }
  .filter-bar.collapsible .filter-group { display: none; }
  .filter-bar.collapsible.expanded .filter-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
  .data-table th, .data-table td { padding: var(--space-sm) 10px; }
  .btn, .dropdown-item, .nav-item { min-height: 44px; }
  .btn-icon { min-width: 44px; }
  .btn:active { transform: scale(0.96); transition: transform .1s ease; }
  .tutor-row:active { background: var(--border-light) !important; }
  .tutor-card:active { transform: scale(0.985); transition: transform .1s ease; }
  input, select, textarea { font-size: 16px; }
  .sidebar nav a { padding: 12px; }
  .tutor-row-right .btn { min-width: 40px; min-height: 40px; }
  .dropdown-menu { min-width: 200px; }
  .tutor-row-tags { max-height: none; }
  .table-wrap { max-height: 60vh; }
  .page > h1, .page > .section-header h1 { font-size: 18px; }
}
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .stat-value { font-size: var(--text-xl); }
  .content { padding: var(--space-md); }
  .stat-card { padding: var(--space-lg); }
  .selection-bar { flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
  .selection-actions { flex-wrap: wrap; gap: 4px; margin-left: 0; width: 100%; }
  .selection-actions .btn { flex: 1; min-width: 0; font-size: 11px; padding: 6px 8px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tutor-row { flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-md); }
  .tutor-row-right { width: 100%; justify-content: space-between; padding-top: var(--space-sm); border-top: 1px solid var(--border-light); }
  .tutor-row-meta { flex-wrap: wrap; gap: var(--space-sm); }
  .section-header { gap: var(--space-sm); }
  .section-header .flex { flex-wrap: wrap; gap: var(--space-xs); }
  .toast-container { top: auto; bottom: var(--space-lg); right: var(--space-md); left: var(--space-md); max-width: none; }
}
@media(max-width:840px){.profile-cols{grid-template-columns:1fr}.booking-col{position:static}.ph-stats{grid-template-columns:repeat(2,1fr)}.ph-stats .ph-stat:nth-child(2){border-right:none}.ph-stats .ph-stat:nth-child(3){border-bottom:none}.ps-detail-grid{grid-template-columns:1fr}}
@media(max-width:520px){.ph-identity{padding:52px 18px 20px}.ph-cover{height:100px}.ph-avatar-wrap{bottom:-38px;left:18px}.ph-avatar{width:76px;height:76px;border-radius:16px}.ph-name{font-size:1.35rem}.ps{padding:18px}.bc-body{padding:16px 18px}.bc-header{padding:16px 18px 14px}.bc-similar{padding:16px}}

/* ===== Badge System (migrated from crm-design-system.css) ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-teal { background: var(--ds-teal-light); color: var(--ds-teal); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: #1D4ED8; }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-gray { background: var(--bg); color: var(--text-3); }

/* ===== Confirmation Modal (migrated from crm-design-system.css) ===== */
.confirmation-modal { position: fixed; inset: 0; z-index: 1050; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); animation: fadeIn .15s ease; }
.confirmation-modal.show { display: flex; }
.confirmation-modal .modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 25px 60px rgba(0,0,0,0.3); width: 480px; max-width: 90vw; animation: scaleIn .2s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--border); }
.modal-header h2 { display: flex; align-items: center; gap: var(--space-sm); font-size: 16px; font-weight: 700; }
.modal-body { padding: var(--space-xl); }
.modal-footer { display: flex; gap: var(--space-sm); justify-content: flex-end; padding: var(--space-lg) var(--space-xl); border-top: 1px solid var(--border); }

/* ===== Error State (migrated from crm-design-system.css) ===== */
.error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px var(--space-2xl); text-align: center; border: 1px dashed var(--red-border); border-radius: var(--radius); background: var(--red-bg); animation: fadeIn .2s ease; }
.error-state h3 { font-size: 15px; font-weight: 600; color: var(--red); margin: var(--space-md) 0 var(--space-xs); }
.error-state p { font-size: 13px; color: var(--text-3); max-width: 360px; margin-bottom: var(--space-lg); }

/* ===== Page Titles (migrated from crm-design-system.css) ===== */
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--navy, #0B1F3A); }
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* ===== Card Title (migrated from crm-design-system.css) ===== */
.card-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ===== Password Field (migrated from crm-design-system.css) ===== */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 40px; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-4); display: flex; align-items: center; justify-content: center; transition: color .12s ease; }
.password-toggle:hover { color: var(--text-2); }
.caps-warning { display: none; font-size: 11px; color: var(--amber); margin-top: var(--space-xs); padding: var(--space-xs) var(--space-sm); background: var(--amber-bg); border-radius: var(--radius-sm); }

/* ===== Session Countdown (migrated from crm-design-system.css) ===== */
.session-countdown { font-size: 36px; font-weight: 800; text-align: center; color: var(--navy, #0B1F3A); margin: var(--space-lg) 0; }

/* ===== Tooltip (migrated from crm-design-system.css) ===== */
.tooltip { position: relative; cursor: help; }
.tooltip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0.95); background: var(--navy, #0B1F3A); color: #fff; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .12s ease; }
.tooltip:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* ===== Auth Forgot Link (migrated from crm-design-system.css) ===== */
.auth-forgot { text-align: right; margin-top: var(--space-xs); }
.auth-forgot a { font-size: 12px; color: var(--text-3); text-decoration: underline; transition: color .12s ease; }
.auth-forgot a:hover { color: var(--accent); }

/* ===== Stat Card Accent Colors (migrated from crm-design-system.css) ===== */
.stat-card { cursor: default; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; border-radius: 0 0 var(--radius) var(--radius); }
.stat-card .stat-value { transition: color .2s ease; }
.stat-card:hover .stat-value { color: var(--navy, #0B1F3A); }
.stat-card.accent-teal::before { background: linear-gradient(90deg, var(--ds-teal), var(--ds-teal3)); }
.stat-card.accent-green::before { background: linear-gradient(90deg, var(--green), #10B981); }
.stat-card.accent-amber::before { background: linear-gradient(90deg, var(--amber), var(--ds-accent)); }
.stat-card.accent-purple::before { background: linear-gradient(90deg, var(--purple), #A78BFA); }
.stat-card.accent-blue::before { background: linear-gradient(90deg, var(--blue), #60A5FA); }

/* ===== Drawer Timeline Dot Colors (migrated from crm-design-system.css) ===== */
.drawer-timeline-dot.status { background: #D1FAE5; color: #059669; }
.drawer-timeline-dot.note { background: #FEE2E2; color: #DC2626; }
.drawer-timeline-dot.system { background: #DBEAFE; color: #2563EB; }
.drawer-timeline-dot.match { background: #EDE9FE; color: #7C3AED; }

/* ===== Content Breathing (migrated from crm-design-system.css) ===== */
.page > .section-header:first-child { animation: slideUp .25s ease; }
.content > * + * { margin-top: var(--space-lg); }
.section-header + .filter-bar, .section-header + .kpi-row { margin-top: var(--space-lg); }
.kpi-row + .card, .filter-bar + .table-wrap, .filter-bar + .card { margin-top: var(--space-lg); }

/* ===== Notifications Container (migrated from crm-design-system.css) ===== */
#notifs-container { max-width: none; }

/* ===== Print Styles (migrated from crm-design-system.css) ===== */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: #fff !important; }
  .sidebar, .mobile-overlay, .toast-container, .drawer-overlay, .drawer { display: none !important; }
  .main { margin: 0 !important; padding: 20px !important; }
  .topbar { display: none !important; }
  .content { padding: 0 !important; }
  .kpi-row { grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; }
  .stat-card { border: 1px solid #ddd !important; padding: 12px !important; box-shadow: none !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; margin-bottom: 16px !important; page-break-inside: avoid; }
  .btn, button { display: none !important; }
  h1, h2, h3 { page-break-after: avoid; }
}
