/* ============================================================
   DYNOTIC COLLECTIVE — Global Stylesheet v2.0
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8f9fa; color: #111827; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: inherit; }
::placeholder { color: #9ca3af; opacity: 1; }
img { max-width: 100%; }
:root {
  --primary: #000000;
  --primary-hover: #1f2937;
  --surface: #ffffff;
  --bg: #f8f9fa;
  --border: #e5e7eb;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --danger: #ef4444;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --shadow: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { line-height: 1.6; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  padding: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 600;
  border: 1px solid transparent; border-radius: 0.5rem; cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-black    { background: #111827; color: white; border-color: #111827; }
.btn-black:hover { background: #1f2937; }
.btn-outline  { background: transparent; color: #111827; border-color: #d1d5db; }
.btn-outline:hover { background: #f9fafb; }
.btn-success  { background: #059669; color: white; border-color: #059669; }
.btn-success:hover { background: #047857; }
.btn-danger   { background: #dc2626; color: white; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-rounded  { border-radius: 9999px; }
.btn-full     { width: 100%; }
.btn-h12      { height: 3rem; font-size: 1rem; }
.btn-sm       { padding: 0.3rem 0.75rem; font-size: 0.75rem; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group   { margin-bottom: 1rem; }
.form-label   { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.375rem; }
.required     { color: #ef4444; }
.input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem; font-size: 0.875rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; background: white; color: #111827;
}
.input:focus  { border-color: #111827; box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.input-relative { position: relative; }
.input-icon-right {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #9ca3af; cursor: pointer; padding: 0.25rem;
}
select.input  { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }

/* ── Badges ───────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0.2rem 0.625rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-success  { background: #dcfce7; color: #166534; }
.badge-process  { background: #dbeafe; color: #1e40af; font-weight: 700; }
.badge-release  { background: #dcfce7; color: #166534; font-weight: 700; }
.badge-already_aired { background: #dbeafe; color: #3B82F6; font-weight: 700; border: 1px solid #bfdbfe; }
.badge-takedown_requested { background: #ffedd5; color: #9a3412; font-weight: 700; }
.badge-takedown { background: #f3f4f6; color: #4b5563; font-weight: 700; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-warning  { background: #fef9c3; color: #854d0e; }
.badge-urgent   { background: #fee2e2; color: #991b1b; }

/* ── Cards ────────────────────────────────────────────────── */
.card        { background: white; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-body   { padding: 1.25rem; }

/* ── Toast ────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast {
  background: #111827; color: white; padding: 0.75rem 1rem; border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 500; pointer-events: auto; display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: toastSlideIn 0.25s ease; max-width: 320px;
}
.toast.success { background: #059669; }
.toast.error   { background: #dc2626; }
.toast.warning { background: #d97706; }
@keyframes toastSlideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner { width: 1.5rem; height: 1.5rem; border: 2.5px solid #e5e7eb; border-top-color: #111827; border-radius: 50%; animation: spin 0.65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; align-items: center; padding: 3rem; }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-sheet {
  background: white; border-radius: 1.5rem 1.5rem 0 0; padding: 1.5rem;
  width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }

/* Dialog (centered) */
.dialog-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s; backdrop-filter: blur(2px);
}
.dialog-overlay.open { opacity: 1; pointer-events: auto; }
.dialog-box {
  background: white; border-radius: 1rem; padding: 1.5rem; width: 100%; max-width: 420px;
  max-height: 90dvh; overflow-y: auto;
  transform: scale(0.9); transition: transform 0.2s;
}
.dialog-overlay.open .dialog-box { transform: scale(1); }
.dialog-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Drawer ───────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px; background: white; border-radius: 1.5rem 1.5rem 0 0;
  z-index: 401; max-height: 80dvh; display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.drawer.open { transform: translateX(-50%) translateY(0); }
.drawer-handle { padding: 0.75rem; display: flex; justify-content: center; }
.drawer-handle div { width: 2.5rem; height: 4px; background: #d1d5db; border-radius: 9999px; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 0 1rem 0.75rem; }
.drawer-header h2 { font-size: 1rem; font-weight: 700; }
.notif-list { flex: 1; overflow-y: auto; padding: 0 1rem 1rem; }

/* ── Notifications ────────────────────────────────────────── */
.notif-item { display: flex; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-dot  { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #111827; flex-shrink: 0; margin-top: 0.35rem; }
.notif-body { flex: 1; }
.notif-title{ font-size: 0.875rem; font-weight: 600; margin-bottom: 0.125rem; }
.notif-msg  { font-size: 0.8rem; color: #6b7280; line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: #9ca3af; margin-top: 0.25rem; }
.notif-bell { position: relative; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0.375rem; }
.notif-badge { position: absolute; top: -2px; right: -2px; background: #ef4444; color: white; font-size: 0.6rem; font-weight: 700; border-radius: 50%; width: 1rem; height: 1rem; display: flex; align-items: center; justify-content: center; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; color: #9ca3af; text-align: center; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 0.875rem; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page { min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center; background: #f0f2f5; padding: 2rem 1rem; }
.auth-card { background: white; border-radius: 1.5rem; padding: 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-md); margin-top: 2rem; }
.auth-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 1.75rem; gap: 0.75rem; }
.auth-logo h1 { font-size: 1.25rem; font-weight: 700; }
.auth-logo-box { width: 4rem; height: 4rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.5rem; overflow: hidden; }
.auth-logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }

/* ── Landing Page ─────────────────────────────────────────── */
.landing-bg { min-height: 100dvh; background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%); color: white; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.logo-wrap   { display: flex; align-items: center; gap: 0.625rem; font-weight: 700; font-size: 1.05rem; }
.logo-box    { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.25rem; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.landing-hero { text-align: center; padding: 5rem 1.5rem 3rem; max-width: 800px; margin: 0 auto; }
.landing-hero h1 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; background: linear-gradient(135deg, #ffffff, #a5b4fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.landing-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.7); margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary-landing { background: white; color: #0f172a; padding: 0.875rem 2rem; border-radius: 9999px; font-weight: 700; font-size: 1rem; transition: transform 0.15s, box-shadow 0.15s; }
.btn-primary-landing:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.2); }
.btn-outline-landing  { border: 2px solid rgba(255,255,255,0.3); color: white; padding: 0.875rem 2rem; border-radius: 9999px; font-weight: 600; font-size: 1rem; transition: background 0.15s; }
.btn-outline-landing:hover { background: rgba(255,255,255,0.1); }
.platforms { text-align: center; padding: 2rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.platforms p { font-size: 0.875rem; color: rgba(255,255,255,0.4); margin-bottom: 1rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.platforms-icons { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; color: rgba(255,255,255,0.6); font-size: 2rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feature-card  { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; padding: 1.5rem; }
.feature-card h3 { font-weight: 700; margin-bottom: 0.375rem; }
.feature-card p  { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.pricing-card  { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 1.25rem; padding: 2rem; text-align: center; }
.pricing-card .badge { background: rgba(165,180,252,0.15); color: #a5b4fc; margin-bottom: 1rem; font-size: 0.8rem; }

/* ── App Layout (Mobile) ──────────────────────────────────── */
.app-layout   { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.page-content { padding: 0 1rem 5.5rem; }
.page-header  { padding: 1rem 0; }

/* ── Bottom Navigation ────────────────────────────────────── */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: white; border-top: 1px solid var(--border); display: flex; z-index: 300; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav.hidden-by-drawer { display: none !important; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.625rem 0; gap: 0.2rem; color: #9ca3af; font-size: 0.65rem; font-weight: 500; border: none; background: none; cursor: pointer; transition: color 0.15s; }
.nav-item i { font-size: 1.25rem; }
.nav-item.active { color: #111827; }
.nav-item.active i { font-weight: 900; }

/* ── Home / Dashboard ─────────────────────────────────────── */
.home-header  { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0 0.75rem; }
.wallet-card  { background: white; border-radius: 1.25rem; padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.wallet-balance { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.25rem; }
.tools-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tool-card    { background: white; border-radius: 1rem; padding: 1rem; border: 1px solid var(--border); cursor: pointer; transition: box-shadow 0.15s, transform 0.1s; display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.tool-card.available i { font-size: 1.5rem; }
.tool-card.disabled { opacity: 0.5; cursor: not-allowed; }
.tool-card.available:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tool-name    { font-size: 0.8rem; font-weight: 600; color: #111827; }
.coming-soon  { font-size: 0.65rem; color: #9ca3af; font-weight: 500; background: #f3f4f6; padding: 0.125rem 0.5rem; border-radius: 9999px; }

/* ── Releases ─────────────────────────────────────────────── */
.search-wrap  { position: relative; display: flex; align-items: center; }
.search-wrap i { position: absolute; left: 0.875rem; color: #9ca3af; font-size: 0.875rem; pointer-events: none; }
.search-wrap .input { padding-left: 2.5rem; }
.filter-btn   { padding: 0.35rem 1rem; border-radius: 9999px; border: 1.5px solid var(--border); background: white; font-size: 0.75rem; font-weight: 600; color: #6b7280; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.filter-btn.active { background: #111827; color: white; border-color: #111827; }
.release-card { display: flex; align-items: center; gap: 0.875rem; background: white; border-radius: 0.875rem; padding: 0.875rem; border: 1px solid var(--border); margin-bottom: 0.625rem; cursor: pointer; transition: box-shadow 0.15s; }
.release-card:hover { box-shadow: var(--shadow-md); }
.release-cover { width: 3.25rem; height: 3.25rem; border-radius: 0.625rem; background: #f3f4f6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.release-info  { flex: 1; min-width: 0; }
.release-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release-artist{ font-size: 0.8rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.125rem; }
.release-meta  { font-size: 0.7rem; color: #9ca3af; margin-top: 0.125rem; }

/* ── Create Release ───────────────────────────────────────── */
.type-card { background: white; border-radius: 1.25rem; padding: 1.25rem; border: 2px solid var(--border); cursor: pointer; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; width: 100%; }
.type-card:hover { border-color: #111827; box-shadow: var(--shadow-md); }

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px; background: white;
  border-right: 1px solid var(--border); z-index: 400; display: flex; flex-direction: column;
  transition: transform 0.3s;
}
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-nav  { flex: 1; overflow-y: auto; padding: 0.75rem 0.5rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.625rem; font-size: 0.875rem; font-weight: 500; color: #6b7280; transition: all 0.15s; margin-bottom: 0.125rem; }
.sidebar-link:hover { background: #f3f4f6; color: #111827; }
.sidebar-link.active  { background: #111827; color: white; }
.sidebar-link.active:hover { background: #1f2937; }
.sidebar-link i { width: 1.25rem; text-align: center; font-size: 0.875rem; }
.sidebar-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  line-height: 1;
}
.sidebar-link.active .sidebar-badge { background: #fff; color: #ef4444; }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 399; }
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay.open { display: block; }
}
.admin-main    { margin-left: 240px; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
@media (max-width: 768px) { .admin-main { margin-left: 0; } }
.admin-header  { background: white; border-bottom: 1px solid var(--border); padding: 0.875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.admin-content { flex: 1; padding: 1.5rem; max-width: 1400px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead th { background: #f9fafb; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafafa; }
.admin-table thead th:first-child { border-radius: 0.5rem 0 0 0; }
.admin-table thead th:last-child  { border-radius: 0 0.5rem 0 0; }

/* ── Dynamic Branding ─────────────────────────────────────── */
.dynamic-primary-bg { background: var(--primary) !important; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Responsive Utilities ─────────────────────────────────── */
@media (max-width: 480px) {
  .admin-content { padding: 1rem; }
  .wallet-balance { font-size: 1.5rem; }
}

/* ── Google Fonts import suggestion (add to HTML head) ──── */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap'); */

/* ══════════════════════════════════════════════════════════
   DYNOTIC ANIMATIONS v1.0 — Pure CSS + Vanilla JS
   ══════════════════════════════════════════════════════════ */

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes fadeInUp   { from { opacity:0; transform:translateY(24px); }  to { opacity:1; transform:translateY(0); } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn     { from { opacity:0; } to { opacity:1; } }
@keyframes slideInL   { from { opacity:0; transform:translateX(-32px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideInR   { from { opacity:0; transform:translateX(32px); }  to { opacity:1; transform:translateX(0); } }
@keyframes scaleIn    { from { opacity:0; transform:scale(0.93); }       to { opacity:1; transform:scale(1); } }
@keyframes bounceIn   { 0%{transform:scale(0);opacity:0;} 60%{transform:scale(1.15);opacity:1;} 100%{transform:scale(1);} }
@keyframes slideOutL  { from { opacity:1; transform:translateX(0); }     to { opacity:0; transform:translateX(-24px); } }
@keyframes pulseBorder{ 0%,100%{border-color:#e5e7eb;} 50%{border-color:#9ca3af;} }
@keyframes pulseRedGlow{ 0%,100%{box-shadow:none;} 50%{box-shadow:0 0 14px rgba(239,68,68,0.35);} }


/* ── Page Transition Overlay ────────────────────────────── */
#page-transition-overlay {
  position:fixed; inset:0; background:#f8f9fa; opacity:0;
  pointer-events:none; z-index:9998; transition:opacity 0.2s ease;
}
#page-transition-overlay.fading { opacity:1; pointer-events:auto; }
body { animation: fadeIn 0.25s ease both; }

/* ── Scroll Reveal ──────────────────────────────────────── */
.scroll-reveal { opacity:0; transform:translateY(24px); transition:opacity 0.5s ease, transform 0.5s ease; }
.scroll-reveal.revealed { opacity:1; transform:translateY(0); }

/* ── Utility Animation Classes ──────────────────────────── */
.anim-fade-up    { animation: fadeInUp   0.45s ease both; }
.anim-fade-in    { animation: fadeIn     0.45s ease both; }
.anim-slide-left { animation: slideInL   0.45s ease both; }
.anim-slide-right{ animation: slideInR   0.45s ease both; }
.anim-slide-down { animation: fadeInDown 0.4s ease both; }
.anim-scale-in   { animation: scaleIn    0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-bounce-in  { animation: bounceIn   0.5s cubic-bezier(0.34,1.56,0.64,1) both; }

.anim-d1 { animation-delay:0.10s; } .anim-d2 { animation-delay:0.20s; }
.anim-d3 { animation-delay:0.30s; } .anim-d4 { animation-delay:0.40s; }
.anim-d5 { animation-delay:0.50s; } .anim-d6 { animation-delay:0.60s; }

/* ── ANIM-1: Landing Page ───────────────────────────────── */
.hero-h1  { animation: fadeInUp 0.55s ease both; }
.hero-sub { animation: fadeInUp 0.55s ease both; animation-delay:0.3s; }
.hero-cta { animation: fadeInUp 0.55s ease both; animation-delay:0.5s; }
.hero-fine{ animation: fadeIn   0.5s ease both;  animation-delay:0.7s; }

.plat-icon { opacity:0; animation: fadeIn 0.4s ease forwards; }
.plat-icon:nth-child(1){animation-delay:0.6s;} .plat-icon:nth-child(2){animation-delay:0.75s;}
.plat-icon:nth-child(3){animation-delay:0.9s;} .plat-icon:nth-child(4){animation-delay:1.05s;}
.plat-icon:nth-child(5){animation-delay:1.2s;} .plat-icon:nth-child(6){animation-delay:1.35s;}

/* ── ANIM-2: Login Card ─────────────────────────────────── */
.auth-card { animation: scaleIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.btn-black:hover:not(:disabled) { transform:scale(1.02) !important; }
.btn-black:active:not(:disabled){ transform:scale(0.97) !important; }
.btn-black { transition: background 0.15s, transform 0.13s ease !important; }

/* ── ANIM-3: Dashboard ──────────────────────────────────── */
.wallet-card { animation: slideInL 0.45s ease both; }
.tool-card-anim { opacity:0; transform:translateY(16px); transition:opacity 0.35s ease, transform 0.35s ease; }
.tool-card-anim.visible { opacity:1; transform:translateY(0); }

/* ── ANIM-4: Bottom Nav active indicator ────────────────── */
.nav-item { position:relative; overflow:hidden; }
.nav-item::after {
  content:''; position:absolute; bottom:0; left:50%;
  width:0; height:2.5px; background:#111827; border-radius:9999px;
  transform:translateX(-50%); transition:width 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-item.active::after { width:1.5rem; }
.nav-item i { transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1); }
.nav-item.active i { transform: scale(1.2); }

/* ── ANIM-5: Releases ───────────────────────────────────── */
.create-release-bar { animation: fadeInDown 0.4s ease both; }
.release-card-anim  { opacity:0; transform:translateY(14px); transition:opacity 0.32s ease, transform 0.32s ease; }
.release-card-anim.visible { opacity:1; transform:translateY(0); }
.fab-create i { transition: transform 0.25s ease; }
.fab-create:hover i { transform: rotate(90deg); }

/* ── ANIM-6: Choose Type Cards ──────────────────────────── */
.type-card { transition: border-color 0.15s, box-shadow 0.15s, transform 0.2s ease !important; }
.type-card:hover { transform:scale(1.02) translateY(-2px) !important; box-shadow:0 8px 24px rgba(0,0,0,0.12) !important; }

/* ── ANIM-7: Step transition ────────────────────────────── */
.step-enter { animation: slideInR 0.32s ease both; }
.step-exit  { animation: slideOutL 0.22s ease both; }

/* Input focus glow */
.input:focus {
  border-color:#111827 !important;
  box-shadow:0 0 0 3px rgba(17,24,39,0.09), 0 0 14px rgba(17,24,39,0.05) !important;
  transition: border-color 0.2s, box-shadow 0.25s !important;
}

/* ── ANIM-8: Upload area pulse ──────────────────────────── */
.upload-pulse { animation: pulseBorder 2s ease-in-out infinite; }
#cover-progress-bar, #audio-progress-bar { transition: width 0.35s ease !important; }

/* ── ANIM-9: Modals / Sheets / Notifications ────────────── */
.drawer-overlay { opacity:0; transition: opacity 0.25s ease; }
.drawer-overlay.open { display:block; opacity:1; }
.notif-item { animation: fadeInUp 0.3s ease both; }
.notif-item:nth-child(1){animation-delay:0.02s;} .notif-item:nth-child(2){animation-delay:0.06s;}
.notif-item:nth-child(3){animation-delay:0.10s;} .notif-item:nth-child(4){animation-delay:0.14s;}
.notif-item:nth-child(5){animation-delay:0.18s;} .notif-item:nth-child(6){animation-delay:0.22s;}

/* ── ANIM-10: Account Page ──────────────────────────────── */
.account-card-left  { animation: slideInL 0.45s ease both; }
.account-card-right { animation: slideInR 0.45s ease both; animation-delay:0.1s; }
.edit-icon-btn { transition: transform 0.25s ease !important; }
.edit-icon-btn.rotated { transform: rotate(15deg) !important; }
.logout-btn:hover { animation: pulseRedGlow 1.2s ease infinite; }

/* ══════════════════════════════════════════════════════════
   DESKTOP LAYOUT — min-width: 768px
   Semua perubahan ini hanya berlaku di layar >= 768px.
   Tampilan mobile (< 768px) tidak terpengaruh sama sekali.
   ══════════════════════════════════════════════════════════ */

/* ── Desktop Sidebar — sembunyikan di mobile ─────────────── */
.desktop-sidebar { display: none; }

@media (min-width: 768px) {

  /* ── 1. App Layout: 2 kolom, sidebar kiri + konten kanan ── */
  .app-layout {
    max-width: 960px;
    margin-left: 220px;
    margin-right: auto;
  }

  /* ── 2. Sembunyikan bottom navigation di desktop ─────────── */
  .bottom-nav { display: none !important; }

  /* ── 3. Page Content: hapus padding-bottom bottom-nav ───── */
  .page-content { padding-bottom: 2rem; }

  /* ── 4. Desktop Sidebar ──────────────────────────────────── */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border);
    z-index: 300;
  }

  .desktop-sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .desktop-sidebar .sidebar-logo span {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
  }

  .desktop-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
  }

  .desktop-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.15s;
    margin-bottom: 0.125rem;
    text-decoration: none;
  }

  .desktop-sidebar .sidebar-link:hover {
    background: #f3f4f6;
    color: #111827;
  }

  .desktop-sidebar .sidebar-link.active {
    background: #111827;
    color: white;
  }

  .desktop-sidebar .sidebar-link.active:hover {
    background: #1f2937;
  }

  .desktop-sidebar .sidebar-link i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
  }

}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE AUDIT FIX v3.0 — Full Responsive Design Patch
   Fixes: layout, overflow, touch targets, admin tables,
   tablet/desktop breakpoints, modal responsiveness,
   form usability, and visual consistency
   ══════════════════════════════════════════════════════════ */

/* ── 1. GLOBAL OVERFLOW PREVENTION ─────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── 2. TOUCH TARGET SIZES (min 44×44px) ────────────────── */
.btn,
.nav-item,
.icon-btn,
.back-btn,
.edit-icon-btn,
.notif-bell {
  min-height: 44px;
  min-width: 44px;
}
.btn-sm { min-height: 36px; min-width: 36px; } /* Keep sm smaller but acceptable */
.filter-btn {
  min-height: 36px;
  min-width: unset;
  padding: 0.4rem 1rem;
}

/* ── 3. APP LAYOUT — MOBILE BASE ────────────────────────── */
.app-layout {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* ── 4. PAGE CONTENT: Prevent horizontal bleed ──────────── */
/* PENTING: overflow-x:hidden tanpa overflow-y eksplisit membuat browser
   otomatis menghitung overflow-y jadi "auto" (bukan "visible") sesuai spec
   CSS overflow — efeknya, elemen anak yang position:absolute dan meluas ke
   bawah (mis. dropdown autocomplete Judul Katalog & Song ID Publisher di
   create-release.php) IKUT TERPOTONG/TERSEMBUNYI oleh batas box ini, padahal
   data & JS-nya sendiri sudah benar. overflow-y:visible di bawah ini
   mencegah itu, sementara overflow-x:hidden tetap jalan mencegah scroll
   horizontal yang jadi tujuan awal aturan ini. */
.page-content {
  padding: 0 1rem 5.5rem;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  box-sizing: border-box;
}

/* ── 5. BOTTOM NAV: Prevent icon cut-off ────────────────── */
.bottom-nav {
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}
.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* ── 6. ADMIN LAYOUT: Full responsive ───────────────────── */
@media (max-width: 768px) {
  .admin-content {
    padding: 1rem;
    overflow-x: hidden;
  }
  /* Admin header title truncation */
  .admin-header h1, #page-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
  /* Admin table wrapper enforced */
  .admin-table {
    min-width: 600px;
  }
}

/* Table responsive wrapper — global */
.table-responsive-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

/* ── 7. ADMIN TABLE: Better mobile rendering ────────────── */
.admin-table tbody td {
  font-size: 0.8125rem;
  white-space: nowrap;
}
.admin-table tbody td.wrap {
  white-space: normal;
  min-width: 120px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 8. MODAL RESPONSIVE ─────────────────────────────────── */
@media (max-width: 480px) {
  .modal-sheet {
    padding: 1.25rem 1rem;
    border-radius: 1.25rem 1.25rem 0 0;
  }
  .dialog-box {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
    margin: 0.75rem;
    max-height: 92dvh;
    overflow-y: auto;
  }
  .dialog-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }
}

/* ── 9. FORMS: Better mobile UX ─────────────────────────── */
.input {
  min-height: 44px;
  font-size: 16px !important; /* Prevents iOS zoom on focus */
  -webkit-appearance: none;
}
@media (min-width: 768px) {
  .input {
    font-size: 0.875rem !important;
  }
}
select.input {
  min-height: 44px;
}
textarea.input {
  min-height: 80px;
  resize: vertical;
}

/* ── 10. FILTER BAR: Horizontal scroll without cut-off ──── */
.filter-scroll-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 0 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-scroll-wrap::-webkit-scrollbar { display: none; }
.filter-scroll-wrap .filter-btn {
  flex-shrink: 0;
  min-width: unset;
}

/* ── 11. RELEASE CARDS: Prevent title overflow ───────────── */
.release-info {
  min-width: 0; /* Allow flex child to shrink */
  overflow: hidden;
}
.release-title,
.release-artist,
.release-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── 12. TOAST: Full width on very small screens ─────────── */
@media (max-width: 400px) {
  #toast-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
  }
  .toast {
    max-width: 100%;
    border-radius: 0.625rem;
  }
}

/* ── 13. TOOLS GRID: Better on very small screens ────────── */
@media (max-width: 360px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
.tool-card {
  word-break: break-word;
}

/* ── 14. WALLET CARD: Scale on very small screens ────────── */
@media (max-width: 360px) {
  .wallet-balance {
    font-size: 1.5rem;
  }
  .wallet-card {
    padding: 1.1rem;
  }
}

/* ── 15. LANDING PAGE: Tablet & Desktop ─────────────────── */
@media (min-width: 768px) {
  .landing-hero {
    padding: 6rem 2rem 4rem;
  }
  .landing-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .landing-nav {
    padding: 1.5rem 2rem;
  }
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .platforms-icons {
    gap: 3rem;
    font-size: 2.25rem;
  }
}
@media (max-width: 480px) {
  .landing-hero {
    padding: 3.5rem 1.25rem 2.5rem;
  }
  .landing-hero p {
    font-size: 1rem;
  }
  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  .btn-primary-landing,
  .btn-outline-landing {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  .platforms-icons {
    gap: 1.25rem;
    font-size: 1.75rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 16. AUTH PAGES ─────────────────────────────────────── */
@media (max-width: 400px) {
  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
  }
  .auth-page {
    padding: 1rem 0.75rem;
  }
}

/* ── 17. DESKTOP APP LAYOUT — Tablet ─────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Sidebar collapsed width for tablet */
  .desktop-sidebar {
    width: 72px !important;
  }
  .desktop-sidebar:hover {
    width: 220px !important;
  }
  .app-layout {
    margin-left: 72px !important;
    max-width: calc(100vw - 72px) !important;
  }
  body:has(.desktop-sidebar:hover) .app-layout {
    margin-left: 220px !important;
    max-width: calc(100vw - 220px) !important;
  }
  .page-content {
    max-width: 600px;
  }
}

/* ── 18. DESKTOP APP LAYOUT — Large Desktop ─────────────── */
@media (min-width: 1440px) {
  .app-layout {
    max-width: 760px !important;
  }
  .page-content {
    max-width: 760px;
  }
  .admin-content {
    padding: 2rem;
  }
}

/* ── 19. ADMIN CONTENT: Better large screen layout ───────── */
@media (min-width: 1024px) {
  .admin-content {
    padding: 1.75rem 2rem;
  }
  /* Header actions wrap nicely */
  .admin-header {
    padding: 1rem 1.75rem;
  }
}

/* ── 20. DRAWER: Width cap on tablet+ ───────────────────── */
@media (min-width: 520px) {
  .drawer {
    max-width: 480px;
    left: 50%;
    right: auto;
    border-radius: 1.5rem 1.5rem 0 0;
  }
}

/* ── 21. CREATE RELEASE PAGE: Missing sidebar ───────────── */
.app-layout.no-sidebar {
  margin-left: 0 !important;
  max-width: 480px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .app-layout.no-sidebar {
    margin-left: 72px !important;
    max-width: 560px;
  }
}

/* ── 22. PLATFORM GRID in create-release: Responsive ────── */
@media (max-width: 360px) {
  .platform-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── 23. UPLOAD AREAS: Touch friendly ───────────────────── */
#cover-upload-area,
#audio-upload-area {
  min-height: 120px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
  touch-action: manipulation;
}

/* ── 24. ADMIN HEADER HAMBURGER: Always visible on mobile ── */
@media (max-width: 768px) {
  .admin-header {
    padding: 0.75rem 1rem;
  }
  .admin-header button[onclick*="toggleSidebar"] {
    display: flex !important;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
}

/* ── 25. BADGE overflow prevention ───────────────────────── */
.badge {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 26. CARD BODY: No overflow ─────────────────────────── */
.card-body {
  overflow: hidden;
}

/* ── 27. HEADING HIERARCHY: Responsive type scale ────────── */
@media (max-width: 400px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
}

/* ── 28. EMPTY STATE: Compact on small screens ───────────── */
@media (max-width: 400px) {
  .empty-state {
    padding: 2.5rem 1.5rem;
  }
  .empty-state i {
    font-size: 2rem;
  }
}

/* ── 29. BUTTON GROUP in modals: Stack on tiny screens ───── */
@media (max-width: 350px) {
  .dialog-box .btn,
  .modal-sheet .btn {
    width: 100% !important;
  }
  .dialog-box div[style*="display:flex;gap"] {
    flex-direction: column !important;
  }
}

/* ── 30. SMOOTH FOCUS OUTLINES for accessibility ────────── */
:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 31. SCROLLBAR: Hide horizontal on main content ─────── */
.page-content::-webkit-scrollbar { display: none; }

/* ── 32. TYPOGRAPHY: Fluid line heights ─────────────────── */
@media (max-width: 480px) {
  p { line-height: 1.65; }
}

/* ── 33. ADMIN MAIN: No overflow ─────────────────────────── */
.admin-main {
  overflow-x: hidden;
}

/* ── 34. ULTRA WIDE (1920px+) ─────────────────────────────── */
@media (min-width: 1920px) {
  .admin-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
  }
  .app-layout {
    max-width: 840px !important;
  }
}

/* ── 35. FORM GROUP: Consistent spacing ─────────────────── */
.form-group {
  margin-bottom: 1.1rem;
}
.form-label {
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

/* ── 36. FIX: Overlapping elements in admin header ─────── */
.admin-header {
  gap: 0.75rem;
  flex-wrap: nowrap;
}
#admin-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ── 37. RELEASE CARD: Prevent badge overflow ───────────── */
.release-card {
  align-items: flex-start;
  flex-wrap: nowrap;
  overflow: hidden;
}
@media (max-width: 360px) {
  .release-cover {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* ── 38. KEYBOARD NAV: Improved focus states ────────────── */
.nav-item:focus-visible,
.ds-link:focus-visible,
.sidebar-link:focus-visible {
  outline: 2px solid #111827;
  outline-offset: -2px;
}

/* ── 39. IMAGES: Prevent layout shift ───────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.release-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 40. PRINT: Basic print styles ─────────────────────── */
@media print {
  .bottom-nav,
  .desktop-sidebar,
  .admin-sidebar,
  .drawer,
  #toast-container { display: none !important; }
  .admin-main { margin-left: 0 !important; }
  .admin-content { padding: 0 !important; }
}

/* ── 41. DARK MODE ─────────────────────────────────────────────────────────
   Situs ini banyak memakai inline-style & warna hex langsung (bukan hanya
   var(--...)), jadi supaya Dark Mode benar-benar berlaku konsisten di
   SEMUA halaman (Admin, Artis, & halaman tamu) tanpa menulis ulang ribuan
   baris style satu-per-satu, dipakai teknik "smart invert": seluruh <body>
   di-invert warnanya (filter: invert), lalu elemen yang memang harus tetap
   tampil natural (foto, video, ikon berwarna, dsb) di-invert BALIK supaya
   tampil normal. Hasilnya: teks gelap<->terang otomatis konsisten mengikuti
   seluruh palet warna yang sudah ada, tanpa mengubah desain aslinya.
   Toggle dilakukan lewat atribut data-theme="dark" di <html> — lihat
   includes/theme_lang.php (server) & assets/js/theme-lang.js (client). ── */
html[data-theme="dark"] {
  color-scheme: dark;
  /* Nilai ini adalah kebalikan (invert) dari #15161a — supaya setelah
     difilter di bawah, hasil akhirnya tetap terlihat gelap seperti semula. */
  background: #eae9e5;
  /* PENTING: filter invert HARUS ditaruh di <html> (root element), BUKAN di
     <body>. Elemen mana pun yang punya properti filter/transform/perspective
     akan otomatis menjadi "containing block" baru untuk semua descendant
     position:fixed (spek CSS resmi, bukan bug). Kalau filter ditaruh di
     <body>, maka SEMUA elemen fixed di dalamnya (modal, bottom-nav, sidebar
     desktop, tombol mengambang pref-toggle, toast, dsb.) akan jadi "fixed"
     relatif terhadap kotak <body> (yang tingginya mengikuti panjang konten)
     alih-alih terhadap viewport — itulah sebabnya semuanya salah posisi /
     hancur saat halaman di-scroll. Elemen root <html> dikecualikan dari
     aturan containing-block ini oleh browser, jadi taruh filter di sini agar
     position:fixed tetap normal relatif ke viewport, sementara tampilan
     invert-nya tetap sama persis (filter tetap mewarnai seluruh isi <body>
     di dalamnya, karena <body> adalah descendant dari <html>). */
  filter: invert(1) hue-rotate(180deg);
}

html[data-theme="dark"] body {
  background: #ffffff;
}

/* Elemen yang harus di-invert BALIK (kembali ke tampilan warna asli),
   supaya foto/video/ikon berwarna/logo tidak tampil sebagai negatif. */
html[data-theme="dark"] img,
html[data-theme="dark"] video,
html[data-theme="dark"] svg,
html[data-theme="dark"] iframe,
html[data-theme="dark"] canvas,
html[data-theme="dark"] .no-invert,
html[data-theme="dark"] [style*="background-image"] {
  filter: invert(1) hue-rotate(180deg);
}

html[data-theme="dark"] body,
html body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ── Tombol/Widget toggle Dark Mode & Bahasa (mengambang) ───────────────── */
.pref-toggle-float {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.pref-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.pref-toggle-btn:hover { opacity: 0.88; }
.pref-toggle-btn:active { transform: scale(0.96); }
html[data-theme="dark"] .pref-toggle-float { filter: invert(1) hue-rotate(180deg); }

/* ── Toggle Dark Mode di admin header & account.php ──────────────────── */
.pref-inline-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
}
.pref-inline-toggle .lang-switch {
  display: flex;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 9999px;
  overflow: hidden;
}
.pref-inline-toggle .lang-switch button {
  border: none;
  background: transparent;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: #6b7280;
}
.pref-inline-toggle .lang-switch button.active {
  background: #111827;
  color: #fff;
}
.theme-toggle-btn {
  width: 2.1rem; height: 2.1rem;
  border-radius: 9999px;
  border: 1px solid var(--border, #e5e7eb);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280;
  font-size: 0.9rem;
}
.theme-toggle-btn:hover { background: #f3f4f6; }

