:root {
    --sidebar-width: 280px;
    --sidebar-bg: #0f172a;
    --primary-gradient: linear-gradient(135deg, #0d6efd, #00d2ff);
    --body-bg: #f8fafc;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.02);
    --header-bg: rgba(255, 255, 255, 0.85);
    --primary-color: #0d6efd;
    --text-main: #334155;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1050;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 12px 20px;
    margin: 4px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    width: calc(100% - 36px);
    transition: all 0.3s ease;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2);
}

/* Dropdown Logic */
.arrow-icon {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.7rem;
}

.nav-link:not(.collapsed) .arrow-icon {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding-left: 0;
    margin-bottom: 10px;
}

.submenu .nav-link {
    padding: 10px 20px 10px 45px;
    font-size: 0.85rem;
    margin: 2px 18px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 25px;
    min-height: 100vh;
    transition: all 0.4s ease;
}

.header-nav {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin-bottom: 25px;
    margin-top: -25px;
    margin-left: -25px;
    margin-right: -25px;
}

.content-container {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    min-height: calc(100vh - 150px);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Yii2 GridView Styling */
.grid-view {
    padding-top: 20px;
}

.grid-view .table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.grid-view .table thead th {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 15px 20px;
}

.grid-view .table tbody tr {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-view .table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background: #fdfdfd;
}

.grid-view .table tbody td {
    border: none;
    padding: 18px 20px;
    vertical-align: middle;
}

.grid-view .table tbody td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.grid-view .table tbody td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Buttons and UI */
.btn {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

.card {
    border: none;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 10px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* Auth Pages */
.auth-body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3);
    color: #fff;
    font-size: 2rem;
}

