:root {
    --primary: #2563eb;
    --secondary: #0f766e;
    --accent: #f59e0b;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-soft: rgba(148, 163, 184, 0.28);
    --sidebar-width: 280px;
}

body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-header p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.nav-menu,
.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active-link {
    color: white;
    background-color: rgba(255, 255, 255, 0.12);
    border-left-color: white;
}

.nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.18);
}

.nav-submenu.show {
    display: block;
}

.nav-submenu .nav-link {
    padding-left: 45px;
    font-size: 14px;
}

.nav-item.has-submenu > .nav-link {
    cursor: pointer;
    justify-content: space-between;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.navbar-custom {
    background: white;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    padding: 0 30px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-brand-custom {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-info p {
    margin: 0;
    font-size: 13px;
    color: #999;
}

.user-info strong {
    display: block;
    color: #333;
    font-size: 14px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.btn-logout {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.content {
    flex: 1;
    padding: 30px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.page-header p {
    color: #777;
    font-size: 14px;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card-custom {
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.card-custom-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 22px;
    text-align: center;
}

.card-custom-header i {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
}

.card-custom-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-custom-body {
    padding: 20px;
    text-align: center;
}

.card-custom-body p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 15px 30px;
    text-align: right;
    color: #999;
    font-size: 13px;
}

.footer strong {
    color: #333;
    margin-right: 5px;
}

@media (max-width: 991px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

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

    .wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .navbar-custom,
    .content,
    .footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .navbar-custom,
    .user-profile {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .page-header h1 {
        font-size: 24px;
    }
}
