* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root[data-theme="light"] {
    --bg-primary: #eef2f7;
    --bg-card: #ffffff;
    --bg-input: #f7f9fc;
    --text-primary: #1a2233;
    --text-secondary: #6b7280;
    --border-color: #dfe4ea;
    --accent: #1e3a8a;
    --accent-hover: #16305f;
    --shadow: 0 10px 40px rgba(30, 58, 138, 0.12);
    --error-bg: #fde8e8;
    --error-text: #c0392b;
    --navbar-bg: #ffffff;
}

:root[data-theme="dark"] {
    --bg-primary: #0f1420;
    --bg-card: #1a2032;
    --bg-input: #232a3f;
    --text-primary: #e8ecf5;
    --text-secondary: #9aa3b8;
    --border-color: #2d3550;
    --accent: #3b5bdb;
    --accent-hover: #4c6ef5;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --error-bg: #3a1f24;
    --error-text: #ff8787;
    --navbar-bg: #1a2032;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== Theme Switch ===== */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    z-index: 100;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    background: var(--bg-input);
    transition: transform 0.2s ease, background 0.2s ease;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn.active {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

/* Versi theme-switch yang menyatu di dalam navbar (bukan fixed) */
.theme-switch-inline {
    position: static;
    box-shadow: none;
    background: var(--bg-input);
    padding: 4px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 16px;
}

.login-card h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--accent);
}

.btn-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-submit:hover {
    background: var(--accent-hover);
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.hint {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Dashboard Page ===== */
.navbar {
    background: var(--navbar-bg);
    box-shadow: var(--shadow);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 15px;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.btn-logout {
    padding: 9px 20px;
    border-radius: 8px;
    background: var(--error-text);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.btn-logout:hover {
    opacity: 0.85;
}

.dashboard-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 76px);
    padding: 20px;
}

.welcome-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

.welcome-card h1 {
    font-size: 22px;
    margin-bottom: 10px;
}

.welcome-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-logout-large {
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    background: var(--error-text);
}

.btn-logout-large:hover {
    background: var(--error-text);
    opacity: 0.85;
}
