:root {
    --primary: #3f6ad8;
    --success: #3ac47d;
    --info: #16aaff;
    --warning: #f7b924;
    --danger: #d92550;
    --secondary: #6c757d;
    --dark: #343a40;
    --light: #f8f9fa;
    --sidebar-width: 280px;
    --navbar-height: 60px;
    --bg-main: #f1f4f6;
    --card-shadow: 0 0.46875rem 2.1875rem rgba(4, 9, 20, 0.03),
        0 0.9375rem 1.40625rem rgba(4, 9, 20, 0.03),
        0 0.25rem 0.53125rem rgba(4, 9, 20, 0.05),
        0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);
}

body {
    background-color: var(--bg-main);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    box-shadow: 7px 0 60px rgba(0, 0, 0, 0.05);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Toggled State */
.app-container.closed-sidebar .app-sidebar {
    transform: translateX(-100%);
}

.app-container.closed-sidebar .app-main {
    margin-left: 0;
}

/* Mobile State */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-main {
        margin-left: 0;
    }

    .app-container.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
    }
}

/* Dashboard Component Styles */
.card {
    background: #fff;
    border-radius: 0.65rem;
    border: 1px solid rgba(26, 54, 126, 0.125);
    box-shadow: 0 0.46875rem 2.1875rem rgba(4, 9, 20, 0.03), 0 0.9375rem 1.40625rem rgba(4, 9, 20, 0.03), 0 0.25rem 0.53125rem rgba(4, 9, 20, 0.05), 0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    word-wrap: break-word;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(26, 54, 126, 0.125);
    font-weight: 700;
    color: var(--primary);
    text-transform: capitalize;
}

.card-body {
    padding: 1.25rem;
    flex: 1 1 auto;
}

.widget-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    gap: 1.25rem;
}

.widget-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.icon-bg-primary { background: linear-gradient(135deg, #3f6ad8 0%, #6386e1 100%); }
.icon-bg-success { background: linear-gradient(135deg, #3ac47d 0%, #52d693 100%); }
.icon-bg-warning { background: linear-gradient(135deg, #f7b924 0%, #fcce5f 100%); }
.icon-bg-danger { background: linear-gradient(135deg, #d92550 0%, #e6567a 100%); }

.widget-content-left {
    display: flex;
    flex-direction: column;
}

.widget-heading {
    opacity: 0.6;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #495057;
}

.widget-numbers {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3f6ad8;
    line-height: 1;
}

/* Dashboard Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #e9ecef;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.app-container.sidebar-mobile-open .sidebar-overlay {
    display: block;
}

/* Hamburger Styles (Minimalistic Elastic Style like Demo) */
.hamburger {
    padding: 10px;
    display: inline-block;
    cursor: pointer;
    transition-property: opacity, filter;
    transition-duration: 0.15s;
    transition-timing-function: linear;
    font: inherit;
    color: inherit;
    text-transform: none;
    background-color: transparent;
    border: 0;
    margin: 0;
    overflow: visible;
    outline: none !important;
}

.hamburger-box {
    width: 24px;
    height: 14px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -6px;
}

.hamburger-inner::after {
    bottom: -6px;
}

/* Elastic Animation Logic */
.hamburger--elastic .hamburger-inner {
    top: 1px;
    transition-duration: 0.275s;
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger--elastic .hamburger-inner::before {
    top: 6px;
    transition: opacity 0.125s 0.275s ease;
}

.hamburger--elastic .hamburger-inner::after {
    top: 12px;
    transition: transform 0.275s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger--elastic.is-active .hamburger-inner {
    transform: translate3d(0, 6px, 0) rotate(135deg);
    transition-delay: 0.075s;
}

.hamburger--elastic.is-active .hamburger-inner::before {
    transition-delay: 0s;
    opacity: 0;
}

.hamburger--elastic.is-active .hamburger-inner::after {
    transform: translate3d(0, -12px, 0) rotate(-270deg);
    transition-delay: 0.075s;
}

/* Header */
.app-header {
    height: var(--navbar-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 990;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sidebar Branding */
.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: var(--primary);
    color: white;
}

.nav-group {
    padding: 1.5rem 1.5rem 0.5rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    gap: 12px;
}

.nav-link:hover,
.nav-link.active {
    background: #eef2ff;
    color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Dashboard UI Components */
.app-page-title {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
}

.content-area {
    padding: 0 2rem 2rem;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: #f1f4f6;
    padding: 8px 15px;
    border-radius: 8px;
    width: 300px;
}

.search-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
}

@media (max-width: 768px) {
    .search-wrapper {
        display: none;
    }
}