/* ============================================
   PPDB MAN 1 ACEH BARAT — CSS DESIGN SYSTEM
   app.css — Core variables, reset & utilities
   ============================================ */

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

/* ── CSS Variables ─────────────────────────── */
:root {
    --primary:        #1e40af;
    --primary-light:  #3b82f6;
    --primary-dark:   #1e3a8a;
    --primary-glow:   rgba(59,130,246,0.18);

    --success:        #059669;
    --success-light:  #d1fae5;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --warning:        #d97706;
    --warning-light:  #fef3c7;
    --info:           #0891b2;
    --info-light:     #e0f2fe;

    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --white: #ffffff;
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 14px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.07);
    --shadow-xl:  0 20px 50px rgba(0,0,0,.18);

    --transition: 0.22s ease;
    --font-base: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--gray-900); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p  { margin-bottom: .75rem; color: var(--gray-600); }
p:last-child { margin-bottom: 0; }

/* ── Utility Buttons ──────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.2rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-primary   { background: var(--primary-light); color: #fff; box-shadow: 0 4px 12px var(--primary-glow); }
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; transform: translateY(-1px); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; transform: translateY(-1px); }
.btn-info      { background: var(--info); color: #fff; }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-sm { padding: .35rem .85rem; font-size: .78rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ───────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.card-body { padding: 1.5rem; }
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-800);
}

/* ── Badges ───────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .3rem .75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: .75rem;
    text-transform: capitalize;
}
.badge-pending  { background: var(--warning-light); color: #92400e; }
.badge-verified { background: var(--success-light); color: #065f46; }
.badge-rejected { background: var(--danger-light);  color: #991b1b; }

/* ── Alerts ──────────────────────────────────── */
.alert {
    padding: .85rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 500;
    font-size: .9rem;
    animation: slideDown .3s ease;
}
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #6ee7b7; }
.alert-danger  { background: var(--danger-light);  color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: var(--info-light);    color: #0c4a6e; border: 1px solid #7dd3fc; }

/* ── Form Elements ───────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: .45rem;
}
.required-star { color: var(--danger); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: .65rem .95rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: .9rem;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input.error, .form-select.error, .form-textarea.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
.form-error {
    display: block;
    color: var(--danger);
    font-size: .78rem;
    margin-top: .3rem;
}
.form-textarea { min-height: 90px; resize: vertical; }

/* ── Grid ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* ── Animations ───────────────────────────────── */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }
.fade-in { animation: slideDown .3s ease; }

/* ── Utilities ────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-500); font-size: .875rem; }
.fw-bold     { font-weight: 700; }
.fw-medium   { font-weight: 600; }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.d-none { display: none; }
.hidden { display: none; }
.w-full { width: 100%; }
