:root {
    --brand-brown: #6B3E2E;
    --brand-gold: #C89B3C;
    --brand-cream: #FDF8F5;
    --brand-soft: #F8EDE7;

    --text-dark: #1e1e1e;
    --text-muted: #777;

    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.65);

    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.08);

    --sidebar-bg: #fffaf7;
    --sidebar-hover: #fde9e3;
    --sidebar-active: linear-gradient(135deg, #f99583, #f76c6c);
    --sidebar-text: #4b3a2f;
    --sidebar-icon: #c77b5a;
}

/* =========================
   GLOBAL
========================= */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #FDF8F5, #F7EDE7);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Smooth Page Fade */
.page-fade {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* =========================
   PREMIUM BUTTON
========================= */
.btn-brand {
    background: linear-gradient(135deg, var(--brand-brown), var(--brand-gold));
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(107, 62, 46, 0.25);
}

.btn-brand:hover {
    box-shadow: 0 15px 40px rgba(107, 62, 46, 0.35);
    color: var(--brand-gold);
    background: #fff;
    border: 1px solid var(--brand-brown);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.30);
}

.btn-danger:hover {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.40);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.25);
}

.brand-link {
    color: var(--brand-brown);
    font-weight: 500;
    transition: 0.3s ease;
}

.brand-link:hover {
    color: #d9544f;
}

/* =========================
   FLOATING CARDS
========================= */
.card-brand {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: none;
    transition: all 0.3s ease;
}

.card-brand:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

/* Glass Version */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =========================
   NAVBAR
========================= */
.navbar {
    background: #ffe4b1 !important;
    padding: 15px 25px;
    border-bottom: 1px solid #f2f2f2;
}

.navbar-brand {
    font-weight: 600;
    color: var(--brand-brown) !important;
    letter-spacing: 0.5px;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: 80px !important;
    padding: 20px 10px;
}

.sidebar.collapsed a span {
    display: none;
}

.sidebar.collapsed a {
    justify-content: center;
}

.sidebar.collapsed a i {
    margin-right: 0;
    font-size: 18px;
}

/* Smooth transition */
.sidebar {
    width: 250px;
    transition: all 0.3s ease;
}
/* =========================
   DESKTOP SIDEBAR
========================= */
.sidebar {
    width: 250px;
    transition: all 0.3s ease;
}

/* =========================
   MOBILE SIDEBAR
========================= */
@media (max-width: 992px) {

    .sidebar {
        position: fixed;
        top: 0;
        left: -260px; /* Hidden by default */
        height: 100vh;
        width: 250px;
        z-index: 1050;
        background: #fffaf7;
        transition: left 0.3s ease;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .main-content {
        width: 100%;
    }
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}
/* =========================
   SIDEBAR - FRIENDLY PREMIUM
========================= */

.sidebar {
    background: #fffaf7;
    min-height: 100vh;
    border-right: 1px solid #f3dfd7;
    transition: all 0.3s ease;
}

/* Links */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    color: #4b3a2f;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

/* Icons inside sidebar */
.sidebar a i {
    font-size: 16px;
    color: #c77b5a;
    transition: all 0.25s ease;
}

/* Hover */
.sidebar a:hover {
    background: #fde9e3;
    color: #6b3e2e;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.sidebar a:hover i {
    color: #f76c6c;
}

/* Active */
.sidebar a.active {
    background: linear-gradient(135deg,#f99583,#f76c6c);
    color: #fff;
    box-shadow: 0 8px 20px rgba(247,108,108,0.25);
}

.sidebar a.active i {
    color: #fff;
}

/* =========================
   METRIC COUNTER
========================= */

.metric-number {
    font-size: 30px;
    font-weight: 700;
    color: #6b3e2e;
}

/* =========================
   DARK MODE (IMPROVED)
========================= */

.dark-mode {
    background: #121212;
    color: #f5f5f5;
}

.dark-mode .sidebar {
    background: #1b1b1b;
    border-right: 1px solid #2a2a2a;
}

.dark-mode .sidebar a {
    color: #ddd;
}

.dark-mode .sidebar a i {
    color: #aaa;
}

.dark-mode .sidebar a:hover {
    background: #2a2a2a;
    color: #fff;
}

.dark-mode .sidebar a.active {
    background: linear-gradient(135deg,#f99583,#f76c6c);
    color: #fff;
}

/* =========================
   MOBILE SIDEBAR
========================= */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100%;
        z-index: 1050;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        left: 0;
    }
}

/* =========================
   ENTERPRISE LAYOUT SYSTEM
========================= */

.layout-wrapper {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    left: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    padding-top: 20px;
    transition: all 0.3s ease;
}

/* Main content */
.main-content {
    margin-left: 260px;
    padding: 30px;
    width: 100%;
    margin-top: 20px;
}

/* Mobile */
@media (max-width: 992px) {

    .sidebar {
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 1050;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Modal Header Gradient */
#messageHeader {
    background: linear-gradient(135deg, #f99583, #f76c6c);
}

/* Icon Circle */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: scaleIn 0.3s ease;
}

/* Smooth Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Gradient Header */
#confirmHeader {
    background: linear-gradient(135deg, #f99583, #f76c6c);
}

/* Warning Icon Circle */
.icon-circle-warning {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: scaleIn 0.3s ease;
}

/* Smooth Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Container */
.otp-modal {
    border-radius: 20px;
    overflow: hidden;
    animation: fadeSlideUp 0.4s ease;
}

/* Header Gradient */
.otp-header {
    background: linear-gradient(135deg, #f99583, #ffb199);
    padding: 18px 20px;
    border-bottom: none;
}

/* Icon Circle */
.otp-icon {
    font-size: 45px;
    color: #f99583;
    background: #fff3f0;
    width: 80px;
    height: 80px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* OTP Boxes */
.otp-box {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.otp-box:focus {
    border-color: #f99583;
    box-shadow: 0 0 0 3px rgba(249, 149, 131, 0.2);
}

/* Resend link */
.resend-link {
    color: #f99583;
    text-decoration: none;
    font-weight: 500;
}

.resend-link:hover {
    text-decoration: underline;
}

/* Animation */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.btn i {
    vertical-align: middle;
}

/* =========================================
   GLOBAL LOADER
========================================= */

.app-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeInLoader 0.3s ease;
}

.loader-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    min-width: 220px;
}

.loader-text {
    font-weight: 500;
    color: #333;
    margin: 0;
}

@keyframes fadeInLoader {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.text-brand {
    color: #f99583 !important;
}

/* Toast Container */
#globalToastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Toast Card */
.custom-toast {
    min-width: 280px;
    max-width: 350px;
    padding: 14px 18px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.35s ease forwards;
    position: relative;
    overflow: hidden;
}

/* Icons */
.custom-toast i {
    margin-right: 8px;
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    animation: progressBar linear forwards;
}

/* Types */
.toast-success { background: linear-gradient(135deg, #28a745, #3ddc84); }
.toast-error { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.toast-warning { background: linear-gradient(135deg, #ffc107, #ffdb58); color:#000; }
.toast-info { background: linear-gradient(135deg, #0d6efd, #4dabf7); }

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    to { opacity: 0; transform: translateX(40px); }
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* Modal Width Enhancement */
.modal-md {
    max-width: 520px;
}

/* Gradient Header */
.confirm-header {
    background: linear-gradient(135deg, #ffb347, #ffcc33);
}

/* Icon Circle */
.confirm-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Smooth Entrance */
.confirm-modal {
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}