/**
 * CENTRAL HOUSE ADMIN DASHBOARD
 * Modern, clean, and practical admin interface
 */

/* ====== DASHBOARD LAYOUT ====== */
.admin-dashboard {
    background: #f8f9fa;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.admin-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header .navbar-brand i {
    font-size: 1.25rem;
    color: #C47A3A;
}

.admin-header .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.admin-header .navbar-nav .nav-link:hover {
    background: rgba(196, 122, 58, 0.2);
    color: white !important;
}

.admin-header .navbar-nav .nav-link.active {
    background: #C47A3A;
    color: white !important;
}

/* ====== SIDEBAR NAVIGATION ====== */
.admin-sidebar {
    background: white;
    border-right: 1px solid #e9ecef;
    min-height: calc(100vh - 70px);
    padding: 1.5rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .menu-item {
    margin-bottom: 0.5rem;
}

.sidebar-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu .menu-link:hover {
    background: #f8f9fa;
    color: #C47A3A;
    border-left-color: #C47A3A;
    text-decoration: none;
}

.sidebar-menu .menu-link.active {
    background: linear-gradient(90deg, rgba(196, 122, 58, 0.1) 0%, transparent 100%);
    color: #C47A3A;
    border-left-color: #C47A3A;
    font-weight: 600;
}

.sidebar-menu .menu-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ====== MAIN CONTENT AREA ====== */
.admin-main {
    padding: 2rem;
    background: #f8f9fa;
    min-height: calc(100vh - 70px);
}

.admin-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-page-title i {
    color: #C47A3A;
    font-size: 1.75rem;
}

/* ====== DASHBOARD CARDS ====== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C47A3A 0%, #D1964E 100%);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.dashboard-card-icon.primary {
    background: linear-gradient(135deg, #C47A3A 0%, #D1964E 100%);
}

.dashboard-card-icon.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.dashboard-card-icon.warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.dashboard-card-icon.info {
    background: linear-gradient(135deg, #17a2b8 0%, #6610f2 100%);
}

.dashboard-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-card-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dashboard-card-change.positive {
    color: #28a745;
}

.dashboard-card-change.negative {
    color: #dc3545;
}

/* ====== DATA TABLES ====== */
.admin-table-container {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.admin-table th {
    padding: 1rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

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

/* ====== FORMS ====== */
.admin-form-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.admin-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.admin-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
    color: #495057;
}

.admin-form-control:focus {
    outline: none;
    border-color: #C47A3A;
    box-shadow: 0 0 0 4px rgba(196, 122, 58, 0.1);
}

.admin-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: #495057;
    cursor: pointer;
}

.admin-form-select:focus {
    outline: none;
    border-color: #C47A3A;
    box-shadow: 0 0 0 4px rgba(196, 122, 58, 0.1);
}

.admin-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    background: white;
    color: #495057;
}

.admin-form-textarea:focus {
    outline: none;
    border-color: #C47A3A;
    box-shadow: 0 0 0 4px rgba(196, 122, 58, 0.1);
}

/* ====== ACTION BUTTONS ====== */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: 32px;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.admin-btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-btn-edit {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.admin-btn-edit:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.admin-btn-delete {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.admin-btn-delete:hover {
    background: #c82333;
    border-color: #c82333;
}

.admin-btn-view {
    background: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.admin-btn-view:hover {
    background: #138496;
    border-color: #138496;
}

/* ====== ALERTS AND MESSAGES ====== */
.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.admin-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.admin-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.admin-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* ====== BANNER MANAGEMENT ====== */
.banner-preview {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.banner-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.banner-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.banner-info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border-left: 3px solid #C47A3A;
}

.banner-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.banner-info-value {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-page-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .admin-form-container {
        padding: 1.5rem;
    }
    
    .admin-table-container {
        padding: 1rem;
        overflow-x: auto;
    }
    
    .admin-table {
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .banner-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .admin-header .navbar-brand {
        font-size: 1.25rem;
    }
    
    .admin-main {
        padding: 0.75rem;
    }
    
    .dashboard-card {
        padding: 1rem;
    }
    
    .dashboard-card-value {
        font-size: 1.5rem;
    }
    
    .admin-form-container {
        padding: 1rem;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-btn-sm {
        justify-content: center;
        width: 100%;
    }
}

/* ====== LOADING STATES ====== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #C47A3A;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== UTILITIES ====== */
.text-muted {
    color: #6c757d !important;
}

.text-center {
    text-align: center !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
