/* ═══════════════════════════════════════════════════
   MUSIC API — Extreme Professional Admin Dashboard
   ═══════════════════════════════════════════════════ */
:root {
  --paper: #faf8f5;
  --paper-deep: #f2ece1;
  --cream: #e8dfcf;
  --gold: #b98a35;
  --gold-deep: #8a6524;
  --gold-light: #d8b76a;
  --emerald: #142a20;
  --emerald-soft: #234837;
  --emerald-glow: rgba(35, 72, 55, 0.15);
  --ink: #1c1813;
  --ink-soft: #4d4437;
  --ink-faint: #877b6a;
  --white: #ffffff;
  --danger: #d93838;
  --danger-soft: rgba(217, 56, 56, 0.1);
  --success: #1f8a4c;
  --success-soft: rgba(31, 138, 76, 0.12);
  --warning: #c28212;
  --warning-soft: rgba(194, 130, 18, 0.12);
  --border: rgba(185, 138, 53, 0.22);
  --font-title: 'Cinzel', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.14);
}

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

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--paper-deep);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Screen ── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Login screen ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 20%, #1f3d2f 0%, #0d1a13 80%);
}

.login-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(185, 138, 53, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-badge {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

h1.login-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--emerald);
  font-weight: 600;
}

/* ── Topbar ── */
.topbar {
  background: var(--emerald);
  color: var(--white);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 1.4rem;
}

.brand-text h2 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: #bbf7d0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-email-tag {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.btn-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

/* ── Navigation Tabs ── */
.nav-tabs-bar {
  background: var(--white);
  border-bottom: 1px solid var(--cream);
  padding: 0 28px;
  display: flex;
  gap: 8px;
  position: sticky;
  top: 61px;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 16px 18px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--emerald);
}

.tab-btn.active {
  color: var(--gold-deep);
  border-bottom-color: var(--gold);
}

.tab-count {
  background: var(--paper-deep);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  color: var(--ink);
}

/* ── Main Layout ── */
main.admin-main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── KPI Stats Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--emerald-glow);
  color: var(--emerald);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-val {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--emerald);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ── Action Toolbar ── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  width: min(100%, 340px);
  box-shadow: var(--shadow-sm);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
  color: var(--ink);
}

.filter-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-pill {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s;
}

.filter-pill.active, .filter-pill:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--white);
}

/* ── Primary Action Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(185, 138, 53, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(185, 138, 53, 0.45);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: rgba(185, 138, 53, 0.05);
}

.btn-danger {
  background: var(--danger-soft);
  border: 1px solid rgba(217, 56, 56, 0.3);
  color: var(--danger);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ── Content Card / Tables ── */
.table-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #fbf9f4;
  border-bottom: 1px solid var(--cream);
  padding: 14px 18px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 700;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream);
  font-size: 0.88rem;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(185, 138, 53, 0.02);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-active {
  background: var(--success-soft);
  color: var(--success);
}

.badge-paused {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-archived {
  background: rgba(100, 100, 100, 0.1);
  color: #666;
}

.badge-user {
  background: var(--emerald-glow);
  color: var(--emerald);
  font-family: monospace;
}

/* ── Drawer / Slide-over Modal ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  transition: opacity 0.25s ease;
}

.drawer {
  background: var(--white);
  width: min(100%, 820px);
  max-width: 95vw;
  height: 100vh;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.drawer-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-head h4 {
  font-family: var(--font-title);
  font-size: 0.92rem;
  color: var(--emerald);
  letter-spacing: 0.04em;
}

/* ── Card Tracks inside Drawer ── */
.drawer-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--cream);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.15s;
}

.drawer-track-item:hover {
  border-color: var(--gold);
}

.track-play-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.track-info-sm {
  flex: 1;
  min-width: 0;
}

.track-title-sm {
  font-weight: 600;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-sub-sm {
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* ── Standard Dialog Modal ── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dialog {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── 3-Dot Button & Card Name Click ── */
.btn-dots {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-dots:hover {
  background: var(--paper-deep);
  border-color: var(--gold);
  color: var(--gold-deep);
}

.card-name-click {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.15s ease;
}

.card-name-click:hover .card-link-title {
  color: var(--gold-deep) !important;
  text-decoration: underline !important;
}

.card-name-click:active {
  transform: scale(0.98);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--emerald);
  border: 1px solid var(--gold);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Mobile Responsive Helpers ── */
.track-meta-mobile {
  display: none;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 3px;
}

@media (max-width: 768px) {
  /* Prevent iOS automatic input zoom by enforcing 16px font */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Responsive screen wrappers */
  .login-wrap {
    padding: 16px 12px;
  }
  .login-card {
    padding: 28px 18px;
    width: 100%;
    border-radius: 16px;
  }
  h1.login-title {
    font-size: 1.35rem;
  }

  /* Responsive Topbar */
  .topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-brand {
    gap: 8px;
  }
  .topbar-brand .brand-text h2 {
    font-size: 0.95rem;
  }
  .brand-icon {
    font-size: 1.2rem;
  }
  .status-indicator {
    padding: 2px 7px;
    font-size: 0.68rem;
  }
  .topbar-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .admin-email-tag {
    display: none; /* Hide long email address on smartphones */
  }
  .btn-pill {
    padding: 5px 9px;
    font-size: 0.72rem;
    min-height: 32px;
  }

  /* Responsive Navigation Tabs */
  .nav-tabs-bar {
    padding: 0 10px;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--cream);
    gap: 4px;
  }
  .nav-tabs-bar::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    padding: 10px 12px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  /* Main container */
  main.admin-main {
    padding: 14px 10px 60px;
  }

  /* KPI Grid */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .kpi-card {
    padding: 12px 10px;
    gap: 10px;
    border-radius: 12px;
  }
  .kpi-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    border-radius: 8px;
  }
  .kpi-val {
    font-size: 1.25rem;
  }
  .kpi-label {
    font-size: 0.66rem;
  }

  /* Action Bar & Search */
  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-box {
    width: 100% !important;
    max-width: none !important;
  }
  .filter-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
    width: 100%;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  .action-bar .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  /* Dedicated Card Files Banner & Toolbar */
  .card-banner-responsive {
    padding: 14px 12px !important;
  }
  .card-banner-inner {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .cf-banner-meta {
    gap: 6px 10px !important;
    font-size: 0.78rem !important;
  }
  .cf-banner-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .cf-banner-actions button {
    justify-content: center !important;
    min-height: 40px !important;
    font-size: 0.78rem !important;
  }
  .cf-banner-actions #cf-btn-dots {
    width: 100% !important;
    height: 40px !important;
  }

  .cf-toolbar-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .cf-toolbar-wrap > div:first-child {
    max-width: none !important;
    width: 100% !important;
  }
  .cf-toolbar-btns {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }
  .cf-toolbar-btns button {
    flex: 1 !important;
    min-height: 40px !important;
    justify-content: center !important;
  }

  /* Batch Toolbars */
  .batch-bar-responsive {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  .batch-bar-responsive > div:last-child {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .batch-bar-responsive button {
    flex: 1 !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  /* Responsive Tables */
  .data-table th, .data-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
  .col-hide-sm {
    display: none !important;
  }
  .track-meta-mobile {
    display: block !important;
  }

  /* Drawer */
  .drawer {
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 18px 18px 0 0;
  }
  .drawer-header {
    padding: 14px 16px;
  }
  .drawer-body {
    padding: 16px 14px 40px;
  }

  /* Dialogs / Modals — Mobile Bottom Sheet on phone screens */
  .dialog-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    touch-action: pan-y !important;
  }
  .dialog {
    width: 100% !important;
    max-width: 100vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    padding: 12px 14px 24px !important;
    border-radius: 20px 20px 0 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .sheet-drag-pill {
    display: block !important;
  }
  /* Dedicated scroll container for long option lists */
  .scrollable-options-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    padding-right: 2px !important;
    margin-top: 4px !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--gold) rgba(0, 0, 0, 0.05) !important;
  }
  .scrollable-options-list::-webkit-scrollbar {
    width: 5px !important;
    display: block !important;
  }
  .scrollable-options-list::-webkit-scrollbar-thumb {
    background: var(--gold) !important;
    border-radius: 4px !important;
  }
  .scrollable-options-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 4px !important;
  }

  /* Compact 3-Dot Card Menu Items on Mobile */
  .card-menu-item {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: 10px !important;
    touch-action: pan-y !important;
    min-height: 48px !important;
  }
  .card-menu-item > span:first-child,
  .card-menu-item > div:first-child > span:first-child {
    font-size: 1.15rem !important;
    width: 24px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
  }
  .card-menu-item > div > div:first-child {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
  .card-menu-item > div > div:last-child {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    margin-top: 2px !important;
  }
  .card-menu-item .badge {
    font-size: 0.68rem !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }
  .dialog-actions {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 14px !important;
  }
  .dialog-actions button,
  .dialog-actions a,
  .dialog-actions-subgroup button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 44px !important;
    font-size: 0.88rem !important;
  }
  .dialog-actions-subgroup {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .card-apikey-input-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .card-apikey-btn-group {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .card-apikey-btn-group button {
    flex: 1 !important;
    min-height: 42px !important;
    justify-content: center !important;
  }
  .dialog pre,
  .dialog code {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    white-space: pre-wrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

.sheet-drag-pill {
  width: 38px;
  height: 4px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  margin: 0 auto 10px;
  display: none;
}
body.modal-open {
  overflow: hidden !important;
  touch-action: none !important;
}
.scrollable-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-apikey-input-row {
  display: flex;
  gap: 8px;
}
.card-apikey-btn-group {
  display: flex;
  gap: 8px;
}
.dialog-actions-subgroup {
  display: flex;
  gap: 8px;
}

@media (max-width: 480px) {
  .col-hide-xs {
    display: none !important;
  }
  .data-table th, .data-table td {
    padding: 8px 6px;
    font-size: 0.76rem;
  }
  .btn-dots {
    width: 36px;
    height: 36px;
  }
  .track-play-sm {
    width: 32px;
    height: 32px;
  }
}

/* ── Tick Squares (Checkboxes) ── */
.tick-square {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  border-radius: 4px;
}

/* ── Storage Base & Folder View ── */
.storage-base-header {
  background: var(--paper);
  border: 1px solid var(--cream);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-folder-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-icon {
  font-size: 1.5rem;
}

.folder-path-wrap {
  display: flex;
  flex-direction: column;
}

.folder-path-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 700;
}

.folder-path {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--gold-deep);
  font-weight: 600;
  word-break: break-all;
}

.storage-base-stats {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--cream);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--cream);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

tr.selected,
.drawer-track-item.selected {
  background: #fff7eb !important;
  border-color: var(--gold) !important;
}

.file-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.file-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--cream);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--emerald);
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.file-option-item:hover {
  background: #fff;
  border-color: var(--gold);
  transform: translateX(4px);
}

.file-option-item.danger {
  color: var(--danger);
  border-color: rgba(217, 56, 56, 0.2);
}

/* ── Card 3-Dot Facility Menu Items ── */
.card-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--cream);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--emerald);
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.card-menu-item:hover {
  background: #fff;
  border-color: var(--gold);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.card-menu-item.danger {
  color: var(--danger);
  border-color: rgba(217, 56, 56, 0.2);
}

.card-menu-item.danger:hover {
  background: #fff5f5;
  border-color: var(--danger);
}
