﻿/* Admin Layout - Синя/Сива палитра */

:root {
    --admin-primary: #2c3e50;
    --admin-secondary: #34495e;
    --admin-accent: #3498db;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-danger: #e74c3c;
    --admin-light: #ecf0f1;
    --admin-dark: #1a252f;
    --admin-sidebar-width: 260px;
    --admin-header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
}

/* Header */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--admin-header-height);
    background: white;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--admin-primary);
    transition: background 0.2s;
}

    .sidebar-toggle:hover {
        background: var(--admin-light);
    }

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-primary);
}

    .admin-logo svg {
        stroke: var(--admin-accent);
    }

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.btn-view-site, .btn-logout {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--admin-primary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-view-site:hover {
        background: #e8f4fd;
        color: var(--admin-accent);
    }

    .btn-logout:hover {
        background: #fee;
        color: var(--admin-danger);
    }

/* Container */
.admin-container {
    display: flex;
    margin-top: var(--admin-header-height);
    min-height: calc(100vh - var(--admin-header-height) - 60px);
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: var(--admin-header-height);
    width: var(--admin-sidebar-width);
    height: calc(100vh - var(--admin-header-height));
    background: var(--admin-primary);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 900;
}

.admin-nav {
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

    .nav-item:hover {
        background: rgba(255,255,255,0.05);
        color: white;
    }

    .nav-item.active {
        background: var(--admin-accent);
        color: white;
        border-left: 4px solid #2980b9;
    }

    .nav-item svg {
        flex-shrink: 0;
    }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1rem 1.5rem;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Sidebar Collapsed */
.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
}

.sidebar-collapsed .admin-main {
    margin-left: 0;
}

/* Footer */
.admin-footer {
    background: white;
    border-top: 1px solid #e1e8ed;
    padding: 1.5rem 2rem;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Container общи стилове */
.container {
    max-width: 1400px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--admin-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary:hover {
        background: #2980b9;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }

/* Admin Header Section */
.admin-header {
    margin-bottom: 2rem;
}

    .admin-header h1 {
        font-size: 2rem;
        color: var(--admin-primary);
        font-weight: 700;
    }

/* Loading */
.loading-state, .empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--admin-accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Table */
.products-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f8f9fa;
}

.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Status Badge */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    min-height: 96px; 
}

.btn-edit, .btn-delete {
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-edit:hover {
        background: #e8f4fd;
        color: var(--admin-accent);
    }

    .btn-delete:hover {
        background: #fee;
        color: var(--admin-danger);
    }

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-collapsed .admin-sidebar {
        transform: translateX(0);
    }

    .admin-header {
        padding: 0 1rem;
    }

    .admin-main {
        padding: 1rem;
    }
}

/* Form Styles */
.page-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-accent);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

    .back-link:hover {
        color: #2980b9;
    }

.page-header h1 {
    font-size: 2rem;
    color: var(--admin-primary);
    font-weight: 700;
    margin-top: 0.5rem;
}

.form-container {
    max-width: 900px;
}

.product-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.form-section {
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
}

    .form-section:last-child {
        border-bottom: none;
    }

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--admin-primary);
    margin-bottom: 1.5rem;
}

/* Image Preview */
.image-preview-container {
    display: flex;
    justify-content: center;
}

.image-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    transition: all 0.3s;
}

    .image-preview svg {
        stroke: #adb5bd;
        margin-bottom: 0.5rem;
    }

    .image-preview p {
        font-size: 0.875rem;
    }

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group:last-child {
        margin-bottom: 0;
    }

    .form-group label {
        display: block;
        font-weight: 600;
        color: var(--admin-primary);
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--admin-accent);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    align-items: center;
}

    .input-group .form-control {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.input-suffix {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #6c757d;
    font-weight: 600;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 2rem;
    background: #f8f9fa;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

        .form-actions button {
            width: 100%;
        }
}

.stock-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-ok {
    background: #d4edda;
    color: #155724;
}

.stock-low {
    background: #fff3cd;
    color: #856404;
}

.stock-out {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   ADMIN LOGIN PAGE STYLES
   ============================================ */

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    padding: 2rem;
}

.admin-login-container {
    width: 100%;
    max-width: 450px;
}

.admin-login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.admin-login-header {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.admin-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.admin-logo-icon {
    font-size: 3rem;
}

.admin-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.admin-subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.admin-login-form {
    padding: 2rem;
}

.admin-login-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-login-form .form-group:last-of-type {
    margin-bottom: 1rem;
}

.admin-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--admin-primary);
    font-size: 0.9rem;
}

.admin-login-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.admin-login-form .form-control:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.error-message {
    background: #fee;
    color: var(--admin-danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid var(--admin-danger);
}

.btn-admin-login {
    width: 100%;
    padding: 1rem;
    background: var(--admin-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-login:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-admin-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-login-footer {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e1e8ed;
}

.admin-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Responsive for Admin Login */
@media (max-width: 480px) {
    .admin-login-page {
        padding: 1rem;
    }

    .admin-login-header {
        padding: 2rem 1.5rem;
    }

    .admin-login-form {
        padding: 1.5rem;
    }

    .admin-login-footer {
        padding: 1rem 1.5rem;
    }
}

/* ============================================
   ORDERS PAGE STYLES
   ============================================ */

/* Filters */
.filters-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

    .filter-input:focus,
    .filter-select:focus {
        outline: none;
        border-color: var(--admin-accent);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

    .filter-input::placeholder {
        color: #adb5bd;
    }

/* Orders Container */
.orders-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Order Card */
.order-card {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

    .order-card:last-child {
        border-bottom: none;
    }

    .order-card.expanded {
        background: #f8f9fa;
    }

/* Order Header (clickable) */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .order-header:hover {
        background: #f8f9fa;
    }

.order-card.expanded .order-header {
    background: transparent;
    border-bottom: 2px solid #dee2e6;
}

.order-main-info {
    flex: 1;
}

.order-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.order-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.order-divider {
    color: #dee2e6;
}

.order-date {
    font-weight: 500;
}

.order-city,
.order-phone {
    color: #495057;
}

.order-summary-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-primary);
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-processing {
    background: #e2d9f3;
    color: #6f42c1;
}

.status-shipped {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Order Details (expandable section) */
.order-details {
    padding: 2rem;
    background: white;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.detail-section-full {
    grid-column: 1 / -1;
}

.detail-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--admin-accent);
}

.detail-content {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.8;
}

    .detail-content p {
        margin-bottom: 0.5rem;
    }

    .detail-content strong {
        color: var(--admin-primary);
    }

/* Status Select */
.status-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    background: white;
}

    .status-select:focus {
        outline: none;
        border-color: var(--admin-accent);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

/* Order Items */
.order-items {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

    .order-item:last-child {
        border-bottom: none;
    }

.order-item-name {
    font-weight: 600;
    color: var(--admin-primary);
}

.order-item-details {
    color: #6c757d;
    font-size: 0.9rem;
}

.order-total {
    padding: 1rem;
    background: #f8f9fa;
    text-align: right;
    font-size: 1.1rem;
    border-top: 2px solid var(--admin-accent);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .order-summary-info {
        width: 100%;
        justify-content: space-between;
    }

    .order-details-grid {
        grid-template-columns: 1fr;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}


/* ========================================
   DASHBOARD STYLES
   ======================================== */

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

.stat-icon {
    font-size: 3rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.85rem;
}

.change-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

    .change-indicator.positive {
        background: #d4edda;
        color: #155724;
    }

    .change-indicator.negative {
        background: #f8d7da;
        color: #721c24;
    }

.stat-meta {
    margin-top: 0.5rem;
}

.low-stock-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fff3cd;
    color: #856404;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Charts Row */
.charts-row {
    display: grid;
    gap: 1.5rem;
}

.chart-card {
    min-height: 400px;
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
}

.btn-chart-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

    .btn-chart-filter:hover {
        border-color: #3498db;
        color: #3498db;
    }

    .btn-chart-filter.active {
        background: #3498db;
        color: white;
        border-color: #3498db;
    }

.chart-container {
    height: 300px;
    padding: 1rem 0;
}

/* Tables Row */
.tables-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.table-card {
    overflow: hidden;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
}

.btn-view-all {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

    .btn-view-all:hover {
        color: #2980b9;
    }

/* Alert Card */
.alert-card {
    border-left: 4px solid #f39c12;
}

.low-stock-row {
    background: #fff8e1;
}

.low-stock {
    color: #e67e22;
    font-weight: 600;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tables-row {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}


/* ========================================
   REPORTS PAGE
   ======================================== */

.reports-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-tab {
    padding: 1rem 1.5rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .report-tab:hover {
        border-color: #3498db;
        background: #f8f9fa;
    }

    .report-tab.active {
        border-color: #3498db;
        background: #3498db;
        color: white;
    }

.date-range-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .date-range-picker label {
        font-weight: 600;
        font-size: 0.9rem;
        color: #6c757d;
    }

.report-container {
    min-height: 400px;
}

.report-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

    .report-header h2 {
        margin: 0 0 0.5rem 0;
        font-size: 2rem;
    }

.report-period {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.chart-section {
    padding: 2rem;
}

    .chart-section h3 {
        margin-top: 0;
        margin-bottom: 1.5rem;
    }

    .chart-section .chart-container {
        height: 400px;
    }

.badge-warning {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fff3cd;
    color: #856404;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-small {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: normal;
}

/* Responsive */
@media (max-width: 768px) {
    .report-selector {
        flex-direction: column;
    }

    .report-tab {
        width: 100%;
    }

    .report-header h2 {
        font-size: 1.5rem;
    }

    .chart-section .chart-container {
        height: 300px;
    }
}
/* ========================================
   Settings Page Styles
   ======================================== */

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.settings-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.settings-tab:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.settings-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.settings-content {
    margin-top: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Filter Checkbox */
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-checkbox:hover {
    background: #e9ecef;
}

/* Badge Styles */
.badge-active {
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-tabs {
        flex-wrap: wrap;
    }

    .settings-tab {
        font-size: 14px;
        padding: 10px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form warning message */
.form-warning {
    display: block;
    margin-top: 6px;
    color: #d9534f;
    font-size: 13px;
    font-weight: 500;
}

/* Form divider */
.form-divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

.form-divider::before {
    left: 0;
}

.form-divider::after {
    right: 0;
}

/* Filter Buttons */
.filters-section {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: #f5f7fa;
    border: 2px solid #e1e8ed;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    background: #ecf0f1;
    border-color: #3498db;
}

.filter-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.filter-btn span {
    font-weight: 600;
}

@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .filter-buttons {
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

/* Info Box */
.info-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.info-box h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.info-box p {
    margin: 10px 0 5px 0;
    font-weight: 600;
    color: #2c3e50;
}

.info-box ul {
    margin: 5px 0 15px 20px;
    padding: 0;
}

.info-box li {
    margin: 5px 0;
    color: #555;
    line-height: 1.6;
}

.info-box a {
    color: #3498db;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

.info-box code {
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Contact Messages Page */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.message-card.unread {
    border-left: 4px solid var(--admin-accent);
}

.message-card.read {
    border-left: 4px solid var(--admin-light);
}

.message-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.message-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-header:hover {
    background: #f8f9fa;
}

.message-main-info {
    flex: 1;
}

.message-subject {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unread-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--admin-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
}

.message-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.message-meta .divider {
    margin: 0 0.5rem;
}

.message-details {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
    background: #f8f9fa;
}

.message-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.message-info-row strong {
    min-width: 120px;
    color: var(--admin-primary);
}

.message-info-row a {
    color: var(--admin-accent);
    text-decoration: none;
}

.message-info-row a:hover {
    text-decoration: underline;
}

.message-content {
    padding: 1rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.message-content p {
    margin-top: 0.5rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.message-card .btn-primary {
    margin-top: 1rem;
    align-self: flex-start;
}
