/* Layout styles */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #1e293b;
    color: white;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar {
    width: 260px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    gap: 12px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.2);
    color: white;
    border-left: 3px solid #2563eb;
}

.nav-icon {
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    font-size: 13px;
}

.user-email {
    color: #cbd5e1;
    margin-bottom: 8px;
    word-break: break-all;
}

.logout-link {
    color: #ef4444;
    text-decoration: none;
    font-size: 12px;
}

.logout-link:hover {
    text-decoration: underline;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--background);
}

.content-wrapper {
    padding: 30px;
    max-width: 1400px;
}

/* Auth layout */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Page header */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
}

.pagination a:hover {
    background: var(--background);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state-text {
    margin-bottom: 20px;
}

/* Action buttons in tables */
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    /* Show sidebar when active */
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    /* Adjust main content */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 70px 15px 15px 15px;
    }
    
    /* Page header */
    .page-header {
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Auth layout */
    .auth-layout {
        padding: 20px;
    }
    
    .auth-card {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    /* Tables - make scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px; /* Extend to card edges */
        padding: 0 16px;
    }
    
    .table {
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 8px;
        font-size: 13px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Filter buttons - wrap on mobile */
    .card .flex.gap-2 {
        flex-wrap: wrap;
    }
    
    .card .flex.gap-2 .btn-sm {
        flex: 1 1 auto;
        min-width: 120px;
    }
}
