/* Admin Layout with Sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.sidebar-logo i {
    font-size: 28px;
    color: #fbbf24;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #fbbf24;
}

.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #fbbf24;
    font-weight: 600;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav-item span {
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 12px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* Top Header */
.top-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.sidebar-toggle i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed ~ .main-content .sidebar-toggle i {
    transform: rotate(180deg);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 30px;
    padding-bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* Card inside page content */
.page-content .card {
    flex: 1;
    margin-bottom: 20px;
}

/* Card Styles for Sidebar Layout */
.page-content .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }
}

/* Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animation for sidebar items */
.sidebar-nav-item {
    position: relative;
    overflow: hidden;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.2), transparent);
    transition: width 0.3s ease;
}

.sidebar-nav-item:hover::before,
.sidebar-nav-item.active::before {
    width: 100%;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .sidebar-nav-item {
    position: relative;
}

.sidebar.collapsed .sidebar-nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-left: 10px;
    z-index: 1000;
}

.sidebar.collapsed .sidebar-nav-item:hover::after {
    opacity: 1;
    visibility: visible;
}
