/* ===== CLEAN TITLE ===== */
.kl-title {
    padding: 2.5rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0
}

.kl-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .3rem;
    letter-spacing: -.02em
}

.kl-title p {
    font-size: .92rem;
    color: #64748b;
    margin: 0
}

/* ===== COUNTDOWN ===== */
.kl-cd {
    padding: 4rem 0;
    text-align: center;
    background: #fff;
    min-height: 60vh;
    display: flex;
    align-items: center
}

.kl-cd .container {
    width: 100%
}

/* Animated icon wrapper */
.kl-cd-anim-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center
}

/* Expanding rings */
.kl-cd-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(16, 185, 129, .15);
    animation: ringExpand 3s ease-out infinite
}
.kl-cd-ring-1 { width: 90px; height: 90px; animation-delay: 0s }
.kl-cd-ring-2 { width: 90px; height: 90px; animation-delay: 1s }
.kl-cd-ring-3 { width: 90px; height: 90px; animation-delay: 2s }

@keyframes ringExpand {
    0% { transform: scale(1); opacity: .6; border-color: rgba(16, 185, 129, .3) }
    100% { transform: scale(1.8); opacity: 0; border-color: rgba(16, 185, 129, 0) }
}

/* Center icon */
.kl-cd-glow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #047857, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(16, 185, 129, .25), 0 8px 32px rgba(4, 120, 87, .2);
    position: relative;
    z-index: 2
}

/* Hourglass SVG */
.kl-cd-hourglass {
    width: 36px;
    height: 36px;
    color: #fff;
    animation: hourglassFlip 4s ease-in-out infinite
}

@keyframes hourglassFlip {
    0%, 45% { transform: rotate(0deg) }
    50%, 95% { transform: rotate(180deg) }
    100% { transform: rotate(360deg) }
}

/* Sand fill animations */
.kl-sand-top {
    animation: sandDrain 4s ease-in-out infinite
}
.kl-sand-bottom {
    animation: sandFill 4s ease-in-out infinite
}
@keyframes sandDrain {
    0%, 5% { opacity: .4 }
    45%, 50% { opacity: .05 }
    55%, 95% { opacity: .4 }
    100% { opacity: .4 }
}
@keyframes sandFill {
    0%, 5% { opacity: .05 }
    45%, 50% { opacity: .4 }
    55%, 95% { opacity: .05 }
    100% { opacity: .05 }
}

/* Floating particles */
.kl-cd-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    z-index: 1
}
.kl-cd-p1 {
    animation: orbit1 6s linear infinite;
    opacity: .5
}
.kl-cd-p2 {
    animation: orbit2 8s linear infinite;
    opacity: .35;
    width: 4px;
    height: 4px
}
.kl-cd-p3 {
    animation: orbit3 7s linear infinite;
    opacity: .45;
    width: 5px;
    height: 5px;
    background: #34d399
}
.kl-cd-p4 {
    animation: orbit4 9s linear infinite;
    opacity: .3;
    width: 3px;
    height: 3px;
    background: #6ee7b7
}

@keyframes orbit1 {
    0% { transform: rotate(0deg) translateX(55px) rotate(0deg) }
    100% { transform: rotate(360deg) translateX(55px) rotate(-360deg) }
}
@keyframes orbit2 {
    0% { transform: rotate(90deg) translateX(62px) rotate(-90deg) }
    100% { transform: rotate(450deg) translateX(62px) rotate(-450deg) }
}
@keyframes orbit3 {
    0% { transform: rotate(200deg) translateX(50px) rotate(-200deg) }
    100% { transform: rotate(560deg) translateX(50px) rotate(-560deg) }
}
@keyframes orbit4 {
    0% { transform: rotate(300deg) translateX(58px) rotate(-300deg) }
    100% { transform: rotate(660deg) translateX(58px) rotate(-660deg) }
}

.kl-cd h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .4rem
}

.kl-cd-msg {
    font-size: .95rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7
}

.kl-cd-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem
}

.kl-cd-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    min-width: 100px;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden
}

.kl-cd-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #047857, #10b981)
}

.kl-cd-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    font-variant-numeric: tabular-nums
}

.kl-cd-lbl {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
    font-weight: 700;
    margin-top: .3rem
}

.kl-cd-date {
    font-size: .85rem;
    color: #94a3b8
}

.kl-cd-date strong {
    color: #334155
}

/* ===== FORM SECTION ===== */
.kl-main {
    padding: 3rem 0 4rem;
    background: #fff
}

.kl-main .container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center
}

.kl-info h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .75rem;
    line-height: 1.3
}

.kl-info>p {
    font-size: .95rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 1.75rem
}

.kl-info-features {
    display: flex;
    flex-direction: column;
    gap: .75rem
}

.kl-info-feat {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .88rem;
    color: #475569;
    font-weight: 500
}

.kl-info-feat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f0fdf4;
    color: #047857;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.kl-info-feat-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2px
}

/* Form Card */
.kl-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .06);
    border: 1px solid #e2e8f0;
    overflow: hidden
}

.kl-card-top {
    background: linear-gradient(135deg, #047857, #059669);
    padding: 1.5rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden
}

.kl-card-top::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, .08), transparent);
    border-radius: 50%
}

.kl-card-top * {
    position: relative
}

.kl-card-top h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .15rem
}

.kl-card-top p {
    font-size: .8rem;
    color: rgba(255, 255, 255, .7);
    margin: 0
}

.kl-card-body {
    padding: 1.5rem 1.75rem 1.75rem
}

.kl-fg {
    margin-bottom: 1.15rem
}

.kl-fg label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .4rem
}

.kl-fg label svg {
    color: #047857
}

.kl-fg input {
    width: 100%;
    height: 46px;
    padding: 0 .85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .92rem;
    font-family: inherit;
    transition: all .2s;
    background: #f8fafc;
    box-sizing: border-box
}

.kl-fg input:focus {
    border-color: #047857;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, .08);
    background: #fff
}

.kl-fg .kl-hint {
    font-size: .7rem;
    color: #94a3b8;
    margin-top: .25rem
}

.kl-date-wrap {
    display: flex;
    gap: .5rem;
    position: relative
}

.kl-date-wrap input {
    flex: 1
}

#klTglNative {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    bottom: 0;
    left: 0
}

.kl-date-btn {
    width: 46px;
    height: 46px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #047857;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
    padding: 0
}

.kl-date-btn:hover {
    border-color: #047857;
    background: #ecfdf5
}

.kl-date-btn:focus {
    border-color: #047857;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, .08)
}


.kl-fg-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: .7rem .85rem;
    margin-bottom: 1.15rem;
    font-size: .82rem;
    color: #b91c1c;
    display: none;
    align-items: center;
    gap: .5rem
}

.kl-fg-err svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0
}

.kl-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #047857, #059669);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem
}

.kl-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(4, 120, 87, .25)
}

.kl-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.kl-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite
}

/* ===== RESULT — Elegant Split Layout ===== */
.kl-result { display: none; padding: 2rem 0 4rem; background: #f8faf9; min-height: 80vh }
.kl-result.show { display: block }
.kl-result .container { max-width: 1000px; margin: 0 auto; padding: 0 1rem }

.klr { animation: klrIn .5s both; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); overflow: hidden; border: 1px solid #e5e7eb; }
@keyframes klrIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Split container */
.klr-split { display: flex; min-height: 480px; align-items: stretch; }

/* ── Left panel ── */
.klr-left {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3rem;
    position: relative;
    overflow: hidden
}
.klr.lulus .klr-left { background: #11815b; }
.klr.tidak .klr-left { background: #b91c1c; }
.klr.menunggu .klr-left { background: #b45309; }

.klr-left-deco {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    pointer-events: none
}

.klr-left-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: iconPop .5s .2s both;
    position: relative
}
.klr-left-icon svg { width: 28px; height: 28px; color: #fff }
@keyframes iconPop { 0%{transform:scale(0)} 70%{transform:scale(1.15)} 100%{transform:scale(1)} }

.klr-left-status {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: .7rem;
    position: relative
}
.klr-left-sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,.9);
    line-height: 1.5;
    position: relative
}
.klr-left-sub strong { color: #fff; font-weight: 700; }
.klr-left-school {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    margin-top: .2rem;
    letter-spacing: 0.02em;
}
.klr-left-ta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .5rem 1.25rem;
    background: rgba(255,255,255,.1);
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    position: relative;
    width: fit-content;
}
.klr-left-dl {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.5rem;
    padding: .6rem 1.3rem;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    position: relative;
    align-self: flex-start
}
.klr-left-dl svg { width: 16px; height: 16px }
.klr-left-dl:hover { background: rgba(255,255,255,.28); transform: translateY(-1px) }

/* ── Right panel ── */
.klr-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}
.klr-right-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 2.5rem 1.25rem;
    font-size: .75rem;
    font-weight: 700;
    color: #11815b;
    text-transform: uppercase;
    letter-spacing: .08em
}
.klr-right-head svg { width: 15px; height: 15px; color: #11815b; flex-shrink: 0 }

/* Table */
.klr-table { width: 100%; border-collapse: collapse }
.klr-table tr { border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }
.klr-table tr:hover { background: #f8fafc; }
.klr-table tr:first-child { border-top: 1px solid #f1f5f9; }
.klr-lbl {
    padding: 1.1rem 1rem 1.1rem 2.5rem;
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    width: 190px;
    vertical-align: middle
}
.klr-val {
    padding: 1.1rem 2.5rem 1.1rem 0;
    font-size: .95rem;
    font-weight: 600;
    color: #334155;
    vertical-align: middle
}
.klr-val-name { font-size: 1.05rem; font-weight: 800; color: #0f172a }

.klr-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .85rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.klr-badge.lulus { background: #dcfce7; color: #15803d }
.klr-badge.tidak { background: #fef2f2; color: #b91c1c }
.klr-badge.menunggu { background: #fef3c7; color: #92400e }

/* ── Bottom bar ── */
.klr-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 2.5rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}
.klr-note {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    color: #94a3b8;
    line-height: 1.5;
    flex: 1
}
.klr-note svg { width: 14px; height: 14px; flex-shrink: 0; color: #cbd5e1 }
.klr-btns { display: flex; gap: .75rem; flex-shrink: 0 }
.klr-btn {
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    transition: all .2s;
    border: none;
    text-decoration: none;
    white-space: nowrap
}
.klr-btn svg { width: 15px; height: 15px }
.klr-btn.outline { background: #fff; color: #374151; border: 1px solid #d1d5db }
.klr-btn.outline:hover { background: #f3f4f6 }
.klr-btn.solid { background: #047857; color: #fff }
.klr-btn.solid:hover { background: #065f46 }

/* Not Found */
.kl-notfound {
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeUp .4s both
}

.kl-notfound-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem
}

.kl-notfound-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2px
}

.kl-notfound h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 .4rem
}

.kl-notfound p {
    font-size: .9rem;
    color: #64748b;
    margin: 0 auto;
    line-height: 1.6;
    max-width: 380px
}

/* Not Active */
.kl-na {
    padding: 4rem 0;
    text-align: center;
    min-height: 40vh;
    display: flex;
    align-items: center;
    background: #fff
}

.kl-na .container {
    width: 100%
}

.kl-na-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem
}

.kl-na-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5px
}

/* Confetti */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 400
}

/* Responsive */
@media(max-width:768px) {
    .kl-hero .container {
        flex-direction: column;
        text-align: center
    }

    .kl-hero-left {
        flex-direction: column;
        gap: .5rem
    }

    .kl-cd-grid {
        gap: .65rem
    }

    .kl-cd-box {
        min-width: 70px;
        padding: 1rem .65rem
    }

    .kl-cd-num {
        font-size: 2rem
    }

    .kl-main .container {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .kl-info {
        text-align: center
    }

    .kl-card-body {
        padding: 1.25rem
    }

    .klr-split { flex-direction: column; min-height: auto }
    .klr-left { flex: none; padding: 2.5rem 1.5rem; text-align: center; align-items: center }
    .klr-left-status { font-size: 2rem }
    .klr-left-dl { align-self: center }
    .klr-lbl { width: auto; display: block; padding: .5rem 1.25rem .1rem }
    .klr-val { display: block; padding: .1rem 1.25rem .5rem }
    .klr-table tr { display: block; border-bottom: 1px solid #f3f4f6 }
    .klr-bottom { flex-direction: column; gap: .75rem; padding: 1rem 1.25rem }
    .klr-btns { width: 100% }
    .klr-btn { flex: 1 }
}

/* ===== SWEETALERT CUSTOM ===== */
.kl-swal-popup {
    border-radius: 16px !important;
    padding: 2.5rem 2rem 2rem !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1) !important;
}
.kl-swal-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
.kl-swal-btn {
    background: #047857 !important;
    color: #fff !important;
    border: none !important;
    padding: 0.8rem 2.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 12px rgba(4,120,87,0.2) !important;
    margin-top: 1.5rem !important;
}
.kl-swal-btn:hover {
    background: #065f46 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(4,120,87,0.3) !important;
}