/* Font Face Definition */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/poppins/poppins-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/poppins/poppins-v20-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/poppins/poppins-v20-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/poppins/poppins-v20-latin-700.woff2') format('woff2');
}

/* Light Theme Variables (Default) */
:root, [data-bs-theme="light"] {
    --ws-primary:         #059669;   /* Emerald 600 - tombol, link, aksen */
    --ws-primary-hover:   #047857;   /* Emerald 700 - hover state */
    --ws-primary-light:   #D1FAE5;   /* Emerald 100 - background highlight */
    --ws-primary-subtle:  #ECFDF5;   /* Emerald 50 - badge, tag background */
    --ws-bg:              #F9FAFB;   /* Gray 50 - body background */
    --ws-surface:         #FFFFFF;   /* White - card, navbar, sidebar */
    --ws-surface-hover:   #F3F4F6;   /* Gray 100 - hover pada card */
    --ws-border:          #E5E7EB;   /* Gray 200 - border */
    --ws-text:            #111827;   /* Gray 900 - teks utama */
    --ws-text-secondary:  #6B7280;   /* Gray 500 - teks sekunder */
    --ws-text-muted:      #9CA3AF;   /* Gray 400 - teks muted */
    --ws-shadow:          0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --ws-shadow-lg:       0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    /* Bootstrap Overrides */
    --bs-primary: var(--ws-primary);
    --bs-primary-rgb: 5,150,105;
    --bs-body-bg: var(--ws-bg);
    --bs-body-color: var(--ws-text);
    --bs-font-sans-serif: 'Poppins', sans-serif;
}

/* Dark Theme Variables */
[data-bs-theme="dark"] {
    --ws-primary:         #34D399;   /* Emerald 400 */
    --ws-primary-hover:   #6EE7B7;   /* Emerald 300 */
    --ws-primary-light:   #064E3B;   /* Emerald 900 */
    --ws-primary-subtle:  #022C22;   /* Emerald 950 */
    --ws-bg:              #0F172A;   /* Slate 900 */
    --ws-surface:         #1E293B;   /* Slate 800 */
    --ws-surface-hover:   #334155;   /* Slate 700 */
    --ws-border:          #334155;   /* Slate 700 */
    --ws-text:            #F1F5F9;   /* Slate 100 */
    --ws-text-secondary:  #94A3B8;   /* Slate 400 */
    --ws-text-muted:      #64748B;   /* Slate 500 */
    --ws-shadow:          0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --ws-shadow-lg:       0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);

    /* Bootstrap Overrides */
    --bs-primary: var(--ws-primary);
    --bs-primary-rgb: 52,211,153;
    --bs-body-bg: var(--ws-bg);
    --bs-body-color: var(--ws-text);
}

body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--ws-bg);
    color: var(--ws-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--ws-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ws-primary-hover);
}

/* Utility Classes */
.bg-surface {
    background-color: var(--ws-surface) !important;
}

.text-secondary-ws {
    color: var(--ws-text-secondary) !important;
}

.border-ws {
    border-color: var(--ws-border) !important;
}

/* Tab pil (mis. Pengaturan): warna diatur di sini, bukan kelas statis di HTML, agar sorotan ikut tab yang dipilih. */
.nav-pills .nav-link {
    color: var(--ws-text-secondary);
    background-color: var(--ws-surface);
    border: 1px solid var(--ws-border);
}
.nav-pills .nav-link:hover {
    color: var(--ws-text);
}
.nav-pills .nav-link.active {
    color: #FFFFFF;
    background-color: var(--ws-primary);
    border-color: var(--ws-primary);
}
[data-bs-theme="dark"] .nav-pills .nav-link.active {
    color: var(--ws-bg);
}

/* Custom Card */
.card {
    background-color: var(--ws-surface);
    border-color: var(--ws-border);
    box-shadow: var(--ws-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--ws-shadow-lg);
}

/* Custom Button */
.btn-primary {
    background-color: var(--ws-primary);
    border-color: var(--ws-primary);
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ws-primary-hover);
    border-color: var(--ws-primary-hover);
    color: #ffffff;
}


/* Kelas pendukung halaman Panduan (sama dengan aplikasi lain) */
.bg-primary-subtle-ws { background-color: var(--ws-primary-subtle) !important; }

/* Isi panduan operator (general.md §5.8): langkah bernomor, kotak tips/awas */
.isi-panduan { line-height: 1.65; }
.isi-panduan h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
.isi-panduan h3:first-child { margin-top: 0; }
.isi-panduan ol.langkah { counter-reset: langkah; list-style: none; padding-left: 0; }
.isi-panduan ol.langkah > li { counter-increment: langkah; position: relative; padding: 0 0 .65rem 2.4rem; }
.isi-panduan ol.langkah > li::before { content: counter(langkah); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ws-primary-subtle); color: var(--ws-primary); font-weight: 600; font-size: .85rem; display: grid; place-items: center; }
.isi-panduan .tips, .isi-panduan .awas { border-radius: .5rem; padding: .65rem .85rem; margin: .75rem 0; font-size: .925rem; }
.isi-panduan .tips { background: var(--ws-primary-subtle); }
.isi-panduan .awas { background: rgba(220, 53, 69, .1); }
.isi-panduan .tips::before { content: "Tips: "; font-weight: 600; color: var(--ws-primary); }
.isi-panduan .awas::before { content: "Perhatian: "; font-weight: 600; color: #dc3545; }
.isi-panduan .tbl { display: inline-block; padding: 0 .4rem; border: 1px solid var(--ws-border, #dee2e6); border-radius: .3rem; font-size: .85em; font-weight: 500; white-space: nowrap; }
.isi-panduan dl dt { font-weight: 600; }
.isi-panduan dl dd { margin-bottom: .5rem; }
