:root {
    --color-primary: #ffff00;
    --color-primary-dark: #cc8f00;
    --color-ok: #16a34a;
    --color-warn: #d97706;
    --color-bad: #dc2626;
    --color-bg: #f3f4f6;
    --color-card: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

.page-wide {
    max-width: 1100px;
}

.page-narrow {
    max-width: 420px;
    padding-top: 64px;
}

.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.page-header h1 {
    margin: 0 0 4px;
    font-size: 1.6rem;
}

.subtitle {
    margin: 0;
    color: var(--color-text-muted);
}

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.step h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-top: 0;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-text);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.field {
    margin-bottom: 14px;
}

.field-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.field-row .field {
    flex: 1;
    min-width: 220px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="file"],
.field select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.hint {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text);
}

.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
    background: #e5e7eb;
    color: var(--color-text);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.82rem;
}

.spinner {
    margin-left: 10px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.result-block {
    margin-top: 18px;
    border-top: 1px dashed var(--color-border);
    padding-top: 16px;
}

.chart-container {
    max-width: 420px;
    margin: 0 auto 16px;
}

.chart-container-sm {
    max-width: 220px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.9rem;
}

.table th, .table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: #f9fafb;
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.table th.sortable:hover {
    background: #f0f1f3;
}

.sort-indicator {
    display: inline-block;
    width: 12px;
    color: var(--color-primary-dark);
    font-size: 0.75rem;
}

.status-relevan_lengkap { color: var(--color-ok); font-weight: 600; }
.status-relevan_tidak_lengkap { color: var(--color-warn); font-weight: 600; }
.status-tidak_relevan { color: var(--color-bad); font-weight: 600; }
.status-tidak_ada_lampiran { color: var(--color-text-muted); font-weight: 600; }

.stats-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.stats-panel-5 {
    grid-template-columns: repeat(5, 1fr);
}

.progress-bar {
    display: inline-block;
    width: 120px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
}

.progress-bar-fill-alt {
    background: #7c3aed;
}

.progress-label {
    margin-left: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.issue-list {
    margin: 4px 0 0;
    padding-left: 18px;
    font-size: 0.85rem;
}

.stat {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.stat-ok .stat-value { color: var(--color-ok); }
.stat-warn .stat-value { color: var(--color-warn); }
.stat-bad .stat-value { color: var(--color-bad); }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
}

.modal[hidden] {
    display: none;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    max-width: 480px;
    width: 100%;
}

.modal-box-wide {
    max-width: 640px;
}

.modal-question {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.modal-filename {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.btn-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fab-about {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    z-index: 90;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-about:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.fab-about svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 480px) {
    .stats-panel,
    .stats-panel-5 { grid-template-columns: repeat(2, 1fr); }
}
