/* public/css/style.css */
:root {
  --bg-body: #0b0f1a;
  --bg-card: #161b2b;
  --primary: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #64748b;
  --border: #2d3748;
}

/* LIGHT MODE OVERRIDES */
.light-mode {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #cbd5e1;
  --bg-sidebar: #ffffff;
}

/* SOFT MODE (EYE-FRIENDLY LIGHT) */
.soft-mode {
  --bg-body: #cbd5e1; /* Abu-abu slate 300 */
  --bg-card: #f1f5f9; /* Slate 100 */
  --text-main: #1e293b; /* Slate 800 */
  --text-muted: #475569;
  --border: #94a3b8;
  --bg-sidebar: #cbd5e1;
}

:root {
  --bg-sidebar: var(--bg-card);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  display: flex; /* Penting agar sidebar dan konten bersandingan */
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR (Dipakai di Dashboard & Profile) */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}

/* NAV MENU (Perbaikan Anda) */
.nav-menu {
  flex-grow: 1;
  margin-top: 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: 0.3s;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: white;
}

.light-mode .nav-item,
.soft-mode .nav-item {
  color: var(--text-main);
}

.light-mode .nav-item:hover,
.soft-mode .nav-item:hover {
  background: var(--border);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  font-weight: bold;
}

/* SUBMENU STYLING */
.nav-group-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin: 25px 0 10px 12px;
  letter-spacing: 1px;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  padding-left: 20px;
  border-left: 1px solid var(--border);
  margin-left: 22px;
  margin-bottom: 10px;
  gap: 4px;
}

.light-mode .nav-submenu,
.soft-mode .nav-submenu {
  border-left-color: var(--border);
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: 0.3s;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.light-mode .nav-subitem:hover,
.soft-mode .nav-subitem:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.modal {
  display: none; /* Sembunyi secara default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center; /* Untuk memusatkan modal-content */
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--border);
}

/* Container navigasi agar lebih proporsional */
.date-nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  cursor: pointer;
  position: relative;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(
    255,
    255,
    255,
    0.03
  ); /* Sedikit background agar terlihat seperti tombol */
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-nav-container:hover {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Trik Utama: Memaksa Pop-up Tanggal Menjadi Gelap */
#jumpDate {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  /* Ini rahasianya agar kalender jadi hitam */
  color-scheme: dark;
}

#currentDateDisplay {
  color: #3b82f6; /* Warna biru primary */
  font-weight: 800;
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* WORKSPACE LAYOUT */
.workspace {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 40px;
}

/* CARD MENU SYSTEM */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
}

.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.menu-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-card .icon {
  font-size: 3rem;
  margin-bottom: 5px;
}

.menu-card h3 {
  margin: 0;
  color: white;
}

.light-mode .menu-card h3,
.soft-mode .menu-card h3 {
  color: var(--text-main);
}

.menu-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.light-mode .breadcrumb {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb .separator {
  color: var(--border);
  font-size: 0.7rem;
}
.breadcrumb .current {
  color: var(--primary);
  font-weight: 600;
}

/* SMALL PLAY BUTTON FOR TABLE */
.btn-play-table {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  transition: 0.3s;
}
.btn-play-table:hover {
  background: #2563eb;
  transform: scale(1.05);
}
