/* ==========================================================
   MAWARDI INSTITUTE MANAGEMENT SYSTEM
   Global Design System v1.0.0
   Semua halaman menggunakan stylesheet ini.
   ========================================================== */

:root {
  --primary-950: #240a4a;
  --primary-900: #32105f;
  --primary-800: #431579;
  --primary-700: #57219b;
  --primary-600: #6f2dbd;
  --primary-500: #8c3fd1;
  --primary-400: #ad62e2;
  --primary-100: #f0e4fb;
  --primary-50: #f8f3fd;
  --accent-700: #087f99;
  --accent-600: #079db5;
  --accent-500: #14b8c8;
  --accent-100: #dff8fa;
  --ink-950: #17151c;
  --ink-800: #312d38;
  --ink-600: #686270;
  --ink-500: #837c8b;
  --line: #e7e2ea;
  --surface: #ffffff;
  --surface-soft: #faf9fc;
  --page: #f5f3f8;
  --success: #16865b;
  --warning: #b96d08;
  --danger: #c33b4a;
  --info: #3d67a8;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 8px 24px rgba(36, 10, 74, .06);
  --shadow-md: 0 20px 55px rgba(36, 10, 74, .12);
  --transition: 180ms ease;
  --container: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-950);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

/* Utilities */
.is-hidden { display: none !important; }
.text-muted { color: var(--ink-600); }
.text-primary { color: var(--primary-700); }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Typography */
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink-950); line-height: 1.2; letter-spacing: -.025em; }
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.2;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(20,184,200,.22); outline-offset: 2px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
  box-shadow: 0 10px 22px rgba(87,33,155,.22);
}
.btn-primary:hover { box-shadow: 0 13px 28px rgba(87,33,155,.28); }
.btn-secondary { color: var(--primary-700); background: var(--primary-50); border-color: #e5d6f4; }
.btn-ghost { color: var(--ink-800); background: #fff; border-color: var(--line); }
.btn-lg { min-height: 50px; padding: 13px 20px; border-radius: 12px; }
.btn-block { width: 100%; }

/* Forms */
.app-form { display: grid; gap: 18px; }
.form-group { display: grid; gap: 8px; }
.form-label-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.form-label { color: var(--ink-800); font-size: 13px; font-weight: 750; }
.input-wrap { position: relative; }
.form-control {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-950);
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-control::placeholder { color: #a19aa8; }
.form-control:hover { border-color: #cec5d5; }
.form-control:focus { border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(111,45,189,.10); }
.form-control.has-icon { padding-left: 45px; }
.form-control.has-action { padding-right: 48px; }
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--ink-500);
  pointer-events: none;
}
.input-icon svg, .input-action svg { width: 100%; height: 100%; }
.input-action {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-500);
  padding: 8px;
}
.input-action:hover { background: var(--surface-soft); color: var(--primary-700); }

/* Alerts */
.alert { padding: 11px 13px; border-radius: 11px; border: 1px solid; font-size: 13px; }
.alert-info { color: #315784; background: #f1f7ff; border-color: #d9e9fb; }
.alert-success { color: #126745; background: #eefaf5; border-color: #cfeedd; }
.alert-danger { color: #9f2e3b; background: #fff3f4; border-color: #f2d3d7; }
.alert-warning { color: #8d5509; background: #fff8ec; border-color: #f1dfbd; }

/* Authentication */
.auth-page { overflow-x: hidden; background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(480px, .95fr); }
.auth-brand-panel {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(48px, 6vw, 96px);
  background:
    radial-gradient(circle at 18% 18%, rgba(20,184,200,.42), transparent 31%),
    radial-gradient(circle at 83% 76%, rgba(173,98,226,.36), transparent 34%),
    linear-gradient(145deg, #24103f 0%, #381267 46%, #541b91 100%);
}
.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
}
.auth-brand-panel::before { width: 520px; height: 520px; right: -250px; top: -180px; }
.auth-brand-panel::after { width: 360px; height: 360px; left: -180px; bottom: -170px; }
.auth-brand-content { position: relative; z-index: 1; width: min(620px, 100%); }
.auth-brand-logo { width: min(410px, 80%); margin-bottom: clamp(48px, 7vh, 80px); filter: drop-shadow(0 14px 28px rgba(0,0,0,.16)); }
.auth-brand-copy .eyebrow { color: #71e2e8; }
.auth-brand-copy h1 { max-width: 620px; margin-bottom: 20px; color: #fff; font-size: clamp(38px, 4.5vw, 68px); font-weight: 760; }
.auth-brand-copy p { max-width: 580px; margin-bottom: 0; color: rgba(255,255,255,.72); font-size: clamp(15px, 1.4vw, 18px); }
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(30px, 6vw, 92px);
  background: linear-gradient(180deg, #fff, #fcfbfd);
}
.auth-card { width: min(450px, 100%); }
.auth-mobile-logo-wrap { display: none; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h2 { margin-bottom: 11px; font-size: clamp(28px, 3vw, 38px); font-weight: 780; }
.auth-heading p { margin-bottom: 0; color: var(--ink-600); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; color: var(--ink-500); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-register-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-footnote { margin: 28px 0 0; color: #aaa3af; text-align: center; font-size: 12px; }

/* Shared application primitives for subsequent modules */
.app-container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.app-card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.app-card-body { padding: 22px; }
.table-responsive { width: 100%; overflow-x: auto; }
.app-table { width: 100%; border-collapse: collapse; }
.app-table th, .app-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.app-table th { color: var(--ink-600); background: var(--surface-soft); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge-success { color: var(--success); background: #eaf8f1; }
.badge-warning { color: var(--warning); background: #fff5e5; }
.badge-danger { color: var(--danger); background: #fff0f2; }
.badge-primary { color: var(--primary-700); background: var(--primary-100); }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 40px 24px; }
  .auth-mobile-logo-wrap { display: block; margin-bottom: 42px; }
  .auth-mobile-logo { width: min(310px, 78%); margin-inline: auto; }
}

@media (max-width: 520px) {
  .auth-form-panel { align-items: flex-start; padding: 28px 20px 36px; }
  .auth-mobile-logo-wrap { margin-bottom: 34px; }
  .auth-heading { margin-bottom: 24px; }
  .auth-register-actions { grid-template-columns: 1fr; }
  .app-container { width: min(100% - 28px, var(--container)); }
}
