:root {
    --bg-body: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --card-border: 1px solid #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --label-color: #334155;
    --input-bg: #f8fafc;
    --input-text: #0f172a;
    --input-focus-border: #0284c7;
    --input-focus-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    --btn-bg: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    --btn-text: #ffffff;
    --btn-hover: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
    --radius-card: 16px;
    --radius-input: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding: 40px 20px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Combined Hero Header & Countdown Card */
.hero-card {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--radius-card);
    padding: 30px 35px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.hero-info { flex: 1.2; }

.hero-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}

.hero-info p.description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.hero-countdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-align: center;
}

.timer-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.timer-block {
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    min-width: 65px;
    text-align: center;
}

.timer-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
}

.timer-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.progress-container {
    width: 100%;
    background-color: #f1f5f9;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--btn-bg);
    width: 0%;
    transition: width 0.6s ease;
}

/* Layout Grid Equal Height */
.main-grid {
    display: grid;
    grid-template-columns: 6fr 6fr;
    gap: 25px;
    align-items: stretch;
}

.card-panel {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: var(--card-shadow);
}

.panel-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

/* Form Styling */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.full-width { grid-column: span 2; }
.form-group { margin-bottom: 10px; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--label-color);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--input-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-input);
    color: var(--input-text);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--btn-bg);
    border: none;
    border-radius: var(--radius-input);
    color: var(--btn-text);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: var(--btn-hover);
    transform: translateY(-1px);
}

/* Alert Styling */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius-input);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* Right Column Layout */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.stat-card-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-box-total {
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 15px;
}

.stat-box-total .num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.chart-unit-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex: 1;
}

.chart-container-large {
    position: relative;
    flex: 1.2;
    max-width: 340px;
    margin: 0 auto;
}

.unit-list-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-view-data {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: auto;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-view-data:hover {
    background: #e2e8f0;
    color: #0284c7;
}

.info-list { list-style: none; }

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: var(--text-main);
}

.info-list li:last-child { border-bottom: none; }

.badge-count {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.section-subtitle {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 12px 0 6px 0;
}

/* ==========================================================================
   MODAL PANDUAN & KAMUS FIELD STYLING
   ========================================================================== */
.btn-info-guide {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-info-guide:hover {
    background-color: #0284c7;
    color: #ffffff;
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-dialog {
    transform: translateY(0);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.btn-close:hover { color: #0f172a; }

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.6;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #334155;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover { background-color: #cbd5e1; }

.table-kamus {
    width: 100%;
    border-collapse: collapse;
}

.table-kamus td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.table-kamus tr:last-child td { border-bottom: none; }

.table-kamus .label-cell {
    width: 35%;
    background-color: #f8fafc;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-card { flex-direction: column; text-align: center; padding: 25px 20px; }
    .hero-info h1 { justify-content: center; }
    .main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .chart-unit-wrapper { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .timer-grid { gap: 6px; }
    .timer-block { min-width: 55px; padding: 8px; }
    .table-kamus td { display: block; width: 100% !important; }
}