/* GameProducer Studio - Styles */
  :root {
    --bg-primary: #0f0f12;
    --bg-secondary: #17171d;
    --bg-tertiary: #1e1e27;
    --bg-card: #1a1a22;
    --bg-hover: #22222d;
    --border: rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.13);
    --text-primary: #f0f0f4;
    --text-secondary: #8c8ca0;
    --text-muted: #55556a;
    --accent: #7c6af7;
    --accent-dim: rgba(124,106,247,0.15);
    --accent-glow: rgba(124,106,247,0.3);
    --green: #4ade80;
    --green-dim: rgba(74,222,128,0.12);
    --amber: #fbbf24;
    --amber-dim: rgba(251,191,36,0.12);
    --red: #f87171;
    --red-dim: rgba(248,113,113,0.12);
    --blue: #60a5fa;
    --blue-dim: rgba(96,165,250,0.12);
    --teal: #2dd4bf;
    --teal-dim: rgba(45,212,191,0.12);
    --pink: #f472b6;
    --pink-dim: rgba(244,114,182,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --font: 'DM Sans', system-ui, sans-serif;
    --mono: 'DM Mono', monospace;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; overflow: hidden; }
  body { font-family: var(--font); background: var(--bg-primary); color: var(--text-primary); font-size: 14px; line-height: 1.5; }

  /* SCROLLBARS */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

  /* LAYOUT */
  #app { display: none; height: 100vh; }

  /* SIDEBAR */
  #sidebar {
    width: 230px; min-width: 230px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    user-select: none;
  }
  .sidebar-brand {
    padding: 20px 16px 14px;
    border-bottom: 1px solid var(--border);
  }
  .brand-logo {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
  }
  .brand-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--accent); display: flex; align-items: center; justify-content: center;
    font-size: 16px;
  }
  .brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
  .brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; margin-left: 42px; }

  .section-label {
    padding: 14px 16px 6px;
    font-size: 10px; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.1em;
  }

  .projects-list { flex: 1; overflow-y: auto; padding: 4px 8px; }
  .proj-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--radius-md);
    cursor: pointer; transition: background 0.15s; position: relative;
  }
  .proj-item:hover { background: var(--bg-hover); }
  .proj-item.active { background: var(--accent-dim); }
  .proj-item.active .proj-name { color: var(--accent); }
  .proj-icon {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; flex-shrink: 0;
    background: var(--bg-tertiary); color: var(--text-secondary);
  }
  .proj-item.active .proj-icon { background: var(--accent); color: #fff; }
  .proj-name { font-size: 13px; font-weight: 400; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .proj-alert { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }

  .btn-new-proj {
    margin: 8px; padding: 9px 12px;
    border: 1px dashed var(--border-strong);
    background: transparent; border-radius: var(--radius-md);
    cursor: pointer; color: var(--text-muted);
    font-size: 13px; font-family: var(--font);
    display: flex; align-items: center; gap: 8px;
    transition: all 0.15s;
  }
  .btn-new-proj:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }

  /* CONTEXT MENU */
  .ctx-menu {
    position: fixed; z-index: 1000;
    background: var(--bg-card); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); padding: 4px; min-width: 150px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  }
  .ctx-item {
    padding: 8px 12px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13px; transition: background 0.1s;
    display: flex; align-items: center; gap: 8px;
  }
  .ctx-item:hover { background: var(--bg-hover); }
  .ctx-item.danger { color: var(--red); }
  .ctx-item.danger:hover { background: var(--red-dim); }

  /* MAIN */
  #main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-primary); }

  /* TOPBAR */
  #topbar {
    height: 52px; padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0;
    background: var(--bg-secondary); flex-shrink: 0;
  }
  .topbar-title { font-size: 15px; font-weight: 600; margin-right: 20px; letter-spacing: -0.01em; }
  .tab-btn {
    height: 52px; padding: 0 16px;
    border: none; border-bottom: 2px solid transparent;
    background: transparent; cursor: pointer;
    font-size: 13px; font-family: var(--font);
    color: var(--text-secondary); margin-bottom: -1px;
    transition: color 0.15s; display: flex; align-items: center; gap: 6px;
  }
  .tab-btn:hover { color: var(--text-primary); }
  .tab-btn.active { color: var(--text-primary); border-bottom-color: var(--accent); font-weight: 500; }
  .tab-badge {
    background: var(--red); color: #fff;
    font-size: 10px; padding: 1px 5px; border-radius: 10px; font-weight: 600;
  }

  /* CONTENT */
  #content { flex: 1; overflow-y: auto; padding: 24px; }

  /* WELCOME */
  #welcome {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; gap: 16px; text-align: center;
  }
  .welcome-icon { font-size: 48px; margin-bottom: 8px; }
  .welcome-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
  .welcome-sub { color: var(--text-secondary); font-size: 14px; max-width: 300px; line-height: 1.6; }

  /* DASHBOARD */
  .dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
  .metric-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 18px;
  }
  .metric-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
  .metric-val { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 4px; }
  .metric-sub { font-size: 12px; color: var(--text-secondary); }
  .progress-bar { height: 4px; background: var(--bg-tertiary); border-radius: 4px; margin-top: 10px; overflow: hidden; }
  .progress-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.5s; }

  .alerts-section { margin-bottom: 24px; }
  .alert-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-md);
    margin-bottom: 6px; font-size: 13px;
  }
  .alert-late { background: var(--red-dim); border: 1px solid rgba(248,113,113,0.2); color: var(--red); }
  .alert-soon { background: var(--amber-dim); border: 1px solid rgba(251,191,36,0.2); color: var(--amber); }
  .alert-ok { background: var(--green-dim); border: 1px solid rgba(74,222,128,0.2); color: var(--green); }
  .alert-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

  .dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .dash-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
  .dash-box-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

  /* SECTION HEADER */
  .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
  .section-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  .section-actions { display: flex; gap: 8px; }

  /* BUTTONS */
  .btn { padding: 8px 16px; border-radius: var(--radius-md); cursor: pointer; font-size: 13px; font-family: var(--font); border: none; transition: all 0.15s; font-weight: 500; }
  .btn-accent { background: var(--accent); color: #fff; }
  .btn-accent:hover { background: #6b5de6; }
  .btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }
  .btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
  .btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
  .btn-danger-ghost:hover { background: var(--red-dim); }
  .btn-sm { padding: 5px 10px; font-size: 12px; }

  /* TEAM */
  .team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
  .member-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; transition: border-color 0.15s;
  }
  .member-card:hover { border-color: var(--border-strong); }
  .member-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
  .avatar {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600; flex-shrink: 0;
  }
  .member-info .name { font-size: 14px; font-weight: 600; }
  .member-info .contact { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .roles-wrap { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
  .role-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 20px;
    font-weight: 500; letter-spacing: 0.02em;
  }
  .rt-prod { background: var(--blue-dim); color: var(--blue); }
  .rt-lead { background: var(--accent-dim); color: var(--accent); }
  .rt-art { background: var(--green-dim); color: var(--green); }
  .rt-prog { background: var(--teal-dim); color: var(--teal); }
  .rt-design { background: var(--pink-dim); color: var(--pink); }
  .rt-sound { background: var(--amber-dim); color: var(--amber); }
  .card-actions { display: flex; gap: 6px; }
  .btn-tiny { padding: 4px 10px; border-radius: var(--radius-sm); font-size: 11px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-family: var(--font); transition: all 0.12s; }
  .btn-tiny:hover { background: var(--bg-hover); color: var(--text-primary); }
  .btn-tiny.red:hover { color: var(--red); border-color: rgba(248,113,113,0.4); }

  /* ASSET TABLE */
  .asset-wrap { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
  table { width: 100%; border-collapse: collapse; min-width: 820px; }
  thead th { padding: 10px 14px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); text-align: left; background: var(--bg-secondary); }
  thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
  thead th:last-child { border-radius: 0 var(--radius-lg) 0 0; }
  tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: var(--bg-hover); }
  .asset-name { font-weight: 500; }
  .tag-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; }
  .imp-low { background: rgba(140,140,160,0.15); color: var(--text-secondary); }
  .imp-med { background: var(--blue-dim); color: var(--blue); }
  .imp-high { background: var(--amber-dim); color: var(--amber); }
  .imp-urgent { background: var(--red-dim); color: var(--red); }
  .st-todo { background: rgba(140,140,160,0.15); color: var(--text-secondary); }
  .st-progress { background: var(--amber-dim); color: var(--amber); }
  .st-created { background: var(--blue-dim); color: var(--blue); }
  .st-integrated { background: var(--teal-dim); color: var(--teal); }
  .st-tested { background: var(--accent-dim); color: var(--accent); }
  .st-validated { background: var(--green-dim); color: var(--green); }
  .overdue-row td { background: rgba(248,113,113,0.04); }
  .overdue-row:hover td { background: rgba(248,113,113,0.08) !important; }

  /* CALENDAR */
  .cal-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
  .cal-nav { display: flex; align-items: center; gap: 6px; }
  .cal-nav-btn {
    width: 32px; height: 32px; border-radius: var(--radius-md);
    border: 1px solid var(--border-strong); background: transparent;
    cursor: pointer; color: var(--text-secondary); font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s; font-family: var(--font);
  }
  .cal-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
  .cal-cur-label { font-size: 14px; font-weight: 600; min-width: 150px; text-align: center; letter-spacing: -0.01em; }
  .view-group { display: flex; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
  .view-opt { padding: 6px 13px; font-size: 12px; cursor: pointer; color: var(--text-secondary); border: none; background: transparent; font-family: var(--font); transition: all 0.12s; }
  .view-opt.active { background: var(--accent); color: #fff; font-weight: 500; }
  .cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); }
  .legend-dot { width: 10px; height: 10px; border-radius: 50%; }
  #calendar-grid { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
  .cal-head { display: grid; border-bottom: 1px solid var(--border); }
  .cal-head-cell { padding: 10px 6px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; letter-spacing: 0.05em; }
  .cal-body {}
  .cal-row { display: grid; border-bottom: 1px solid var(--border); }
  .cal-row:last-child { border-bottom: none; }
  .cal-cell { min-height: 80px; padding: 6px; border-right: 1px solid var(--border); position: relative; }
  .cal-cell:last-child { border-right: none; }
  .cal-cell.other { background: var(--bg-secondary); opacity: 0.5; }
  .cal-day { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
  .cal-cell.today .cal-day { background: var(--accent); color: #fff; font-weight: 600; }
  .cal-evt {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    margin-bottom: 2px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; cursor: default; opacity: 0.92;
    color: #fff; font-weight: 500;
  }
  .more-events { font-size: 10px; color: var(--text-muted); padding: 0 4px; cursor: pointer; }

  /* TODO */
  .todo-input-row { display: flex; gap: 10px; margin-bottom: 20px; }
  .todo-input-row input { flex: 1; }
  .todo-section { margin-bottom: 20px; }
  .todo-section-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
  .todo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); margin-bottom: 4px; transition: border-color 0.12s;
  }
  .todo-item:hover { border-color: var(--border-strong); }
  .todo-cb { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
  .todo-text { flex: 1; font-size: 13px; }
  .todo-item.done .todo-text { text-decoration: line-through; color: var(--text-muted); }
  .todo-priority { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 500; }
  .tp-high { background: var(--red-dim); color: var(--red); }
  .tp-med { background: var(--amber-dim); color: var(--amber); }
  .tp-low { background: var(--blue-dim); color: var(--blue); }
  .todo-del { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 0 2px; line-height: 1; }
  .todo-del:hover { color: var(--red); }

  /* DOCS */
  .docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  .doc-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; cursor: pointer;
    transition: all 0.15s; display: flex; flex-direction: column;
    min-height: 130px;
  }
  .doc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .doc-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .doc-type-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
  }
  .doc-card-name { font-size: 13px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .doc-card-preview {
    font-size: 11px; color: var(--text-muted); flex: 1;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    margin-bottom: 10px; line-height: 1.5;
  }
  .doc-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
  .doc-link-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--accent);
    padding: 3px 8px; border-radius: 6px; background: var(--accent-dim);
    border: none; cursor: pointer; font-family: var(--font);
    transition: background 0.12s;
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .doc-link-btn:hover { background: rgba(124,106,247,0.28); }
  .doc-file-badge { font-size: 10px; color: var(--text-muted); background: var(--bg-tertiary); padding: 2px 7px; border-radius: 20px; }
  .doc-add-card {
    background: transparent; border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg); cursor: pointer;
    transition: all 0.15s; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: var(--text-muted); min-height: 130px; font-size: 13px; font-family: var(--font);
  }
  .doc-add-card:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--text-primary); }
  .drop-zone-active { border-color: var(--accent) !important; background: var(--accent-dim) !important; color: var(--accent) !important; }

  /* MODAL */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
  }
  .modal-box {
    background: var(--bg-card); border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); padding: 28px; width: 500px;
    max-width: 95vw; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  }
  .modal-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 22px; }
  .field { margin-bottom: 16px; }
  .field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
  .field input, .field select, .field textarea {
    width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); padding: 9px 12px;
    color: var(--text-primary); font-family: var(--font); font-size: 13px; outline: none;
    transition: border-color 0.15s;
  }
  .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
  .field select option { background: var(--bg-secondary); }
  .field textarea { resize: vertical; min-height: 90px; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .roles-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .role-check-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 13px; transition: background 0.1s;
  }
  .role-check-item:hover { background: var(--bg-hover); }
  .role-check-item input { accent-color: var(--accent); cursor: pointer; }
  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }

  /* UNDO BAR */
  #undo-bar {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--bg-card); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); padding: 10px 18px;
    display: flex; align-items: center; gap: 14px;
    font-size: 13px; z-index: 900;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0; pointer-events: none;
    transform: translateX(-50%) translateY(10px);
  }
  #undo-bar.visible { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
  .undo-btn { background: var(--accent); border: none; border-radius: var(--radius-sm); padding: 4px 12px; cursor: pointer; color: #fff; font-size: 12px; font-family: var(--font); font-weight: 500; }

  /* DOC VIEWER */
  .doc-viewer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 600; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
  .doc-viewer-box { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-xl); width: 880px; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
  .doc-viewer-box.wide { width: 96vw; height: 92vh; }
  .doc-viewer-header { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
  .doc-viewer-title { font-size: 15px; font-weight: 600; }
  .doc-viewer-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
  .doc-viewer-body textarea { width: 100%; height: 100%; background: transparent; border: none; outline: none; color: var(--text-primary); font-family: var(--mono); font-size: 13px; resize: none; line-height: 1.7; padding: 22px; }
  .doc-viewer-body iframe { width: 100%; height: 100%; border: none; background: #fff; }
  .doc-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; margin: auto; padding: 16px; }
  .doc-viewer-body .img-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: auto; background: #111; }
  .doc-viewer-body .audio-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 20px; }
  .doc-viewer-body audio, .doc-viewer-body video { width: 90%; max-width: 700px; border-radius: 10px; outline: none; }
  .doc-viewer-body video { max-height: 70vh; }
  .doc-viewer-body .unsupported-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; color: var(--text-secondary); }
  .doc-viewer-footer { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

  /* EMPTY STATES */
  .empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); }
  .empty-icon { font-size: 36px; margin-bottom: 12px; }
  .empty-text { font-size: 14px; }

  /* TAGS CUSTOM */
  .tags-section { margin-top: 8px; }
  .tag-custom { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: var(--bg-tertiary); color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; }

  .export-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

  /* EVENTS */
  .evt-type-meeting { background: rgba(96,165,250,0.18); color: var(--blue); }
  .evt-type-milestone { background: rgba(124,106,247,0.18); color: var(--accent); }
  .evt-type-deadline { background: rgba(248,113,113,0.18); color: var(--red); }
  .evt-type-review { background: rgba(45,212,191,0.18); color: var(--teal); }
  .evt-type-other { background: rgba(140,140,160,0.15); color: var(--text-secondary); }
  .evt-dot-meeting { background: var(--blue); }
  .evt-dot-milestone { background: var(--accent); }
  .evt-dot-deadline { background: var(--red); }
  .evt-dot-review { background: var(--teal); }
  .evt-dot-other { background: var(--text-muted); }
  .upcoming-evt {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
  }
  .upcoming-evt:last-child { border-bottom: none; }
  .evt-date-badge {
    width: 40px; text-align: center; flex-shrink: 0;
  }
  .evt-date-day { font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
  .evt-date-mon { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
  .evt-info { flex: 1; }
  .evt-info-name { font-size: 13px; font-weight: 500; }
  .evt-info-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .cal-evt-event {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    margin-bottom: 2px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; cursor: pointer; font-weight: 500;
    border-left: 2px solid rgba(255,255,255,0.4);
  }

/* ===================== SOUND LIST ===================== */
.sound-player-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 10px 16px;
  margin-bottom: 16px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.spb-info { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.spb-icon { font-size: 22px; }
.spb-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.spb-cat  { font-size: 11px; color: var(--text-muted); }

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sound-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.15s;
}
.sound-card:hover { border-color: var(--border-strong); }
.sound-card-top { display: flex; align-items: center; gap: 12px; }
.sound-waveform {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sound-icon { font-size: 20px; }
.sound-card-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sound-card-sub  { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.sound-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.sound-card-footer {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sound-play-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-md);
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-glow); cursor: pointer;
  font-size: 12px; font-family: var(--font); font-weight: 500;
  transition: all 0.12s;
}
.sound-play-btn:hover { background: var(--accent); color: #fff; }
.sound-status-select {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 7px;
  color: var(--text-primary); font-family: var(--font);
  font-size: 11px; cursor: pointer; outline: none;
}

/* Save indicator pulse */
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}
