
/* =========================================
   PORTAL SANTRI DAARUL AZMI
   Main Stylesheet
   ========================================= */

/* WARNA UTAMA */
:root {
  --blue: #1556ad;
  --nav: #273344;
  --bg: #f4f7fb;
  --line: #dce4ee;
  --muted: #64748b;
  --green: #087955;
}

/* PENGATURAN DASAR */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: #1b2940;
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

/* HEADER */
header {
  background: var(--blue);
  color: #fff;
  padding: 15px clamp(18px, 4vw, 55px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

header a {
  color: white;
}

header .brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 20px;
}

/* NAVIGASI */
nav {
  background: var(--nav);
  padding: 13px clamp(18px, 4vw, 55px);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

nav a {
  color: #e8eef6;
  font-size: 14px;
}

/* KONTEN */
.container {
  max-width: 1160px;
  margin: 28px auto;
  padding: 0 18px;
}

h1 {
  font-size: 26px;
  margin: 0 0 8px;
}

h2 {
  font-size: 19px;
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

/* KARTU */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 3px 15px #172d4610;
  margin-bottom: 20px;
}

/* =========================================
   HALAMAN LOGIN
   ========================================= */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: 100%;
  max-width: 450px;
  text-align: center;
}

/* LOGO ASLI DAARUL AZMI */
.logo-pondok {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px;
}

.logo-pondok img {
  display: block;
  width: 115px;
  height: 115px;
  object-fit: contain;
}

/* LOGO LAMA - TETAP DIDUKUNG */
.emblem {
  margin: auto;
  background: linear-gradient(140deg, #248549, #d4b15b);
  color: white;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  font-size: 33px;
  font-weight: 900;
  border: 5px solid #f5ead2;
}

/* =========================================
   FORM LOGIN DAN INPUT
   ========================================= */

label {
  display: block;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 5px;
}

input,
select {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid #cdd8e3;
  border-radius: 7px;
  background: white;
  color: #1b2940;
}

input:focus,
select:focus {
  outline: 2px solid #83b7fa;
}

/* TOMBOL */
button {
  border: 0;
  background: var(--blue);
  color: white;
  padding: 11px 18px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  filter: brightness(0.93);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.secondary {
  background: #eeeff3;
  color: #22324a;
}

.tiny {
  font-size: 13px;
  padding: 7px 12px;
}

/* =========================================
   DASHBOARD SANTRI
   ========================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(210px, 1fr)
  );
  gap: 18px;
}

.stat {
  font-size: 25px;
  font-weight: 800;
  color: var(--blue);
}

/* PESAN NOTIFIKASI */
.message {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fee8e8;
  color: #a32929;
  white-space: pre-wrap;
}

.message:empty {
  display: none;
}

.message.success {
  background: #e4f8e9;
  color: #126c39;
}

/* =========================================
   TABEL DATA SANTRI DAN KEUANGAN
   ========================================= */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 570px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 9px;
  font-size: 14px;
}

th {
  background: #f2f6fb;
}

/* PROFIL SANTRI */
.pairs {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 9px;
}

.pairs dt {
  color: var(--muted);
}

.pairs dd {
  margin: 0;
  font-weight: 600;
}

/* FORM DASHBOARD ADMIN */
.form-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(220px, 1fr)
  );
  gap: 12px;
  align-items: end;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* BADGE STATUS */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  background: #e1f4ed;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

/* =========================================
   RESPONSIVE - HP / MOBILE
   ========================================= */

@media (max-width: 650px) {

  header {
    padding: 12px 16px;
  }

  header .brand {
    font-size: 16px;
  }

  nav {
    gap: 14px;
    padding: 12px 16px;
  }

  h1 {
    font-size: 22px;
  }

  .pairs {
    grid-template-columns: 1fr;
  }

  .pairs dd {
    margin-bottom: 8px;
  }

  .card {
    padding: 17px;
  }

  .logo-pondok img {
    width: 95px;
    height: 95px;
  }

  .login-card {
    width: 100%;
  }

}
