/* ============================================================
   assets/css/main.css — Styles Utama PTSP MAN 1 Mojokerto
   ============================================================ */

/* ========== ROOT VARIABLES ========== */
:root {
  --green:       #1B6B3A;
  --green-dark:  #0F4423;
  --green-mid:   #2E8B57;
  --green-light: #E8F5EE;
  --green-xlight:#F2FAF5;
  --gold:        #C8922A;
  --gold-light:  #FDF3E0;
  --white:       #ffffff;
  --bg:          #F4F6F9;
  --bg2:         #ECEEF2;
  --border:      #E2E8F0;
  --border2:     #CBD5E1;
  --text:        #1E293B;
  --text2:       #475569;
  --text3:       #94A3B8;
  --red:         #DC2626;
  --red-l:       #FEF2F2;
  --amber:       #D97706;
  --amber-l:     #FFFBEB;
  --blue:        #2563EB;
  --blue-l:      #EFF6FF;
  --purple:      #7C3AED;
  --purple-l:    #F5F3FF;
  --teal:        #0891B2;
  --teal-l:      #ECFEFF;
  --r:           14px;
  --r-sm:        8px;
  --r-lg:        20px;
  --sh:          0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --sh-md:       0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --sh-lg:       0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --sh-xl:       0 20px 60px rgba(0,0,0,.18);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; line-height: 1.6; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a  { text-decoration: none; color: inherit; }
code { font-family: 'Courier New', monospace; }

/* ========== TOPNAV ========== */
.topnav {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 55%, var(--green-mid) 100%);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.topnav-inner { max-width: 1300px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; height: 66px; }
.logo { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.logo-seal { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--gold) 0%, #E5A93A 100%); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; letter-spacing: -.3px; box-shadow: 0 2px 8px rgba(200,146,42,.5); flex-shrink: 0; }
.logo-text strong { display: block; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.logo-text span   { color: rgba(255,255,255,.7); font-size: 11px; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-pill { padding: 7px 16px; border-radius: 100px; font-size: 12.5px; font-weight: 600; border: none; color: rgba(255,255,255,.8); background: transparent; cursor: pointer; transition: all .2s; }
.nav-pill:hover   { background: rgba(255,255,255,.15); color: #fff; }
.nav-active       { background: rgba(255,255,255,.2)  !important; color: #fff !important; }
.nav-cta          { background: var(--gold); color: #fff; box-shadow: 0 2px 8px rgba(200,146,42,.4); }
.nav-cta:hover    { background: #b07820; }

/* ========== HERO ========== */
.hero { background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 45%, #3A9E68 100%); padding: 5rem 1.5rem 4.5rem; text-align: center; position: relative; overflow: hidden; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: 7px 18px; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: .5px; margin-bottom: 1.75rem; }
.hero-badge span { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; display: inline-block; box-shadow: 0 0 6px #4ADE80; }
.hero h1 { font-family: 'DM Serif Display', serif; font-size: 3.2rem; color: #fff; line-height: 1.15; margin-bottom: 1rem; position: relative; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub { color: rgba(255,255,255,.75); font-size: 1.05rem; max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.75; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero { padding: 14px 30px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: all .2s; display: inline-flex; align-items: center; gap: 8px; }
.btn-hero-gold  { background: var(--gold); color: #fff; box-shadow: 0 4px 15px rgba(200,146,42,.4); }
.btn-hero-gold:hover  { background: #b07820; transform: translateY(-2px); }
.btn-hero-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-hero-ghost:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }

/* ========== STATS BAR ========== */
.stats-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 1.25rem 1.5rem; }
.stats-bar-inner { max-width: 1300px; margin: 0 auto; display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.stat-pill { display: flex; align-items: center; gap: 10px; }
.stat-pill-num   { font-size: 1.4rem; font-weight: 800; color: var(--green); }
.stat-pill-label { font-size: 12px; color: var(--text2); font-weight: 500; }
.stat-sep  { width: 1px; background: var(--border); height: 32px; }

/* ========== SECTION ========== */
.section { max-width: 1300px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.section-hd { margin-bottom: 1.5rem; }
.section-hd h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: .35rem; }
.section-hd p  { color: var(--text2); font-size: 13px; }

/* ========== LAYANAN CARDS ========== */
.layanan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.layanan-card { background: #fff; border-radius: var(--r); border: 1.5px solid var(--border); padding: 1.2rem 1.25rem; cursor: pointer; transition: all .22s; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; }
.layanan-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--green); transform: scaleY(0); transition: transform .22s; border-radius: 0 3px 3px 0; }
.layanan-card:hover { border-color: var(--green); box-shadow: var(--sh-md); transform: translateY(-2px); }
.layanan-card:hover::after { transform: scaleY(1); }
.layanan-ico  { width: 50px; height: 50px; border-radius: 12px; background: var(--green-light); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.layanan-info strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; line-height: 1.4; }
.layanan-info span   { font-size: 11.5px; color: var(--text3); }
.layanan-arr  { margin-left: auto; font-size: 18px; color: var(--green); opacity: 0; transition: .2s; flex-shrink: 0; }
.layanan-card:hover .layanan-arr { opacity: 1; }

/* ========== TRACKING ========== */
.tracking-wrap { max-width: 680px; margin: 0 auto; }
.tracking-card { background: #fff; border-radius: var(--r-lg); border: 1.5px solid var(--border); padding: 2rem; box-shadow: var(--sh); }
.track-row { display: flex; gap: 10px; }
.track-inp { flex: 1; padding: 12px 16px; border: 2px solid var(--border2); border-radius: 10px; font-size: 14px; font-family: inherit; outline: none; transition: .2s; text-transform: uppercase; letter-spacing: .5px; }
.track-inp:focus { border-color: var(--green); }

/* Tracking Timeline */
.tl { display: flex; position: relative; margin: 1.5rem 0; }
.tl-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.tl-step:not(:last-child)::after { content: ''; position: absolute; top: 18px; left: calc(50% + 19px); width: calc(100% - 38px); height: 3px; background: var(--border2); border-radius: 3px; }
.tl-step.tl-done:not(:last-child)::after,
.tl-step.tl-active:not(:last-child)::after { background: var(--green); }
.tl-step.tl-rejected:not(:last-child)::after { background: var(--red); }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); color: var(--text3); display: flex; align-items: center; justify-content: center; font-size: 15px; z-index: 1; border: 3px solid var(--border); transition: all .3s; }
.tl-step.tl-done .tl-dot     { background: var(--green); border-color: var(--green); color: #fff; }
.tl-step.tl-active .tl-dot   { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 5px rgba(37,99,235,.15); }
.tl-step.tl-rejected .tl-dot { background: var(--red); border-color: var(--red); color: #fff; }
.tl-label { font-size: 11.5px; font-weight: 700; color: var(--text3); text-align: center; }
.tl-step.tl-done .tl-label, .tl-step.tl-active .tl-label { color: var(--text); }
.tl-time  { font-size: 10px; color: var(--text3); text-align: center; }

/* Detail rows */
.drow { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--bg2); font-size: 13px; }
.drow:last-child { border-bottom: none; }
.drow-lbl { color: var(--text2); }
.drow-val { font-weight: 600; color: var(--text); text-align: right; max-width: 60%; }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; font-family: inherit; transition: all .18s; }
.btn-green  { background: var(--green);  color: #fff; }  .btn-green:hover  { background: var(--green-dark); }
.btn-red    { background: var(--red);    color: #fff; }  .btn-red:hover    { background: #b91c1c; }
.btn-amber  { background: var(--amber);  color: #fff; }  .btn-amber:hover  { background: #b45309; }
.btn-blue   { background: var(--blue);   color: #fff; }  .btn-blue:hover   { background: #1d4ed8; }
.btn-gray   { background: var(--bg);     color: var(--text); border: 1.5px solid var(--border2); }  .btn-gray:hover { background: var(--bg2); }
.btn-ghost  { background: transparent;   color: var(--text2); border: 1.5px solid var(--border); }  .btn-ghost:hover { background: var(--bg); }
.btn-gold   { background: var(--gold);   color: #fff; }  .btn-gold:hover   { background: #b07820; }
.btn-purple { background: var(--purple); color: #fff; }  .btn-purple:hover { background: #6d28d9; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; }

/* ========== CHIPS ========== */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 100px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.chip-antri      { background: var(--amber-l);  color: var(--amber);  }
.chip-proses     { background: var(--blue-l);   color: var(--blue);   }
.chip-selesai    { background: var(--green-light); color: var(--green); }
.chip-ditolak    { background: var(--red-l);    color: var(--red);    }
.chip-superadmin { background: var(--gold-light); color: var(--gold); }
.chip-umum       { background: var(--green-light); color: var(--green); }
.chip-kesiswaan  { background: var(--blue-l);   color: var(--blue);   }
.chip-guru       { background: var(--purple-l); color: var(--purple); }

/* ========== FORMS ========== */
.fg { margin-bottom: 1.1rem; }
.fg:last-child { margin-bottom: 0; }
.fl { display: block; font-size: 12.5px; font-weight: 700; color: var(--text2); margin-bottom: 5px; }
.fl .req { color: var(--red); }
.fi, .fs, .ft { width: 100%; padding: 10px 13px; border: 2px solid var(--border2); border-radius: 9px; font-size: 13.5px; font-family: inherit; outline: none; transition: .2s; background: #fff; color: var(--text); }
.fi:focus, .fs:focus, .ft:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,107,58,.1); }
.ft { resize: vertical; min-height: 90px; }
.fgrid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.fhint { font-size: 11.5px; color: var(--text3); margin-top: 4px; }
.ferr  { font-size: 11.5px; color: var(--red); margin-top: 4px; display: none; }
.ferr.show { display: block; }

/* ========== MODALS ========== */
.overlay { display: none; position: fixed; inset: 0; background: rgba(15,20,30,.55); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(2px); }
.overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--sh-xl); animation: modalIn .25s ease; }
.modal-sm { max-width: 480px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 950px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-hd { padding: 1.25rem 1.5rem; border-bottom: 1.5px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 5; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.modal-title { font-size: 15px; font-weight: 800; color: var(--text); }
.modal-close { width: 32px; height: 32px; border-radius: 8px; background: var(--bg); border: none; cursor: pointer; font-size: 16px; color: var(--text2); display: flex; align-items: center; justify-content: center; transition: .15s; }
.modal-close:hover { background: var(--bg2); color: var(--text); }
.modal-bd { padding: 1.5rem; }
.modal-ft { padding: 1rem 1.5rem; border-top: 1.5px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ========== INFO HIGHLIGHT ========== */
.hl { padding: .85rem 1rem; border-radius: 10px; font-size: 13px; margin-bottom: 1rem; display: flex; gap: 10px; align-items: flex-start; }
.hl-info    { background: var(--blue-l);    color: #1e40af;  border: 1px solid #bfdbfe; }
.hl-warn    { background: var(--amber-l);   color: #92400e;  border: 1px solid #fde68a; }
.hl-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #bbf7d0; }
.hl-danger  { background: var(--red-l);     color: #991b1b;  border: 1px solid #fecaca; }
.hl-ico { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ========== SURAT PREVIEW ========== */
.surat-wrap { background: #f8f8f5; padding: 1.5rem; border-radius: 10px; }
.surat { background: #fff; max-width: 680px; margin: 0 auto; padding: 2.5rem 3rem; font-family: 'Times New Roman', Times, serif; font-size: 13.5px; line-height: 1.9; color: #000; box-shadow: var(--sh-md); min-height: 400px; }
.surat-kop { text-align: center; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 4px double #000; }
.surat-kop-logo { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: .5rem; }
.surat-kop-logo .emblem { width: 72px; height: 72px; background: var(--green-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.surat-kop strong { font-size: 16px; display: block; font-weight: bold; }
.surat-judul { text-align: center; margin: 1.25rem 0 1rem; }
.surat-judul strong { font-size: 15px; font-weight: bold; text-decoration: underline; display: block; letter-spacing: .5px; }
.surat-bio { margin: 1rem 0; padding-left: 2rem; }
.surat-bio tr td:first-child { min-width: 130px; }
.surat-ttd { margin-top: 2rem; }
.ttd-space { height: 80px; }

/* ========== DOWNLOAD CARD ========== */
.dl-card { background: var(--green-light); border: 2px dashed var(--green); border-radius: 12px; padding: 1.25rem; text-align: center; margin-top: 1rem; }
.dl-card p { font-size: 13px; color: var(--green-dark); font-weight: 700; margin-bottom: .75rem; }

/* ========== REJECT CARD ========== */
.reject-card { background: var(--red-l); border: 1.5px solid #FCA5A5; border-radius: 12px; padding: 1rem 1.25rem; margin-top: 1rem; }
.reject-card strong { display: block; color: var(--red); font-size: 13.5px; margin-bottom: .4rem; }
.reject-card p { font-size: 13px; color: #7f1d1d; }

/* ========== RATING ========== */
.stars { display: flex; gap: 6px; }
.star  { font-size: 2rem; cursor: pointer; color: var(--border2); transition: .15s; user-select: none; }
.star.lit { color: var(--gold); }
.star:hover { transform: scale(1.15); }
.rating-card { background: var(--gold-light); border: 1.5px solid #FDE68A; border-radius: 12px; padding: 1.25rem; margin-top: 1rem; }
.rating-card h4 { font-size: 14px; font-weight: 800; margin-bottom: .5rem; }

/* ========== TOAST ========== */
.toast-box { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--green-dark); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--sh-lg); animation: toastIn .3s ease; display: flex; align-items: center; gap: 10px; max-width: 340px; pointer-events: auto; }
.toast.success { background: #15803D; }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--blue); }
.toast.warn    { background: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ========== WA FLOAT ========== */
.wa-float { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 500; width: 52px; height: 52px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 15px rgba(37,211,102,.45); cursor: pointer; text-decoration: none; transition: transform .2s; }
.wa-float:hover { transform: scale(1.1); }

/* ========== FOOTER ========== */
.site-footer { background: var(--green-dark); padding: 2rem 1.5rem 1.5rem; margin-top: 3rem; }
.footer-inner { max-width: 1300px; margin: 0 auto; }
.footer-top { display: flex; gap: 2rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer-brand strong { color: #fff; font-size: 14px; font-weight: 800; display: block; margin-bottom: .4rem; }
.footer-brand p { color: rgba(255,255,255,.55); font-size: 12px; line-height: 1.7; max-width: 260px; }
.footer-links h4 { color: rgba(255,255,255,.8); font-size: 12px; font-weight: 800; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-links a  { display: block; color: rgba(255,255,255,.5); font-size: 12px; margin-bottom: .4rem; transition: .15s; }
.footer-links a:hover { color: #fff; }
.footer-socmed { display: flex; gap: 10px; margin-top: .5rem; }
.soc-btn { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); padding: 7px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,.1); transition: .15s; display: inline-flex; align-items: center; gap: 6px; }
.soc-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.footer-bot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; text-align: center; color: rgba(255,255,255,.35); font-size: 11.5px; }

/* ========== LOGIN ========== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #3A9E68 100%); padding: 1.5rem; }
.login-card { background: #fff; border-radius: var(--r-lg); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--sh-xl); }
.login-top { text-align: center; margin-bottom: 2rem; }
.login-seal { width: 64px; height: 64px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: #fff; margin: 0 auto 1rem; }
.login-top h2 { font-size: 1.1rem; font-weight: 900; color: var(--text); margin-bottom: .25rem; }
.login-top p  { font-size: 12.5px; color: var(--text2); }

/* ========== COPY RESI ========== */
.copy-resi { cursor: pointer; background: var(--green-light); border: 1.5px dashed var(--green); color: var(--green-dark); border-radius: 10px; padding: 1.25rem; text-align: center; margin-bottom: 1rem; }
.copy-resi .big-resi { font-family: 'Courier New', monospace; font-size: 1.75rem; font-weight: 900; color: var(--green); display: block; }

/* ========== WA SIM ========== */
.wa-sim { background: #E3F2FD; border: 1px solid #90CAF9; border-radius: 10px; padding: 1rem; margin-top: 1rem; }
.wa-sim-hd { display: flex; align-items: center; gap: 8px; margin-bottom: .6rem; }
.wa-ico { width: 32px; height: 32px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.wa-sim-hd strong { font-size: 13px; font-weight: 800; color: #1565C0; }
.wa-sim pre { font-family: inherit; font-size: 12.5px; color: var(--text); white-space: pre-wrap; line-height: 1.7; background: #fff; padding: .75rem; border-radius: 8px; }

/* ========== MISC ========== */
.divider     { height: 1px; background: var(--border); margin: 1.25rem 0; }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text2); }
.fw-800      { font-weight: 800; }
.mt1         { margin-top: 1rem; }
.tab-bar     { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; width: fit-content; margin-bottom: 1.5rem; }
.tab-btn     { padding: 8px 20px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; border: none; background: transparent; color: var(--text2); font-family: inherit; transition: .18s; }
.tab-btn.active { background: #fff; color: var(--text); box-shadow: var(--sh); }

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }