* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0A0806;
    --bg-card: #13100C;
    --bg-elevated: #1C1813;
    --gold-primary: #C9A03D;
    --gold-secondary: #D4AF37;
    --gold-light: #E8D5A3;
    --gold-dark: #A0782C;
    --text-primary: #F5F0E8;
    --text-secondary: #C4B998;
    --text-muted: #8A7F6E;
    --border-gold: rgba(201, 160, 61, 0.25);
    --shadow-gold: 0 0 30px rgba(201, 160, 61, 0.1);
    --shadow-card: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
    --lulus-text: #4ADE80;
    --tidak-text: #F87171;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #0A0806 0%, #1A1510 50%, #0A0806 100%);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('logo-smkn4.png');
    background-repeat: repeat;
    background-size: 80px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 8, 6, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.countdown-card {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
    background: linear-gradient(145deg, var(--bg-card), #0D0A07);
    border-radius: 32px;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.countdown-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 30px rgba(201, 160, 61, 0.3);
}

.countdown-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.countdown-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.countdown-timer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-block {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 1rem;
    min-width: 70px;
    border: 1px solid var(--border-gold);
}

.timer-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold-primary);
    font-family: monospace;
}

.timer-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(201, 160, 61, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Login Wrapper */
.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.login-card {
    max-width: 450px;
    width: 100%;
    background: linear-gradient(145deg, rgba(19, 16, 12, 0.95), rgba(13, 10, 7, 0.98));
    backdrop-filter: blur(10px);
    border-radius: 32px;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.login-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-gold);
}

.logo-sekolah {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(201, 160, 61, 0.3);
}

.school-name {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-app {
    margin-top: 0.75rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(20, 17, 12, 0.8);
    border: 1.5px solid var(--border-gold);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(201, 160, 61, 0.2);
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border: none;
    border-radius: 16px;
    color: #1A1A1A;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 160, 61, 0.3);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.info-card {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
    text-align: center;
}

.info-card p {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.copyright, .copyright-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-gold);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.copyright span, .copyright-footer span {
    color: var(--gold-primary);
}

/* Navigation */
.top-nav {
    background: rgba(19, 16, 12, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.logo-text h1 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.logo-text p {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(201, 160, 61, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(201, 160, 61, 0.2);
}

/* Main Content Dashboard */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Certificate Card */
.certificate-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-gold);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
}

.certificate-card.lulus {
    border: 1px solid rgba(74, 222, 128, 0.3);
    background: linear-gradient(145deg, rgba(74, 222, 128, 0.03), var(--bg-elevated));
}

.certificate-card.tidak-lulus {
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px dashed rgba(201, 160, 61, 0.15);
    border-radius: 16px;
    pointer-events: none;
}

.status-badge {
    text-align: center;
    margin-bottom: 1.5rem;
}

.seal {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
}

.status-text-lulus {
    color: var(--lulus-text);
}

.status-text-tidak {
    color: var(--tidak-text);
    font-size: 1.25rem;
}

.student-name {
    text-align: center;
    margin: 1rem 0;
}

.student-name h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.student-details {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.detail-item {
    text-align: center;
}

.detail-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.announcement-text {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 1.5rem 0;
    padding: 1rem;
    border-top: 1px solid var(--border-gold);
    border-bottom: 1px solid var(--border-gold);
}

.announcement-text strong {
    color: var(--gold-primary);
}

.announcement-text-lulus strong {
    color: var(--lulus-text);
}

.info-schedule {
    background: rgba(201, 160, 61, 0.05);
    border-radius: 20px;
    padding: 1.25rem;
    margin: 1.25rem 0;
}

.schedule-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.schedule-header .icon {
    font-size: 1.2rem;
}

.schedule-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 1px;
}

.schedule-detail {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.schedule-item {
    text-align: center;
    flex: 1;
    min-width: 180px;
}

.schedule-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.schedule-time {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.schedule-note {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.schedule-divider {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.info-box {
    text-align: center;
    padding: 0.75rem;
}

.info-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.signature {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gold);
}

.signature-line {
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    margin: 0.5rem auto;
}

.signature-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-primary);
}

.signature-title {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(74, 222, 128, 0.9);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    z-index: 1000;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .login-header {
        padding: 1.5rem;
    }
    .certificate-card {
        padding: 1.25rem;
    }
    .student-name h2 {
        font-size: 1.25rem;
    }
    .status-text-lulus {
        font-size: 1.2rem;
    }
    .timer-number {
        font-size: 1.5rem;
    }
    .timer-block {
        min-width: 55px;
        padding: 0.6rem;
    }
    .schedule-detail {
        flex-direction: column;
        align-items: center;
    }
    .nav-container {
        padding: 0 1rem;
    }
    .logo-text h1 {
        font-size: 0.7rem;
    }
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Menghilangkan background suggestion pada input */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Menghilangkan panah spinners pada number (jika pakai type number) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}