/* =========================================
   SIPENJADKEC - Custom Styles
   ========================================= */

:root {
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #3b82f6;
  --sidebar-width: 240px;
  --primary: #1e3a8a;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  margin: 0;
}

/* ===== Layout ===== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #cbd5e1;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content-wrapper {
  flex: 1;
}

/* ===== Sidebar ===== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #334155;
  color: #fff;
}
.sidebar-brand i { font-size: 1.75rem; color: #60a5fa; }

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu .menu-section {
  font-size: .7rem;
  letter-spacing: 1px;
  padding: 1rem 1rem .25rem;
  color: #64748b;
  text-transform: uppercase;
}
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: .9rem;
  transition: all .15s;
}
.sidebar-menu li a i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-menu li a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-menu li a.active {
  background: var(--sidebar-active);
  color: #fff;
  border-right: 3px solid #60a5fa;
}

/* ===== Cards & Components ===== */
.card {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border-radius: .5rem;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
}

.stat-card {
  border-left: 4px solid var(--sidebar-active);
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-label { font-size: .8rem; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }

/* ===== Badges per tipe ===== */
.badge-kantor { background: #3b82f6 !important; }
.badge-luar   { background: #f97316 !important; }
.badge-online { background: #10b981 !important; }

/* ===== Tabel Jadwal ===== */
.jadwal-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: #fff;
  border-radius: .5rem;
  overflow: hidden;
}
.jadwal-table th, .jadwal-table td {
  border: 1px solid #e2e8f0;
  padding: .4rem;
  vertical-align: top;
  font-size: .8rem;
  min-height: 60px;
}
.jadwal-table th { background: #f1f5f9; text-align: center; font-weight: 600; }
.jadwal-table th.jam-col { width: 80px; background: #e2e8f0; }
.jadwal-table td.kosong { background: #fafafa; }
.jadwal-card {
  padding: .35rem .5rem;
  border-radius: .25rem;
  font-size: .75rem;
  color: #fff;
  line-height: 1.2;
}
.jadwal-card.kantor { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.jadwal-card.luar   { background: linear-gradient(135deg, #f97316, #ea580c); }
.jadwal-card.online { background: linear-gradient(135deg, #10b981, #059669); }
.jadwal-card .nama { font-weight: 600; display: block; }
.jadwal-card .meta { opacity: .9; font-size: .7rem; }
.buffer-block {
  background: repeating-linear-gradient(45deg, #fee2e2, #fee2e2 5px, #fecaca 5px, #fecaca 10px);
  font-size: .65rem;
  color: #991b1b;
  padding: .2rem;
  margin-top: .2rem;
  border-radius: .2rem;
}

/* ===== Format teks ===== */
.text-output {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: .5rem;
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  white-space: pre;
  overflow-x: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    left: -100%;
    transition: left .2s;
    z-index: 1000;
  }
  .app-sidebar.open { left: 0; }
}

@media print {
  .app-sidebar, .navbar, .app-footer, .no-print { display: none !important; }
  .app-main { width: 100%; }
  .content-wrapper { padding: 0 !important; }
}
