/* ===========================================
   Panel Layout & Page-Specific Styles
   (Form controls are in global.css)
   =========================================== */

/* Panel Layout */
.panel-layout {
    display: flex;
    min-height: 100vh;
    background: #0f0f1a;
}

.panel-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: #00d9ff;
    font-size: 20px;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #aaa;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link {
    color: #666 !important;
}

.back-link:hover {
    color: #888 !important;
}

.panel-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: #00d9ff;
    font-size: 28px;
    margin: 0;
}

/* Panel-specific Buttons */
.btn-edit {
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.15);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: #00d9ff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: rgba(0, 217, 255, 0.25);
}

.btn-delete {
    padding: 8px 12px;
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    color: #ff5252;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: rgba(255, 82, 82, 0.25);
}

/* Cards */
.stat-card,
.product-card,
.category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
}

.stat-card:hover,
.product-card:hover,
.category-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
}

.action-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
}

.action-card:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

/* Form Container */
.form-container {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #fff;
    margin-bottom: 8px;
}

.empty-state p {
    color: #888;
    margin-bottom: 24px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Access Denied */
.access-denied {
    text-align: center;
    padding: 80px 20px;
}

.access-denied h1 {
    color: #ff5252;
    font-size: 32px;
    margin-bottom: 16px;
}

.access-denied p {
    color: #888;
    margin-bottom: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .panel-sidebar {
        width: 60px;
    }

    .sidebar-header h2,
    .nav-item span:not(.nav-icon) {
        display: none;
    }

    .panel-content {
        margin-left: 60px;
        padding: 20px;
    }

    .nav-item {
        justify-content: center;
        padding: 16px;
    }

    .nav-icon {
        font-size: 22px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}