:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: var(--text-primary);
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    color: #f8fafc;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
}

.sidebar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-nav .nav-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 1rem 1rem 0.5rem;
    font-weight: 700;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
}

.content-container {
    padding: 1.75rem;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Stat Cards */
.stat-card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    border: none;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Status Badges */
.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-soft-info {
    background-color: #e0f2fe;
    color: #075985;
}

.badge-soft-primary {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Checklist Switch Table */
.checklist-table td {
    vertical-align: middle;
}

.status-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Spin Wheel Styling */
.spin-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

#wheelCanvas {
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 8px solid #ffffff;
    background-color: #ffffff;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 35px solid #ef4444;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border: 4px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.wheel-center-button:active {
    transform: translate(-50%, -50%) scale(0.92);
}

/* Winner Banner */
.winner-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed #f59e0b;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: "👑";
    position: absolute;
    font-size: 6rem;
    right: -15px;
    bottom: -20px;
    opacity: 0.15;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }

    .app-sidebar.show {
        left: 0;
    }
}


/* =========================================
   FLASH NOTIFICATION
   Tidak mengambil ruang layout
========================================= */

.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);

    width: min(500px, calc(100% - 30px));

    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 10px;

    pointer-events: none;
}

.flash-alert {
    margin: 0;
    pointer-events: auto;

    border-radius: 10px;

    padding: 12px 14px;

    animation: flashSlideDown 0.3s ease-out;
}

@keyframes flashSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   LOGIN PAGE
========================================= */

.login-page {
    min-height: calc(100vh - 0px);

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 16px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-container .card {
    border-radius: 16px;
}


/* Input Login */

.login-container .input-group-text,
.login-container .form-control {
    min-height: 46px;
}

.login-container .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}


/* Button Login */

.login-container .btn-primary {
    min-height: 46px;
    border-radius: 8px;
}


/* =========================================
   LOGIN - MOBILE
========================================= */

@media (max-width: 576px) {

    .flash-container {
        top: 12px;
        width: calc(100% - 24px);
    }

    .flash-alert {
        font-size: 0.9rem;
    }

    .login-page {
        padding: 20px 14px;
    }

    .login-container {
        max-width: 100%;
    }

    .login-container .card-body {
        padding: 28px 22px !important;
    }

}


/* =========================================
   LOGIN CONTENT FULL SCREEN
========================================= */

.main-wrapper:has(.login-page) {
    min-height: 100vh;
}

.main-wrapper:has(.login-page) .content-container {
    padding: 0;
    min-height: 100vh;
}