@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --blue-50:  #F5FAFF;
  --blue-100: #EAF4FF;
  --blue-200: #DCEEFF;
  --blue-300: #BFE1FF;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --ink:      #1E293B;
  --ink-soft: #5B6B82;
  --green:    #22C08D;
  --amber:    #F5A524;
  --red:      #F0576B;
  --white:    #FFFFFF;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-card: 0 8px 24px rgba(59, 130, 246, 0.08);

  /* Brand MahakaLand */
  --mk-teal: #2FD4C4;
  --mk-teal-dark: #17A99A;
  --mk-blue: #2196F3;
  --mk-gradient: linear-gradient(135deg, var(--mk-teal) 0%, var(--mk-blue) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(47,212,196,.10), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(33,150,243,.10), transparent 38%),
    var(--blue-50);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .greeting h2 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }

/* ---------- LOGIN ---------- */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(47,212,196,.55), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(33,150,243,.55), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(23,169,154,.45), transparent 50%),
    linear-gradient(135deg, #0B2A3D 0%, #0F3B4D 55%, #0B2A3D 100%);
  position: relative; overflow: hidden;
}
.login-card {
  position: relative; z-index: 1;
  display: flex; width: 100%; max-width: 920px; min-height: 520px;
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.login-side {
  flex: 0 0 42%; padding: 46px 38px;
  background: linear-gradient(160deg, rgba(23,169,154,.55), rgba(11,42,61,.65));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border-right: 1px solid rgba(255,255,255,.12);
}
.login-side img { width: 92px; height: auto; margin-bottom: 18px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.25)); }
.login-side h1 { color: #fff; font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.login-pill {
  display: inline-block; background: var(--mk-gradient); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 18px; letter-spacing: .02em;
}
.login-side p { color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.6; max-width: 260px; }

.login-box {
  flex: 1; background: rgba(255,255,255,.97); padding: 46px 44px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-box h2 { color: var(--ink); font-size: 24px; font-weight: 800; }
.login-box .subtitle { color: var(--ink-soft); font-size: 13px; margin-bottom: 8px; margin-top: 4px; }
.login-box label { display: block; font-size: 12.5px; font-weight: 700; margin: 16px 0 7px; color: var(--ink-soft); }

.input-icon { position: relative; }
.input-icon span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: .55; pointer-events: none;
}
.login-box input {
  width: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid #E5EAF2; border-radius: 10px;
  font-size: 14px; font-family: 'Inter', sans-serif; background: #F7F9FC; transition: border-color .15s;
}
.login-box input:focus { outline: none; border-color: var(--mk-blue); background: #fff; }

.role-select { display: flex; gap: 10px; margin-top: 8px; }
.role-option {
  flex: 1; text-align: center; padding: 14px 10px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid #E5EAF2; background: #F7F9FC; transition: all .15s;
}
.role-option .ic { font-size: 18px; display: block; margin-bottom: 4px; }
.role-option span.lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.role-option input { display: none; }
.role-option.checked { border-color: var(--mk-blue); background: linear-gradient(135deg, rgba(47,212,196,.1), rgba(33,150,243,.1)); }
.role-option.checked .lbl { color: var(--mk-blue); }

.login-box button {
  width: 100%; margin-top: 26px; padding: 14px; border: none; border-radius: 10px;
  font-size: 14.5px; font-weight: 700; color: var(--white); cursor: pointer;
  background: var(--mk-gradient);
  box-shadow: 0 10px 24px rgba(23, 169, 154, 0.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-box button:hover { filter: brightness(1.05); }
.alert-error {
  background: #FDE8EC; color: #C2334E; padding: 10px 14px; border-radius: 10px;
  font-size: 12.5px; margin-top: 14px; font-weight: 600;
}
@media (max-width: 720px) {
  .login-card { flex-direction: column; max-width: 420px; }
  .login-side { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); padding: 32px 28px; }
}
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; font-weight: 500; }
.alert-error { background: #FDE8EC; color: #C2334E; }

/* ---------- LAYOUT ---------- */
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; padding: 26px 16px;
  background: linear-gradient(180deg, #0F3B4D 0%, #123047 55%, #0B2A3D 100%);
  display: flex; flex-direction: column;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px;
  font-size: 16px; font-weight: 800; color: #fff;
}
.sidebar .brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--mk-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.sidebar .brand-logo {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 10px 26px;
}
.sidebar .brand-logo img {
  width: 66px; height: 66px; object-fit: contain; padding: 10px;
  background: #fff; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.sidebar .brand-sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: rgba(255,255,255,.55);
  text-transform: uppercase;
}
.sidebar .group-title {
  padding: 18px 10px 7px; font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
}
.sidebar a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 2px 0;
  color: rgba(255,255,255,.78); text-decoration: none; font-size: 13.5px; font-weight: 600;
  border-radius: 13px; transition: all .15s;
}
.sidebar a .nav-ic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center; font-size: 14.5px;
  transition: all .15s;
}
.sidebar a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.active {
  background: #fff;
  color: var(--mk-teal-dark); font-weight: 800;
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.sidebar a.active .nav-ic {
  background: var(--mk-gradient); color: #fff;
  box-shadow: 0 4px 10px rgba(23,169,154,.4);
}

.main { flex: 1; padding: 28px 34px; max-width: 1280px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 20px;
}
.greeting h2 { font-size: 24px; font-weight: 800; color: var(--ink); }
.greeting p { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 1px solid var(--blue-200); border-radius: 12px; padding: 9px 14px;
  font-size: 13px; color: var(--ink-soft); box-shadow: var(--shadow-card); min-width: 220px;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; background: var(--white);
  border: 1px solid var(--blue-200); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card); position: relative; cursor: pointer; text-decoration: none;
  color: var(--mk-blue);
}
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; background: var(--mk-gradient);
  color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.user-info { font-size: 13px; color: var(--ink-soft); display:flex; align-items:center; gap:10px; }
.user-info a { color: var(--red); text-decoration: none; font-weight: 600; font-size: 12.5px; }

/* ---------- GRID DASHBOARD ---------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-col { display: flex; flex-direction: column; gap: 18px; }

.panel {
  background: var(--white); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-card); border: 1px solid #EEF4FC;
  position: relative; overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--mk-gradient);
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.panel-head .big-num { font-size: 26px; font-weight: 800; color: var(--ink); }
.panel-head .tag { font-size: 12px; font-weight: 700; color: var(--mk-blue); margin-top: 2px; }
.pill { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--blue-50); border: 1px solid var(--blue-200); padding: 5px 11px; border-radius: 20px; }

.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; flex-shrink:0; color: #fff; box-shadow: 0 6px 14px rgba(23,169,154,.25);
}
.stat-icon.blue { background: linear-gradient(135deg, var(--mk-blue), #5CB8FF); box-shadow: 0 6px 14px rgba(33,150,243,.3); }
.stat-icon.green { background: var(--mk-gradient); }
.stat-icon.amber { background: linear-gradient(135deg, #F5A524, #FFC864); box-shadow: 0 6px 14px rgba(245,165,36,.3); }
.stat-card .num { font-size: 21px; font-weight: 800; }
.stat-card .label { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-top: 1px; }

/* Border penuh mengelilingi kartu, warna brand MahakaLand — bisa dipakai di panel manapun */
.panel.accent-teal { border: 1.5px solid var(--mk-teal-dark); background: linear-gradient(180deg, rgba(23,169,154,.06), #fff 65%); }
.panel.accent-blue { border: 1.5px solid var(--mk-blue); background: linear-gradient(180deg, rgba(33,150,243,.06), #fff 65%); }
.panel.accent-amber { border: 1.5px solid #F5A524; background: linear-gradient(180deg, rgba(245,165,36,.08), #fff 65%); }
/* Matikan garis gradasi tebal di atas (::before) khusus kartu accent, biar border-nya rata tipis di 4 sisi */
.panel.accent-teal::before, .panel.accent-blue::before, .panel.accent-amber::before { display: none; }

.cards-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* Kalender agenda — ukuran sel dikunci biar konsisten pas pindah bulan */
.kalender-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 60px; gap: 3px; margin-top: 10px; font-size: 10px; }
.kalender-cell { height: 60px; border-radius: 6px; padding: 3px 4px; overflow: hidden; background: #fafcff; border: 1px solid #eef3fa; }
.kalender-cell.today { background: var(--blue-50); border-color: var(--blue-600); }
.kalender-cell .tgl-num { font-weight: 700; font-size: 10px; margin-bottom: 1px; }
.kalender-cell .item-agenda { font-size: 8px; line-height: 1.25; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kalender-cell .lebih-agenda { font-size: 8px; color: var(--blue-600); font-weight: 700; }

.reminder-card {
  border-radius: var(--radius-lg); padding: 22px;
  background: linear-gradient(160deg, var(--mk-teal-dark), var(--mk-blue) 65%, #6FCBF5);
  color: #fff; box-shadow: 0 14px 30px rgba(23,169,154,.28);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.reminder-card .badge-date {
  background: rgba(255,255,255,.16); align-self: flex-start; padding: 5px 12px;
  border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .03em; margin-bottom: 12px;
}
.reminder-card .name { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.reminder-card .sub { font-size: 12.5px; opacity: .85; margin-bottom: 18px; }
.reminder-card .cta {
  background: #fff; color: var(--blue-700); border: none; padding: 11px; border-radius: 10px;
  font-weight: 700; font-size: 13px; cursor: pointer; text-align:center; text-decoration:none; display:block;
}

/* ---------- TABLE (dipakai di modul lain) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
th, td { padding: 13px 16px; text-align: left; font-size: 13.5px; border-bottom: 1px solid #F0F5FC; }
th { background: var(--blue-50); color: var(--ink-soft); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.badge { padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-red { background: #FDE8EC; color: #C2334E; }
.badge-orange { background: #FFF3DE; color: #B9750B; }
.badge-green { background: #E4F9F1; color: #14875A; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; }
.btn-primary { background: var(--mk-gradient); color: #fff; box-shadow: 0 6px 14px rgba(23,169,154,.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: 1fr; }
}