/* ============================================================
   style.css — Premium Sage Green & Warm Cream
   Sistem Monitoring Servis Laptop
   Font: Plus Jakarta Sans (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  /* Warna utama */
  --sage:          #557A64;
  --sage-dark:     #3f6150;
  --sage-mid:      #608066;
  --sage-light:    #deeae2;
  --sage-pale:     #eef4f0;

  /* Accent gold */
  --gold:          #E6C173;
  --gold-dark:     #c9a050;
  --gold-light:    #fdf3e0;

  /* Background */
  --bg:            #F4F3EE;
  --bg-warm:       #F6F5F2;
  --bg-white:      #ffffff;

  /* Teks */
  --text-dark:     #1e2d24;
  --text-mid:      #3d5244;
  --text-muted:    #7a8f82;
  --text-light:    #a8b8ae;

  /* Border */
  --border:        #dde8e1;
  --border-light:  #eaf1ec;

  /* Shadow */
  --shadow-xs:     0 1px 3px rgba(60,90,70,.07);
  --shadow-sm:     0 2px 10px rgba(60,90,70,.09);
  --shadow-md:     0 6px 24px rgba(60,90,70,.12);
  --shadow-lg:     0 12px 40px rgba(60,90,70,.14);

  /* Radius */
  --radius-xs:     6px;
  --radius-sm:     10px;
  --radius:        14px;
  --radius-lg:     18px;
  --radius-xl:     24px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sage-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--sage); }

h1,h2,h3,h4,h5,h6 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sage-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage); }

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  width: 248px;
  min-height: 100vh;
  background: linear-gradient(175deg, #3f6150 0%, #2e4a3a 55%, #243d2f 100%);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(30,60,40,.18);
  transition: width .25s ease;
}

/* Brand */
#sidebar .sidebar-brand {
  padding: 1.5rem 1.3rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .75rem;
}
#sidebar .sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}
#sidebar .sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
}
#sidebar .sidebar-brand .brand-name {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.01em;
}
#sidebar .sidebar-brand .brand-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  font-weight: 400;
  letter-spacing: .02em;
}

/* Section label */
#sidebar .nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 1.2rem 1.3rem .3rem;
}

/* Nav links */
#sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .58rem 1.1rem .58rem 1.3rem;
  color: rgba(255,255,255,.68);
  font-size: .845rem;
  font-weight: 500;
  transition: all .18s;
  border-left: 3px solid transparent;
  margin: 1px .6rem;
  border-radius: var(--radius-sm);
}
#sidebar .nav-link i {
  font-size: .95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .8;
}
#sidebar .nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: transparent;
}
#sidebar .nav-link:hover i { opacity: 1; }
#sidebar .nav-link.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-left: 3px solid var(--gold);
  font-weight: 600;
}
#sidebar .nav-link.active i { opacity: 1; }

/* Sidebar footer */
#sidebar .sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.3rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
#sidebar .sidebar-footer .user-avatar {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: #fff; flex-shrink: 0;
}
#sidebar .sidebar-footer .user-info  { font-size: .72rem; color: rgba(255,255,255,.5); }
#sidebar .sidebar-footer .user-name  { font-size: .82rem; font-weight: 600; color: #fff; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  margin-left: 248px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: .8rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-xs);
}
#topbar .page-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: .4rem;
}
#topbar .page-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 16px;
  background: var(--sage);
  border-radius: 99px;
}
#topbar .topbar-right { display: flex; align-items: center; gap: .65rem; }

#topbar .badge-role {
  background: var(--sage-pale);
  color: var(--sage-dark);
  font-size: .7rem;
  font-weight: 700;
  padding: .28rem .7rem;
  border-radius: 99px;
  text-transform: capitalize;
  letter-spacing: .02em;
  border: 1px solid var(--sage-light);
}
#topbar .topbar-user {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
}
#topbar .btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: .32rem .8rem;
  font-size: .8rem;
  font-weight: 500;
  transition: all .18s;
  display: flex; align-items: center; gap: .35rem;
}
#topbar .btn-logout:hover {
  background: #fdf0f0;
  border-color: #f0c0c0;
  color: #8b3a3a;
}

/* ============================================================
   PAGE BODY
   ============================================================ */
.page-body { padding: 1.75rem; flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.4rem;
  font-weight: 700;
  font-size: .875rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}
.card-header i { color: var(--sage); }
.card-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: .75rem 1.4rem;
}

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s, transform .22s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: 0;
}
.stat-card.green::after  { background: var(--sage); }
.stat-card.yellow::after { background: var(--gold); }
.stat-card.blue::after   { background: #5b9bd5; }
.stat-card.red::after    { background: #d9706a; }

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}
.stat-icon.green  { background: var(--sage-pale);  color: var(--sage-dark); }
.stat-icon.yellow { background: var(--gold-light);  color: var(--gold-dark); }
.stat-icon.blue   { background: #e8f2fc;            color: #2471a3; }
.stat-icon.red    { background: #fdf0f0;            color: #c0392b; }

.stat-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -.02em;
}

/* ============================================================
   TABLES
   ============================================================ */
.table { color: var(--text-dark); border-color: var(--border-light); }
.table thead th {
  background: var(--sage-pale);
  color: var(--text-mid);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 2px solid var(--sage-light);
  padding: .8rem 1.1rem;
  white-space: nowrap;
}
.table tbody td {
  padding: .8rem 1.1rem;
  vertical-align: middle;
  font-size: .865rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--sage-pale); }
.table tfoot td {
  padding: .8rem 1.1rem;
  font-size: .865rem;
  background: var(--sage-pale);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge-status {
  font-size: .7rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.status-antrian    { background: var(--gold-light);  color: #9a6f1a; border: 1px solid #f0d49a; }
.status-dicek      { background: #e8f2fc;            color: #1a5a8a; border: 1px solid #b8d8f5; }
.status-dikerjakan { background: #e8f0fc;            color: #1a3a8a; border: 1px solid #b8c8f5; }
.status-selesai    { background: var(--sage-pale);   color: var(--sage-dark); border: 1px solid var(--sage-light); }
.status-diambil    { background: #f2f2f2;            color: #666;    border: 1px solid #ddd; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-sage {
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .845rem;
  letter-spacing: .01em;
  transition: background .18s, box-shadow .18s, transform .12s;
  box-shadow: 0 2px 8px rgba(85,122,100,.25);
}
.btn-sage:hover {
  background: var(--sage-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(85,122,100,.35);
  transform: translateY(-1px);
}
.btn-sage:active { transform: translateY(0); }

.btn-sage-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .845rem;
  transition: all .18s;
}
.btn-sage-outline:hover {
  background: var(--sage-pale);
  border-color: var(--sage);
  color: var(--sage-dark);
}

/* Gold accent button */
.btn-gold {
  background: var(--gold);
  color: #5a3e0a;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .845rem;
  transition: all .18s;
  box-shadow: 0 2px 8px rgba(230,193,115,.3);
}
.btn-gold:hover {
  background: var(--gold-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(230,193,115,.4);
  transform: translateY(-1px);
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  background: #fafcfa;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .875rem;
  padding: .52rem .85rem;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3.5px rgba(85,122,100,.14);
  background: #fff;
  outline: none;
}
.form-control::placeholder { color: var(--text-light); }
.form-label {
  color: var(--text-mid);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.input-group-text {
  background: var(--sage-pale);
  border-color: var(--border);
  color: var(--sage-dark);
  font-size: .9rem;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-lg);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.modal-header {
  border-bottom: 1px solid var(--border-light) !important;
  padding: 1.1rem 1.4rem;
}
.modal-title { font-weight: 700; font-size: .95rem; color: var(--text-dark); }
.modal-body  { padding: 1.25rem 1.4rem; }
.modal-footer {
  border-top: 1px solid var(--border-light) !important;
  padding: .9rem 1.4rem;
}
.btn-close { opacity: .5; }
.btn-close:hover { opacity: 1; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  border-width: 1px;
}
.alert-success {
  background: var(--sage-pale);
  border-color: var(--sage-light);
  color: var(--sage-dark);
}
.alert-danger {
  background: #fdf0f0;
  border-color: #f0c8c8;
  color: #8b3a3a;
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-sage    { color: var(--sage) !important; }
.text-sage-dk { color: var(--sage-dark) !important; }
.bg-sage-pale { background: var(--sage-pale) !important; }

/* Divider */
hr { border-color: var(--border-light); opacity: 1; }

/* Breadcrumb-style page title accent */
.page-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -.02em;
  margin-bottom: .2rem;
}
.page-sub {
  font-size: .8rem;
  color: var(--text-muted);
}

/* Filter bar pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .9rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-white);
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
}
.filter-pill:hover,
.filter-pill.active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #sidebar { width: 0; overflow: hidden; }
  #sidebar.open { width: 248px; }
  #main-content { margin-left: 0; }
  .page-body { padding: 1rem; }
}
