/* Dashboard Layout */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

.dashboard-container {
    display: grid;
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.3s ease;
}

.dashboard-container.sidebar-expanded {
    grid-template-columns: var(--sidebar-width) 1fr;
}

/* Sidebar */
.sidebar {
    background: var(--brand-navy);
    color: white;
    padding: 2rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
    overflow-x: hidden;
    width: var(--sidebar-collapsed-width);
    transition: width 0.3s ease;
}

.dashboard-container.sidebar-expanded .sidebar {
    width: var(--sidebar-width);
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto 1rem auto;
    transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-brand {
    padding: 0 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.sidebar-logo {
    max-width: 100%;
    filter: brightness(0) invert(1);
    /* Make logo white for dark sidebar */
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link-item span {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    display: none;
}

.dashboard-container.sidebar-expanded .nav-link-item span {
    opacity: 1;
    visibility: visible;
    display: inline;
}

.dashboard-container.sidebar-expanded .nav-link-item {
    padding: 0.75rem 1.25rem;
}

.nav-link-item:hover,
.nav-link-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link-item i {
    font-size: 1.25rem;
    min-width: 24px;
    text-align: center;
}

.dashboard-container:not(.sidebar-expanded) .sidebar-brand h2,
.dashboard-container:not(.sidebar-expanded) .sidebar small {
    display: none !important;
}

/* Main Content Area */
.main-content {
    background: var(--bg-main);
    padding: 2rem;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Dashboard Cards */
.stats-grid,
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-navy);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Table Enhancements */
.table-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.braceless-table {
    width: 100%;
    border-collapse: collapse;
}

.braceless-table th {
    background: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.braceless-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.875rem;
}

.braceless-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .top-bar,
    .no-print {
        display: none !important;
    }

    .dashboard-container {
        display: block;
    }

    .main-content {
        padding: 0;
        background: white;
    }
}