/* ============================================
   SPMB SMA NEGERI 1 BOJONEGORO
   Main Form Styles
   ============================================ */

:root {
    --primary:       #1e40af;
    --primary-light: #3b82f6;
    --primary-dark:  #1e3a8a;
    --accent:        #0ea5e9;
    --accent-light:  #38bdf8;
    --success:       #10b981;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --surface:       #ffffff;
    --surface-2:     #f8fafc;
    --surface-3:     #f1f5f9;
    --border:        #e2e8f0;
    --border-focus:  #3b82f6;
    --text-primary:  #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;
    --shadow-sm:     0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    --shadow-md:     0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --shadow-lg:     0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --shadow-xl:     0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     16px;
    --radius-xl:     24px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface-2);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================
   NAVBAR TOP
   =========================== */
.navbar-top {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgb(30 58 138 / .3);
}

.navbar-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.navbar-brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.school-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgb(0 0 0 / .2));
    transition: transform .3s ease;
}
.school-logo:hover { transform: scale(1.05); }

.school-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.school-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.school-subtitle {
    font-size: .78rem;
    color: rgb(255 255 255 / .75);
    font-weight: 400;
    letter-spacing: .02em;
}

.year-badge {
    background: rgb(255 255 255 / .18);
    border: 1px solid rgb(255 255 255 / .3);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .03em;
    backdrop-filter: blur(8px);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero-section {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 45%, #1d4ed8 100%);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: .08;
    background: #fff;
}
.shape-1 { width: 400px; height: 400px; top: -150px; right: -100px; }
.shape-2 { width: 250px; height: 250px; bottom: -80px; left: 5%; }
.shape-3 { width: 150px; height: 150px; top: 20%; left: 40%; opacity: .05; }

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgb(255 255 255 / .15);
    border: 1px solid rgb(255 255 255 / .25);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: fadeInDown .6s ease;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: 20px;
    animation: fadeInUp .7s ease .1s both;
}

.text-accent {
    background: linear-gradient(135deg, var(--accent-light), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgb(255 255 255 / .8);
    line-height: 1.7;
    animation: fadeInUp .7s ease .2s both;
}

/* ===========================
   FORM SECTION
   =========================== */
.form-section {
    padding: 0 0 60px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.form-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===========================
   ALERTS
   =========================== */
.alert-custom {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    animation: fadeInDown .4s ease;
    position: relative;
}

.alert-danger-custom {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
}

.alert-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-body { flex: 1; }
.alert-body strong { display: block; font-weight: 600; margin-bottom: 4px; }
.alert-body p { margin: 0; font-size: .9rem; }

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    opacity: .7;
    transition: opacity .2s;
    flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }

/* ===========================
   FORM CARD
   =========================== */
.form-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.form-header-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgb(30 64 175 / .3);
}

.form-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.form-card-subtitle {
    font-size: .85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ===========================
   FORM SECTIONS
   =========================== */
.form-section-group {
    padding: 28px 32px;
    border-bottom: 1px solid var(--surface-3);
    transition: background .2s;
}
.form-section-group:last-of-type { border-bottom: none; }
.form-section-group:hover { background: #fafbff; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--primary);
    background: #eff6ff;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 22px;
}

/* ===========================
   FORM CONTROLS
   =========================== */
.form-label-custom {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.label-hint {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
    transition: color .2s;
}

.input-icon-top {
    top: 14px;
    align-self: flex-start;
}

.form-control-custom {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
    appearance: none;
}

.form-control-custom::placeholder { color: var(--text-muted); }

.form-control-custom:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(59 130 246 / .15);
    background: #fff;
}

.form-control-custom:focus + .input-icon,
.input-with-icon:focus-within .input-icon {
    color: var(--primary-light);
}

.form-control-custom.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgb(239 68 68 / .1);
}

.form-select-custom {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}

.form-textarea-custom {
    resize: vertical;
    min-height: 90px;
    padding-top: 14px;
    line-height: 1.6;
}

.input-with-icon-textarea {
    align-items: flex-start;
}

.invalid-feedback-custom {
    font-size: .8rem;
    color: var(--danger);
    margin-top: 6px;
    display: none;
}
.is-invalid ~ .invalid-feedback-custom { display: block; }

/* ===========================
   SUBMIT BUTTON
   =========================== */
.form-submit-wrap {
    padding: 28px 32px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(to right, #f8fafc, #fff);
}

.submit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-secondary);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: 0 4px 14px rgb(30 64 175 / .35);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fff 0%, transparent 100%);
    opacity: 0;
    transition: opacity .2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgb(30 64 175 / .4);
}

.btn-submit:hover::before { opacity: .08; }

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgb(30 64 175 / .3);
}

.btn-submit-icon { display: flex; align-items: center; }

/* ===========================
   PRIMARY BUTTON
   =========================== */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 14px rgb(30 64 175 / .3);
    cursor: pointer;
}
.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgb(30 64 175 / .4);
    color: #fff;
}

/* ===========================
   SUCCESS CARD
   =========================== */
.result-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 40px;
    text-align: center;
    border: 1px solid var(--border);
}

.success-card {
    border-top: 4px solid var(--success);
}

.result-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--success);
    animation: bounceIn .6s ease;
}

.result-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.result-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.nisn-display {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 16px 40px;
    margin-bottom: 20px;
    gap: 4px;
}

.nisn-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #065f46;
}

.nisn-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #047857;
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
}

.result-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--text-muted);
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    background: var(--primary-dark);
    color: rgb(255 255 255 / .7);
    padding: 32px 0;
    margin-top: auto;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: .85;
}

.footer-info { flex: 1; }

.footer-school {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 4px;
}

.footer-address, .footer-copy {
    font-size: .82rem;
    margin-bottom: 2px;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0%   { transform: scale(.4); opacity: 0; }
    60%  { transform: scale(1.1); }
    80%  { transform: scale(.95); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-in {
    animation: fadeInUp .5s ease both;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .school-name { font-size: .9rem; }
    .school-subtitle { display: none; }
    .hero-title { font-size: 1.8rem; }
    .hero-section { padding: 40px 0 60px; }
    .form-card-header { padding: 20px; flex-wrap: wrap; }
    .form-section-group { padding: 20px; }
    .form-submit-wrap { padding: 20px; flex-direction: column; align-items: stretch; }
    .btn-submit { justify-content: center; }
    .form-card-header { padding: 18px; }
    .result-card { padding: 32px 20px; }
    .nisn-value { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .navbar-brand-wrap { gap: 10px; }
    .school-logo { width: 42px; height: 42px; }
    .year-badge { font-size: .72rem; padding: 5px 12px; }
}
