/* =========================================================
   Madeena Skin Clinic — Design System
   Tema: "biru telur asin" (soft teal-blue) + putih
   Dipakai bersama oleh index.php (login) & admin.php (dashboard)
   ========================================================= */

:root {
  --brand-50:  #EAF7F5;
  --brand-100: #D3EFEA;
  --brand-200: #AFE2D9;
  --brand-300: #8FD8CB;
  --brand-500: #45AFA0;
  --brand-600: #358A7E;
  --brand-700: #235F56;
  --brand-800: #1A4842;
  --brand-900: #123430;

  --ink:       #1E2A2A;
  --ink-soft:  #5B6B6A;
  --ink-faint: #8A9A98;

  --bg:        #F5FAF9;
  --white:     #FFFFFF;
  --line:      rgba(18, 52, 48, 0.09);

  --danger:    #E15B4D;
  --danger-bg: #FCEAE7;
  --warning:   #EFA23B;
  --warning-bg:#FDF1E1;
  --success:   #3FAE7A;
  --success-bg:#E6F6EE;
  --muted-bg:  #EEF2F1;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(18,52,48,.06), 0 6px 16px rgba(18,52,48,.06);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

/* =========================================================
   HALAMAN LOGIN (index.php)
   ========================================================= */

.auth-shell {
  min-height: 100vh;
  display: flex;
}

.auth-panel-brand {
  flex: 1 1 46%;
  background:
    radial-gradient(120% 140% at 15% 10%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(155deg, var(--brand-700) 0%, var(--brand-500) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-mark {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.auth-mark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--white); opacity: .9; }

.auth-hero h1 {
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  line-height: 1.25;
  max-width: 20ch;
  margin-bottom: .75rem;
}
.auth-hero p {
  color: rgba(255,255,255,.85);
  max-width: 34ch;
  font-size: .98rem;
}

.auth-wave {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  width: 100%;
  height: auto;
  opacity: .5;
}

.auth-foot {
  color: rgba(255,255,255,.7);
  font-size: .82rem;
}

.auth-panel-form {
  flex: 1 1 54%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.auth-card { width: 100%; max-width: 360px; }
.auth-card h2 { font-weight: 800; font-size: 1.4rem; margin-bottom: .2rem; }
.auth-card .sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.75rem; }

.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); font-size: .95rem;
}
.auth-input {
  width: 100%;
  padding: .72rem .9rem .72rem 2.4rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-size: .95rem;
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.auth-btn {
  width: 100%;
  padding: .78rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand-500);
  color: var(--white);
  font-weight: 700;
  font-size: .96rem;
  cursor: pointer;
  transition: background .15s;
}
.auth-btn:hover { background: var(--brand-600); }

.auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  font-size: .88rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 767px) {
  .auth-shell { flex-direction: column; }
  .auth-panel-brand { flex: 0 0 auto; padding: 2rem 1.75rem 2.75rem; }
  .auth-hero p { display: none; }
  .auth-wave { display: none; }
  .auth-panel-form { flex: 1 1 auto; }
}

/* =========================================================
   DASHBOARD ADMIN (admin.php) — override AdminLTE/Bootstrap
   ========================================================= */

.content-wrapper { background: var(--bg); }

/* Navbar atas */
.main-header.navbar {
  background: var(--white) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.main-header .nav-link { color: var(--ink) !important; }
.main-header .nav-link:hover { color: var(--brand-600) !important; }

/* Sidebar */
.main-sidebar.sidebar-teal {
  background: var(--brand-700) !important;
}
.sidebar-teal .brand-link {
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-teal .brand-link .brand-text { color: var(--white) !important; }
.sidebar-teal .user-panel { border-bottom: 1px solid rgba(255,255,255,.12); }

.sidebar-teal .nav-sidebar > .nav-item > .nav-link {
  color: rgba(255,255,255,.82);
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  width: auto;
}
.sidebar-teal .nav-sidebar > .nav-item > .nav-link .nav-icon { color: rgba(255,255,255,.72); }
.sidebar-teal .nav-sidebar > .nav-item > .nav-link:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.sidebar-teal .nav-sidebar > .nav-item > .nav-link.active {
  background: rgba(255,255,255,.16) !important;
  color: var(--white) !important;
  font-weight: 600;
  box-shadow: none;
}
.sidebar-teal .nav-sidebar > .nav-item > .nav-link.active .nav-icon { color: var(--white); }

/* Content header */
.content-header h1 { font-weight: 800; color: var(--ink); font-size: 1.5rem; }

/* Cards */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
}
.card-title { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.card-title i { color: var(--brand-500); margin-right: .45rem; }
.card-body { padding: 1.1rem 1.25rem; }

/* Tombol */
.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: .88rem; }
.btn-success {
  background-color: var(--brand-500); border-color: var(--brand-500);
}
.btn-success:hover, .btn-success:focus {
  background-color: var(--brand-600); border-color: var(--brand-600);
}
.btn-primary { background-color: var(--brand-600); border-color: var(--brand-600); }
.btn-primary:hover { background-color: var(--brand-700); border-color: var(--brand-700); }
.btn-outline-success { color: var(--brand-600); border-color: var(--brand-200); }
.btn-outline-success:hover { background-color: var(--brand-500); border-color: var(--brand-500); }
.btn-outline-danger { color: var(--danger); border-color: #F3D3CD; }
.btn-outline-danger:hover { background-color: var(--danger); border-color: var(--danger); }
.btn-info { background-color: var(--brand-300); border-color: var(--brand-300); color: var(--brand-900); }
.btn-info:hover { background-color: var(--brand-500); border-color: var(--brand-500); color: var(--white); }

/* List group (Daftar Karyawan/Cabang/Tugas) */
.list-group-item {
  border-color: var(--line);
  padding: .95rem 1.1rem;
}
.list-group-item:first-child { border-top: none; }

.avatar-circle {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.item-row { display: flex; align-items: center; gap: .75rem; }
.item-row .item-title { font-weight: 700; color: var(--ink); }
.item-row .item-sub { font-size: .82rem; color: var(--ink-soft); }

/* Pills (pengganti badge Bootstrap yang terlalu jenuh warnanya) */
.pill {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
}
.pill-brand   { background: var(--brand-100); color: var(--brand-700); }
.pill-muted   { background: var(--muted-bg);  color: var(--ink-soft); }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: var(--warning-bg); color: #9C6A15; }
.pill-danger  { background: var(--danger-bg); color: var(--danger); }

/* Form controls */
.form-control:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
label { font-weight: 600; font-size: .86rem; color: var(--ink-soft); }

/* Tabel riwayat absensi */
.table thead th {
  background: var(--brand-50);
  color: var(--brand-700);
  border-bottom: none;
  font-size: .8rem;
  text-transform: none;
  white-space: nowrap;
}
.table td { font-size: .88rem; vertical-align: middle; }
.table-striped tbody tr:nth-of-type(odd) { background-color: var(--brand-50); }

/* Modal */
.modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-footer { border-top: 1px solid var(--line); }

/* State kosong & loading */
.state-box {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}
.state-box i { font-size: 1.6rem; color: var(--brand-300); display: block; margin-bottom: .5rem; }
.state-box .hint { font-size: .82rem; color: var(--ink-faint); margin-top: .2rem; }

.spinner-teal {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--brand-100); border-top-color: var(--brand-500);
  animation: spin .7s linear infinite;
  display: inline-block; margin-bottom: .6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.main-footer { background: var(--white); border-top: 1px solid var(--line); color: var(--ink-faint); }
