@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono&display=swap');

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

:root {
  --bg: #ffffff;
  --bg2: #fafafa;
  --bg3: #f5f5f5;
  --border: #ebebeb;
  --border2: #d8d8d8;
  --text: #1a1a1a;
  --text2: #555;
  --text3: #888;
  --text4: #bbb;
  --purple: #5B4FE8;
  --purple-light: #F5F4FF;
  --purple-dim: #9B94F5;
  --green: #16A34A;
  --green-light: #F0FDF4;
  --sidebar: #0a0a0a;
  --radius: 8px;
  --radius-lg: 12px;
  --mono: 'Space Mono', monospace;
}

body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 18px; min-height: 100vh; line-height: 1.5; }
.hidden { display: none !important; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar); }
.login-box { width: 400px; display: flex; flex-direction: column; gap: 16px; }
.login-logo { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: 0.2em; text-align: center; margin-bottom: 6px; }
.login-sub { font-size: 15px; color: #444; text-align: center; margin-bottom: 14px; }
.login-box input { padding: 15px 18px; border-radius: var(--radius); border: 1px solid #1e1e1e; background: #111; color: #fff; font-size: 16px; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.login-box input::placeholder { color: #333; }
.login-box input:focus { border-color: var(--purple); }
.login-box button { padding: 15px; border-radius: var(--radius); background: var(--purple); color: #fff; border: none; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.login-box button:hover { opacity: 0.88; }
.login-error { font-size: 14px; color: #ef4444; text-align: center; min-height: 20px; font-family: var(--mono); }

/* SHELL */
.shell { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: 280px; min-width: 280px; background: var(--sidebar); display: flex; flex-direction: column; overflow-y: auto; }
.logo-area { padding: 32px 28px 26px; border-bottom: 1px solid #1a1a1a; }
.freq-logo { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.18em; }
.freq-sub { font-size: 12px; color: #333; margin-top: 4px; letter-spacing: 0.08em; }
.user-hero { padding: 24px 28px; border-bottom: 1px solid #1a1a1a; }
.u-av { width: 48px; height: 48px; border-radius: 50%; background: var(--purple); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.u-nm { font-size: 16px; font-weight: 600; color: #fff; }
.u-pl { font-size: 13px; color: #444; margin-top: 3px; }
.prog-wrap { margin-top: 18px; }
.prog-lbl { font-size: 11px; color: #333; letter-spacing: 0.1em; margin-bottom: 8px; }
.prog-bg { height: 3px; background: #222; border-radius: 2px; }
.prog-fill { height: 3px; background: var(--purple); border-radius: 2px; width: 0%; transition: width 1.3s ease; }
.prog-txt { font-size: 13px; color: #333; margin-top: 7px; font-family: var(--mono); }
.nav { flex: 1; padding: 14px 0; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 14px 28px; font-size: 15px; color: #444; cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; user-select: none; }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }
.nav-item:hover { color: #aaa; background: rgba(255,255,255,0.03); }
.nav-item.active { color: #fff; border-left-color: var(--purple); background: rgba(91,79,232,0.1); }
.nav-dot { display: none; }
.logout-btn { padding: 20px 28px; font-size: 13px; letter-spacing: 0.08em; color: #333; cursor: pointer; border-top: 1px solid #1a1a1a; transition: color 0.2s; }
.logout-btn:hover { color: #666; }

/* MAIN */
.main { flex: 1; overflow-y: auto; background: var(--bg); }
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0 36px; height: 68px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.tb-title { font-size: 18px; font-weight: 500; color: var(--text3); }
.week-pill { font-family: var(--mono); font-size: 13px; padding: 6px 16px; border: 2px solid var(--text); border-radius: 4px; color: var(--text); font-weight: 700; letter-spacing: 0.1em; }
.content { padding: 36px; display: flex; flex-direction: column; gap: 24px; }
.page { display: flex; flex-direction: column; gap: 24px; }

/* CARDS */
.card { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.sec-lbl { font-size: 11px; font-weight: 700; color: var(--text4); letter-spacing: 0.16em; margin-bottom: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* CALL BANNER */
.call-banner { background: var(--sidebar); border-radius: var(--radius-lg); padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.call-left { display: flex; align-items: center; gap: 18px; }
.call-icon { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; animation: pip 2s infinite; flex-shrink: 0; }
@keyframes pip { 0%,100%{opacity:1} 50%{opacity:0.3} }
.call-title { font-size: 16px; font-weight: 600; color: #fff; }
.call-meta { font-family: var(--mono); font-size: 12px; color: #555; margin-top: 4px; }
.call-btn { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--sidebar); background: #fff; border: none; padding: 12px 24px; border-radius: var(--radius); cursor: pointer; white-space: nowrap; text-decoration: none; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.call-btn:hover { opacity: 0.88; }

/* UNLOCK */
.unlock-card { border: 2px solid var(--purple); border-radius: var(--radius-lg); padding: 26px 30px; display: flex; align-items: center; gap: 26px; background: var(--purple-light); }
.unlock-icon { font-family: var(--mono); font-size: 60px; font-weight: 700; color: var(--purple); line-height: 1; letter-spacing: -0.02em; flex-shrink: 0; }
.unlock-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.unlock-desc { font-size: 14px; color: var(--text2); margin-top: 6px; line-height: 1.5; }

/* AREAS */
.area-row { display: flex; flex-direction: column; gap: 16px; }
.area-line { display: flex; align-items: center; gap: 14px; }
.area-nm { font-size: 14px; color: var(--text3); width: 120px; flex-shrink: 0; }
.area-track { flex: 1; height: 4px; background: var(--bg3); border-radius: 2px; position: relative; }
.area-fill { height: 4px; border-radius: 2px; transition: width 1.6s cubic-bezier(.16,1,.3,1); position: relative; }
.area-fill::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; border-radius: 50%; background: inherit; border: 2px solid #fff; box-shadow: 0 0 0 1.5px currentColor; }
.area-sc { font-family: var(--mono); font-size: 15px; font-weight: 700; width: 34px; text-align: right; flex-shrink: 0; }

/* CONSISTENCY */
.consist-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.consist-nm { font-size: 14px; color: var(--text3); width: 120px; flex-shrink: 0; }
.consist-bars { display: flex; gap: 4px; flex: 1; }
.c-bar { width: 16px; height: 22px; border-radius: 3px; flex-shrink: 0; }
.consist-lbl { font-size: 12px; width: 40px; text-align: right; flex-shrink: 0; font-family: var(--mono); }
.consist-note { font-size: 13px; color: var(--text4); line-height: 1.5; margin-top: 8px; }

/* EXERCISES */
.ex-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; transition: all 0.15s; }
.ex-item:hover { border-color: var(--border2); background: var(--bg2); }
.ex-item.done { opacity: 0.35; }
.ex-type { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--bg3); }
.ex-type svg { width: 18px; height: 18px; stroke: var(--text3); fill: none; stroke-width: 1.5; }
.ex-body { flex: 1; }
.ex-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3; }
.ex-desc { font-size: 13px; color: var(--text4); margin-top: 3px; letter-spacing: 0.04em; }
.ex-status { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 4px; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.status-done { background: var(--green-light); color: var(--green); }
.status-todo { background: var(--bg3); color: var(--text4); }

/* JOURNEY */
.journey-wrap { position: relative; padding: 6px 0; }
.journey-line { position: absolute; left: 22px; top: 20px; bottom: 20px; width: 1px; background: var(--border); }
.journey-steps { display: flex; flex-direction: column; }
.j-step { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.j-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border2); background: #fff; position: relative; z-index: 1; }
.j-dot.done { background: var(--purple); border-color: var(--purple); }
.j-dot.current { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(91,79,232,0.15); }
.j-label { font-size: 14px; color: var(--text3); }
.j-label.done { color: var(--text4); text-decoration: line-through; }
.j-label.current { color: var(--text); font-weight: 600; }

/* SIMULATOR */
.sim-wrap { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sim-header { background: var(--sidebar); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.sim-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 0.1em; }
.sim-badge { font-family: var(--mono); font-size: 11px; padding: 4px 12px; border-radius: 4px; font-weight: 700; }
.sim-badge.active { background: rgba(91,79,232,0.2); color: var(--purple-dim); }
.sim-badge.waiting { background: #1a1a1a; color: #444; }
.scenario-box { padding: 18px 24px; background: var(--bg3); border-bottom: 1.5px solid var(--border); }
.scenario-label { font-size: 11px; font-weight: 700; color: var(--text4); letter-spacing: 0.12em; margin-bottom: 7px; }
.scenario-text { font-size: 15px; color: var(--text2); line-height: 1.6; }
.chat-area { height: 320px; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.sim-msg { display: flex; flex-direction: column; gap: 4px; max-width: 80%; }
.sim-msg.ai { align-self: flex-start; }
.sim-msg.user { align-self: flex-end; }
.sim-msg-role { font-family: var(--mono); font-size: 11px; color: var(--text4); letter-spacing: 0.1em; font-weight: 700; }
.sim-msg.user .sim-msg-role { text-align: right; }
.sim-bubble { padding: 13px 17px; font-size: 15px; line-height: 1.55; border-radius: 10px; }
.sim-msg.ai .sim-bubble { background: var(--bg3); color: var(--text2); border-radius: 4px 10px 10px 10px; }
.sim-msg.user .sim-bubble { background: var(--purple); color: #fff; border-radius: 10px 4px 10px 10px; }
.typing-dots { display: flex; gap: 5px; padding: 13px 17px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text4); animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
.score-bar { padding: 16px 24px; border-top: 1.5px solid var(--border); background: var(--bg2); display: flex; flex-wrap: wrap; gap: 8px; }
.score-chip { font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 4px; background: var(--bg); border: 1.5px solid var(--border); color: var(--text3); }
.score-chip b { color: var(--text); font-weight: 700; }
.sim-input-area { padding: 16px 20px; border-top: 1.5px solid var(--border); display: flex; gap: 10px; align-items: flex-end; }
.sim-input-area textarea { flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; background: var(--bg2); color: var(--text); resize: none; font-family: 'Inter', sans-serif; line-height: 1.4; outline: none; transition: border-color 0.2s; }
.sim-input-area textarea::placeholder { color: var(--text4); }
.sim-input-area textarea:focus { border-color: var(--purple); }
.sim-input-area button { padding: 12px 22px; border-radius: var(--radius); background: var(--purple); color: #fff; border: none; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.sim-input-area button:hover { opacity: 0.88; }
.sim-input-area button:disabled { opacity: 0.35; cursor: default; }

/* PROGRESS */
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text3); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.test-item { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.test-hd { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--bg3); }
.test-name { font-size: 15px; font-weight: 600; color: var(--text); }
.test-date { font-family: var(--mono); font-size: 12px; color: var(--text4); }
.test-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.test-scores { display: flex; gap: 8px; flex-wrap: wrap; }
.test-summary { font-size: 13px; color: var(--text2); line-height: 1.6; border-left: 3px solid var(--purple); padding-left: 12px; }

/* DIARY */
.diary-item { border-left: 3px solid var(--border2); padding: 10px 16px; margin-bottom: 14px; }
.diary-item.ai-read { border-left-color: var(--purple); }
.diary-date { font-family: var(--mono); font-size: 11px; color: var(--text4); margin-bottom: 5px; letter-spacing: 0.08em; }
.diary-txt { font-size: 14px; color: var(--text2); line-height: 1.65; }
.diary-tag { font-family: var(--mono); font-size: 11px; padding: 3px 10px; border: 1px solid rgba(91,79,232,0.25); border-radius: 4px; color: var(--purple); display: inline-block; margin-top: 7px; }
.diary-add { display: flex; gap: 10px; margin-top: 18px; }
.diary-add textarea { flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; background: var(--bg2); color: var(--text); resize: none; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.diary-add textarea::placeholder { color: var(--text4); }
.diary-add textarea:focus { border-color: var(--purple); }
.diary-add button { padding: 0 20px; border-radius: var(--radius); background: var(--purple); color: #fff; border: none; font-size: 14px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; }

/* MATERIALS */
.material-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; transition: all 0.15s; }
.material-item:hover { border-color: var(--border2); background: var(--bg2); }
.mat-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mat-icon svg { width: 18px; height: 18px; stroke: var(--text3); fill: none; stroke-width: 1.5; }
.mat-body { flex: 1; }
.mat-title { font-size: 15px; font-weight: 600; color: var(--text); }
.mat-meta { font-family: var(--mono); font-size: 12px; color: var(--text4); margin-top: 3px; }
.mat-link { font-size: 14px; color: var(--purple); text-decoration: none; flex-shrink: 0; font-weight: 600; }
.mat-link:hover { opacity: 0.75; }

/* CHAT */
.chat-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; padding-right: 4px; min-height: 0; }
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 78%; }
.chat-msg.luigi { align-self: flex-start; }
.chat-msg.me { align-self: flex-end; }
.chat-role { font-family: var(--mono); font-size: 11px; color: var(--text4); letter-spacing: 0.1em; font-weight: 700; }
.chat-msg.me .chat-role { text-align: right; }
.chat-bubble { padding: 13px 17px; font-size: 15px; line-height: 1.55; border-radius: 10px; }
.chat-msg.luigi .chat-bubble { background: var(--bg3); color: var(--text2); border-radius: 4px 10px 10px 10px; }
.chat-msg.me .chat-bubble { background: var(--purple); color: #fff; border-radius: 10px 4px 10px 10px; }
.chat-input-row { display: flex; gap: 10px; flex-shrink: 0; }
.chat-input-row input { flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 13px 17px; font-size: 15px; background: var(--bg2); color: var(--text); outline: none; font-family: 'Inter', sans-serif; transition: border-color 0.2s; }
.chat-input-row input::placeholder { color: var(--text4); }
.chat-input-row input:focus { border-color: var(--purple); }
.chat-input-row button { padding: 0 22px; border-radius: var(--radius); background: var(--purple); color: #fff; border: none; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.chat-input-row button:hover { opacity: 0.88; }

/* FEEDBACK */
.feedback-from { font-family: var(--mono); font-size: 11px; color: var(--purple); font-weight: 700; margin-bottom: 10px; letter-spacing: 0.1em; }
.feedback-msg { font-size: 15px; line-height: 1.65; color: var(--text2); padding: 16px 18px; background: var(--bg2); border-radius: var(--radius); border-left: 3px solid var(--purple); margin-bottom: 14px; }
.feedback-reply { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; background: var(--bg2); color: var(--text); resize: none; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.feedback-reply::placeholder { color: var(--text4); }
.feedback-reply:focus { border-color: var(--purple); }

/* REPORT */
.report-locked { display: flex; align-items: center; justify-content: space-between; opacity: 0.4; }
.rep-left { display: flex; align-items: center; gap: 14px; }
.rep-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg3); display: flex; align-items: center; justify-content: center; }
.rep-icon svg { width: 18px; height: 18px; stroke: var(--text3); fill: none; stroke-width: 1.5; }
.rep-title { font-size: 15px; font-weight: 600; color: var(--text); }
.rep-meta { font-family: var(--mono); font-size: 12px; color: var(--text4); margin-top: 3px; }
.rep-btn { font-family: var(--mono); font-size: 12px; padding: 7px 16px; border-radius: var(--radius); border: 1.5px solid var(--border2); color: var(--text3); background: transparent; cursor: not-allowed; letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .sidebar { width: 70px; min-width: 70px; }
  .freq-logo, .freq-sub, .user-hero, .logout-btn { display: none; }
  .nav-item { justify-content: center; padding: 16px; }
  .nav-item svg { width: 20px; height: 20px; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---- SIMULATOR APPLE STYLE ---- */
@keyframes simPop { from{opacity:0;transform:scale(0.97);} to{opacity:1;transform:scale(1);} }

.sim-wrap { background: #f5f5f7; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sim-header { background: var(--sidebar); padding: 18px 26px; display: flex; align-items: center; justify-content: space-between; }
.sim-title { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.12em; }
.sim-badge { font-size: 11px; padding: 6px 16px; border-radius: 999px; font-weight: 700; letter-spacing: 0.06em; display: flex; align-items: center; gap: 6px; }
.sim-badge.active { background: #34c759; color: #fff; }
.sim-badge.waiting { background: #1a1a1a; color: #444; }
.sim-badge.active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pip 2s infinite; }

.scenario-box { padding: 18px 26px; background: #f0efff; border-bottom: 2px solid #c7c3ff; }
.scenario-label { font-size: 10px; font-weight: 700; color: var(--purple); letter-spacing: 0.14em; margin-bottom: 5px; }
.scenario-text { font-size: 15px; color: #3b0764; line-height: 1.5; font-weight: 500; }

.chat-area { padding: 24px 26px; display: flex; flex-direction: column; gap: 20px; background: #f5f5f7; min-height: 280px; overflow-y: auto; max-height: 380px; }

.sim-msg-block { display: flex; flex-direction: column; gap: 7px; animation: simPop 0.25s ease; }
.sim-msg-block.sim-user { align-items: flex-end; }

.sim-sender { font-size: 12px; font-weight: 600; color: #86868b; padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.sim-sender-right { flex-direction: row-reverse; }

.sim-tag { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.06em; }
.sim-tag-luigi { background: var(--purple); color: #fff; }
.sim-tag-user { background: var(--sidebar); color: #fff; }

.sim-bubble { padding: 14px 18px; border-radius: 16px; font-size: 15px; line-height: 1.65; max-width: 84%; }
.sim-bubble-luigi { background: #fff; color: var(--text); border-radius: 4px 16px 16px 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); border-left: 3px solid var(--purple); }
.sim-bubble-luigi strong { color: var(--purple); }
.sim-bubble-user { background: var(--sidebar); color: #fff; border-radius: 16px 16px 4px 16px; }

.sim-scores-block { background: #fff; border-top: 1.5px solid var(--border); }
.sim-scores-title { padding: 16px 20px 8px; font-size: 11px; font-weight: 700; color: #86868b; letter-spacing: 0.1em; }
.sim-scores-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 14px 20px; gap: 10px; }
.sim-sc { display: flex; flex-direction: column; align-items: center; padding: 16px 12px; border-radius: 12px; gap: 4px; }
.sim-sc-area { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: #86868b; }
.sim-sc-num { font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.sim-sc-track { width: 100%; height: 3px; background: rgba(0,0,0,0.08); border-radius: 2px; margin-top: 6px; }
.sim-sc-fill { height: 3px; border-radius: 2px; transition: width 1.4s cubic-bezier(.16,1,.3,1); }

.sim-input-area { padding: 16px 20px; border-top: 1.5px solid var(--border); display: flex; gap: 10px; align-items: flex-end; background: #fff; }
.sim-input-area textarea { flex: 1; border: 1.5px solid var(--border); border-radius: 12px; padding: 13px 18px; font-size: 15px; background: #f5f5f7; color: var(--text); resize: none; font-family: 'Inter', sans-serif; line-height: 1.4; outline: none; transition: all 0.2s; box-shadow: none; }
.sim-input-area textarea::placeholder { color: #86868b; }
.sim-input-area textarea:focus { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 3px rgba(91,79,232,0.12); }
.sim-input-area button { padding: 13px 24px; border-radius: 12px; background: var(--purple); color: #fff; border: none; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.sim-input-area button:hover { opacity: 0.88; }
.sim-input-area button:disabled { opacity: 0.35; cursor: default; }

.typing-dots { display: flex; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #86868b; animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

/* ---- ADMIN PANEL ---- */
.admin-shell { display: flex; height: 100vh; overflow: hidden; font-family: 'Inter', sans-serif; }
.admin-sidebar { width: 240px; min-width: 240px; background: #0a0a0a; display: flex; flex-direction: column; overflow-y: auto; }
.admin-logo { padding: 22px 18px 18px; border-bottom: 1px solid #1a1a1a; }
.admin-logo-txt { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 0.18em; }
.admin-logo-sub { font-size: 10px; color: #333; margin-top: 3px; }
.admin-tag { font-size: 9px; padding: 3px 8px; border-radius: 3px; background: #5B4FE8; color: #fff; font-weight: 700; letter-spacing: 0.08em; display: inline-block; margin-top: 6px; }
.admin-users-label { font-size: 9px; color: #333; letter-spacing: 0.12em; padding: 14px 18px 6px; }
.admin-user-list { flex: 1; }
.admin-user-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; border-left: 2px solid transparent; transition: all 0.15s; }
.admin-user-item:hover { background: rgba(255,255,255,0.03); }
.admin-user-item.sel { background: rgba(91,79,232,0.1); border-left-color: #5B4FE8; }
.au-av { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.au-info { flex: 1; min-width: 0; }
.au-name { font-size: 12px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-pkg { font-size: 10px; color: #444; margin-top: 1px; }
.au-dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; flex-shrink: 0; }
.admin-add-btn { width: 100%; padding: 10px; border-radius: 8px; border: 1px dashed #222; background: transparent; color: #444; font-size: 12px; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s; }
.admin-add-btn:hover { border-color: #5B4FE8; color: #5B4FE8; }
.admin-logout-btn { background: transparent; border: none; color: #333; font-size: 11px; cursor: pointer; font-family: 'Inter', sans-serif; letter-spacing: 0.06em; }
.admin-logout-btn:hover { color: #666; }
.admin-main { flex: 1; overflow-y: auto; background: #f5f5f7; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1.5px solid #ebebeb; padding: 0 28px; height: 56px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.admin-tb-left { display: flex; align-items: center; gap: 12px; }
.admin-tb-av { width: 38px; height: 38px; border-radius: 50%; background: #5B4FE8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.admin-tb-name { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.admin-tb-meta { font-size: 12px; color: #999; margin-top: 1px; }
.admin-tb-actions { display: flex; gap: 8px; }
.admin-btn { font-size: 13px; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 600; transition: all 0.15s; }
.admin-btn-outline { border: 1.5px solid #e0e0e0; background: #fff; color: #555; }
.admin-btn-outline:hover { border-color: #5B4FE8; color: #5B4FE8; }
.admin-btn-primary { border: none; background: #5B4FE8; color: #fff; }
.admin-btn-primary:hover { opacity: 0.88; }
.admin-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.admin-stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.admin-stat { background: #fff; border: 1.5px solid #ebebeb; border-radius: 10px; padding: 16px 20px; }
.admin-stat-lbl { font-size: 10px; font-weight: 700; color: #bbb; letter-spacing: 0.1em; margin-bottom: 6px; }
.admin-stat-val { font-size: 28px; font-weight: 700; color: #1a1a1a; line-height: 1; }
.admin-section { background: #fff; border: 1.5px solid #ebebeb; border-radius: 12px; overflow: hidden; }
.admin-sec-hd { padding: 14px 20px; border-bottom: 1.5px solid #ebebeb; display: flex; align-items: center; justify-content: space-between; }
.admin-sec-title { font-size: 11px; font-weight: 700; color: #bbb; letter-spacing: 0.1em; }
.admin-ex-grid { display: grid; grid-template-columns: 1fr 1fr; }
.admin-ex-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #f5f5f5; border-right: 1px solid #f5f5f5; cursor: pointer; transition: background 0.15s; }
.admin-ex-row:hover { background: #fafafa; }
.admin-ex-row:nth-child(even) { border-right: none; }
.admin-ex-row.ex-on { background: #faf9ff; }
.admin-scenario-list { display: flex; flex-direction: column; }
.admin-sc-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: background 0.15s; }
.admin-sc-row:hover { background: #fafafa; }
.admin-sc-row:last-child { border-bottom: none; }
.admin-sc-row.sc-on { background: #faf9ff; }
.ex-chk { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #e0e0e0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.ex-chk.on { background: #5B4FE8; border-color: #5B4FE8; }
.ex-chk svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 2.5; display: none; }
.ex-chk.on svg { display: block; }
.ex-b { flex: 1; }
.ex-t { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.ex-m { font-size: 11px; color: #bbb; margin-top: 2px; }
.ex-tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.tag-scritto { background: #f0f0ff; color: #5B4FE8; }
.tag-audio { background: #f0fff4; color: #16a34a; }
.tag-scenario { background: #fff8f0; color: #d97706; }
.diff-easy { background: #f0fff4; color: #16a34a; }
.diff-med { background: #fff8f0; color: #d97706; }
.diff-hard { background: #fff0f0; color: #dc2626; }
.admin-call-row { padding: 16px 20px; display: flex; align-items: center; gap: 10px; }
.admin-input { flex: 1; border: 1.5px solid #ebebeb; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #1a1a1a; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.admin-input:focus { border-color: #5B4FE8; }
.admin-feedback-box { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.admin-fb-from { font-size: 10px; font-weight: 700; color: #5B4FE8; letter-spacing: 0.08em; margin-bottom: 5px; }
.admin-fb-prev { font-size: 13px; color: #555; line-height: 1.6; padding: 12px 14px; background: #f5f5f7; border-radius: 8px; border-left: 3px solid #5B4FE8; }
.admin-textarea { width: 100%; border: 1.5px solid #ebebeb; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #1a1a1a; resize: none; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.admin-textarea:focus { border-color: #5B4FE8; }
