:root {
    --bg: #0a0a0f;
    --surface: #13131a;
    --surface2: #1c1c28;
    --border: #2a2a3d;
    --accent: #6c63ff;
    --accent2: #ff6b6b;
    --accent3: #00d4aa;
    --text: #e8e8f0;
    --muted: #7878a0;
    --success: #00d4aa;
    --warning: #ffb347;
    --danger: #ff6b6b;
    --radius: 16px;
    --radius-sm: 10px;
  }

  /* ─── LIGHT THEME ─── */
  html.light {
    --bg: #f4f4f8;
    --surface: #ffffff;
    --surface2: #eeeef5;
    --border: #dddde8;
    --accent: #5a52e0;
    --accent2: #e53e3e;
    --accent3: #00a884;
    --text: #1a1a2e;
    --muted: #6b6b8a;
    --success: #00a884;
    --warning: #d97706;
    --danger: #e53e3e;
  }

  html.light body::before {
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108,99,255,0.07) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,168,132,0.05) 0%, transparent 50%);
  }

  html.light .header {
    background: rgba(244,244,248,0.92);
    border-bottom-color: var(--border);
  }

  html.light .comment.client {
    background: rgba(90,82,224,0.08);
    border-color: rgba(90,82,224,0.2);
  }

  html.light select.form-control option { background: #ffffff; }

  /* ─── THEME TOGGLE FOOTER ─── */
  .theme-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .theme-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    min-width: 28px;
    text-align: center;
  }

  /* iOS-style toggle */
  .theme-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ios-toggle {
    position: relative;
    width: 120px;
    height: 32px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 3px;
    gap: 0;
  }

  .ios-toggle-option {
    flex: 1;
    height: 26px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
  }

  .ios-toggle-thumb {
    position: absolute;
    width: 36px;
    height: 26px;
    background: var(--accent);
    border-radius: 100px;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), width 0.2s;
    z-index: 1;
    left: 3px;
    box-shadow: 0 2px 8px rgba(108,99,255,0.35);
  }

  /* thumb positions: light=left(0), auto=center(42px), dark=right(81px) */
  .ios-toggle[data-mode="light"] .ios-toggle-thumb { transform: translateX(0px); }
  .ios-toggle[data-mode="auto"]  .ios-toggle-thumb { transform: translateX(39px); }
  .ios-toggle[data-mode="dark"]  .ios-toggle-thumb { transform: translateX(78px); }

  .auto-indicator {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .auto-indicator::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent3);
    animation: pulse 2s infinite;
  }

  /* push content up so footer doesn't cover it */
  body { padding-bottom: 56px; }

  /* ─── FAQ ─── */
  .faq-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px 40px;
  }

  .faq-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
  }

  .faq-title span {
    color: var(--accent);
  }

  .faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .faq-item:hover {
    border-color: var(--accent);
  }

  .faq-item.open {
    border-color: var(--accent);
  }

  .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    user-select: none;
    -webkit-user-select: none;
  }

  .faq-question:active {
    background: var(--surface2);
  }

  .faq-arrow {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--surface2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--accent);
    transition: transform 0.25s ease;
  }

  .faq-item.open .faq-arrow {
    transform: rotate(180deg);
    background: rgba(108,99,255,0.15);
  }

  .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
  }

  .faq-item.open .faq-answer {
    max-height: 400px;
    padding: 10px 16px 14px !important;
  }


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

  body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ─── BACKGROUND ─── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108,99,255,0.12) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,212,170,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* ─── HEADER ─── */
  .header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
  }

  .logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c63ff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
  }

  .logo span { font-weight: 400; opacity: 0.7; }

  .header-actions { display: flex; gap: 10px; align-items: center; }

  /* ─── BUTTONS ─── */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
  }

  .btn-primary {
    background: linear-gradient(135deg, #6c63ff, #5a52e0);
    color: white;
    box-shadow: 0 4px 15px rgba(108,99,255,0.3);
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,0.4); }
  .btn-primary:active { transform: translateY(0); }

  .btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-secondary:hover { background: var(--border); }

  .btn-success {
    background: linear-gradient(135deg, #00d4aa, #00b894);
    color: white;
    box-shadow: 0 4px 15px rgba(0,212,170,0.25);
  }
  .btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #e55050);
    color: white;
  }

  .btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 8px 14px;
    font-size: 13px;
  }
  .btn-ghost:hover { color: var(--text); border-color: var(--accent); }

  .btn-sm { padding: 7px 12px; font-size: 13px; }
  .btn-full { width: 100%; justify-content: center; }

  .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

  /* ─── MAIN LAYOUT ─── */
  .main { position: relative; z-index: 1; }

  /* ─── HERO ─── */
  .hero {
    text-align: center;
    padding: 56px 24px 48px;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(108,99,255,0.12);
    border: 1px solid rgba(108,99,255,0.3);
    color: #a09cff;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 24px;
  }

  .hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: #6c63ff;
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
  }

  .hero h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(26px, 7vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
  }

  .hero h1 .accent { color: #6c63ff; }

  .hero p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 36px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
  }

  /* ─── SCREENS ─── */
  .screen { display: none; padding: 16px; max-width: 680px; margin: 0 auto; }
  .screen.active { display: block; animation: fadeIn 0.3s ease; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ─── CARD ─── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
  }

  .card-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .card-title .icon {
    width: 32px; height: 32px;
    background: rgba(108,99,255,0.15);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
  }

  /* ─── FORM ─── */
  .form-group { margin-bottom: 16px; }

  .form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 7px;
  }

  .form-label .required { color: #ff6b6b; margin-left: 2px; }

  .form-control {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
  }

  .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
  }

  .form-control::placeholder { color: var(--muted); opacity: 0.6; }

  textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
  }

  select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237878a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
  }

  select.form-control option { background: #1c1c28; }

  /* ─── FILE UPLOAD ─── */
  .file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
  }

  .file-upload-area:hover, .file-upload-area.drag-over {
    border-color: var(--accent);
    background: rgba(108,99,255,0.05);
  }

  .file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }

  .file-upload-icon { font-size: 28px; margin-bottom: 8px; }
  .file-upload-text { font-size: 13px; color: var(--muted); }
  .file-upload-hint { font-size: 11px; color: var(--muted); margin-top: 4px; opacity: 0.6; }

  .file-preview-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

  .file-preview-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 200px;
  }

  .file-preview-item .name { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    flex: 1;
  }

  .file-preview-item .remove {
    cursor: pointer;
    color: var(--danger);
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
  }

  /* ─── STATUS BADGE ─── */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
  }

  .badge-open { background: rgba(108,99,255,0.15); color: #a09cff; }
  .badge-in_progress { background: rgba(255,179,71,0.15); color: #ffb347; }
  .badge-closed { background: rgba(0,212,170,0.15); color: #00d4aa; }

  /* ─── TICKET RESULT ─── */
  .ticket-result {
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,212,170,0.05));
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 16px;
  }

  .ticket-result .emoji { font-size: 40px; margin-bottom: 12px; }
  .ticket-result h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 17px;
    margin-bottom: 8px;
  }
  .ticket-result p { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }

  .credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .credential-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
  }

  .credential-box .label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .credential-box .value {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    color: var(--accent);
    word-break: break-all;
  }

  .warning-note {
    background: rgba(255,179,71,0.1);
    border: 1px solid rgba(255,179,71,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--warning);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  /* ─── TICKET VIEW ─── */
  .ticket-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .ticket-meta { display: flex; flex-direction: column; gap: 4px; }
  .ticket-number-display {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    color: var(--accent);
  }
  .ticket-date { font-size: 12px; color: var(--muted); }

  .ticket-subject {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .ticket-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .ticket-links a {
    color: var(--accent);
    font-size: 13px;
    word-break: break-all;
  }

  /* ─── COMMENTS ─── */
  .comments-section { margin-top: 8px; }

  .comments-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

  .comment {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    max-width: 90%;
  }

  .comment.client {
    background: rgba(108,99,255,0.1);
    border: 1px solid rgba(108,99,255,0.2);
    align-self: flex-end;
    margin-left: auto;
  }

  .comment.employee {
    background: var(--surface2);
    border: 1px solid var(--border);
    align-self: flex-start;
  }

  .comment-author {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--muted);
  }
  .comment.client .comment-author { color: #a09cff; }
  .comment.employee .comment-author { color: var(--accent3); }

  .comment-content { font-size: 13px; line-height: 1.6; }
  .comment-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

  /* ─── ATTACHMENTS ─── */
  .attachments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

  .attachment-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
  }
  .attachment-item:hover { border-color: var(--accent); }
  .attachment-item img { width: 100%; height: 80px; object-fit: cover; display: block; }
  .attachment-item .att-label { padding: 6px 8px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .attachment-item .video-thumb { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--bg); }

  /* ─── EMPLOYEE PANEL ─── */
  .emp-layout { display: flex; min-height: calc(100vh - 62px); }
  .emp-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  @media (max-width: 640px) {
    .emp-sidebar { display: none; }
    .emp-sidebar.open { display: flex; position: fixed; left: 0; top: 62px; bottom: 0; z-index: 100; width: 280px; box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
  }

  .emp-main { flex: 1; padding: 20px; overflow-y: auto; min-width: 0; }

  .sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 4px 8px;
    margin-bottom: 4px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
  }

  .sidebar-item:hover { background: var(--surface2); color: var(--text); }
  .sidebar-item.active { background: rgba(108,99,255,0.15); color: var(--accent); }

  .sidebar-badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-size: 10px;
    padding: 1px 6px;
    font-weight: 600;
  }

  /* ─── TICKET LIST ─── */
  .ticket-list { display: flex; flex-direction: column; gap: 12px; }

  .ticket-list-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
  }

  .ticket-list-item:hover { border-color: var(--accent); border-left-color: var(--accent); transform: translateX(2px); }
  .ticket-list-item.active { border-left-color: var(--accent); background: rgba(108,99,255,0.06); }

  .tli-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
  .tli-number { font-size: 12px; color: var(--accent); font-weight: 600; }
  .tli-subject { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
  .tli-desc { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tli-footer { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
  .tli-date { font-size: 11px; color: var(--muted); margin-left: auto; }

  /* ─── EMPLOYEE TICKET DETAIL ─── */
  .emp-detail { max-width: 700px; }
  .emp-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

  .detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  /* ─── LOGIN ─── */
  .login-wrap {
    min-height: calc(100vh - 62px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
  }

  .login-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    margin-bottom: 6px;
  }

  .login-sub { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

  /* ─── LOADING ─── */
  .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--muted);
    font-size: 14px;
    gap: 10px;
  }

  .spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  /* ─── ALERT ─── */
  .alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
  }

  .alert-error { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.25); color: #ff9999; }
  .alert-success { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25); color: var(--accent3); }

  /* ─── EMPTY STATE ─── */
  .empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
  }
  .empty-state .es-icon { font-size: 40px; margin-bottom: 12px; }
  .empty-state p { font-size: 14px; }

  /* ─── CATEGORY PILL ─── */
  .cat-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(108,99,255,0.1);
    color: #a09cff;
  }

  /* ─── DIVIDER ─── */
  .divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

  /* ─── FAQ ─── */
  .faq-list { display: flex; flex-direction: column; gap: 8px; }

  .faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .faq-item.open { border-color: var(--accent); }

  .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    gap: 12px;
    user-select: none;
    transition: background 0.15s;
  }

  .faq-question:hover { background: var(--surface2); }

  .faq-arrow {
    font-size: 11px;
    color: var(--muted);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    flex-shrink: 0;
  }

  .faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent); }

  .faq-answer {
    max-height: 0;
    overflow: hidden;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), padding 0.3s;
    padding: 0 20px;
  }

  /* ─── MOBILE MENU BTN ─── */
  .mobile-menu-btn {
    display: none;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 18px;
  }

  @media (max-width: 640px) {
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .screen { padding: 12px; }
    .card { padding: 16px; }
    .credentials-grid { grid-template-columns: 1fr; }
    .emp-main { padding: 12px; }
  }

  /* ─── OVERLAY ─── */
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    backdrop-filter: blur(2px);
  }
  .overlay.open { display: block; }

  /* ─── MODAL ─── */
  .modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .modal-backdrop.open { display: flex; }

  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    padding: 28px 24px;
    animation: fadeIn 0.2s ease;
  }

  .modal-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    margin-bottom: 20px;
  }

  /* ─── NAV TABS ─── */
  .nav-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 20px;
  }

  .nav-tab {
    flex: 1;
    padding: 9px;
    text-align: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
  }

  .nav-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }

  .category-map {
    complaint: 'Жалоба';
    suggestion: 'Предложение';
    question: 'Вопрос';
    technical: 'Техническая проблема';
    other: 'Другое';
  }
@keyframes marquee {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}
