/* ==========================================
   MODERN FRONTEND ADMIN DASHBOARD CSS
   Save as: assets/css/frontend-admin.css
   ========================================== */

/* Reset & Base */
.bs-modern-admin {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 0;
    margin: 0 -20px;
}

.bs-modern-admin * {
    box-sizing: border-box;
}

/* ===== TOP NAVIGATION TABS ===== */
.bs-top-tabs {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.bs-top-tab {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bs-top-tab:hover {
    background: #f9fafb;
    color: #5850ec;
}

.bs-top-tab.active {
    color: #5850ec;
    border-bottom-color: #5850ec;
    background: #faf9ff;
}

.bs-tab-icon {
    font-size: 18px;
}

/* ===== MAIN CONTAINER ===== */
.bs-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.bs-tab-section {
    display: none;
}

.bs-tab-section.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== STATS ROW ===== */
.bs-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.bs-stat-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.bs-stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.bs-stat-blue { border-left-color: #5850ec; }
.bs-stat-green { border-left-color: #10b981; }
.bs-stat-yellow { border-left-color: #f59e0b; }
.bs-stat-purple { border-left-color: #8b5cf6; }

.bs-stat-icon {
    font-size: 48px;
    line-height: 1;
}

.bs-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.bs-stat-text {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== TWO COLUMN LAYOUT ===== */
.bs-two-column {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.bs-column-left,
.bs-column-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== PANEL STYLES ===== */
.bs-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.bs-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bs-panel-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bs-panel-body {
    padding: 24px;
}

.bs-view-all {
    color: #5850ec;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bs-view-all:hover {
    color: #4338ca;
}

/* ===== QUICK ACTIONS ===== */
.bs-quick-actions .bs-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.bs-action-btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bs-action-icon {
    font-size: 20px;
}

.bs-action-text {
    flex: 1;
    text-align: left;
}

.bs-btn-blue {
    background: #5850ec;
    color: white;
}

.bs-btn-blue:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(88, 80, 236, 0.3);
}

.bs-btn-green {
    background: #10b981;
    color: white;
}

.bs-btn-green:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.bs-btn-gray {
    background: #f3f4f6;
    color: #374151;
}

.bs-btn-gray:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* ===== INFO ROWS ===== */
.bs-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.bs-info-row:last-child {
    border-bottom: none;
}

.bs-info-label {
    font-size: 13px;
    color: #6b7280;
}

.bs-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* ===== DISPLAY FORM ===== */
.bs-display-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bs-display-form .bs-panel-header {
    border-bottom-color: rgba(255,255,255,0.2);
}

.bs-display-form h3 {
    color: white;
}

.bs-display-form .bs-panel-body {
    color: white;
}

.bs-hint {
    font-size: 13px;
    margin: 0 0 12px 0;
    opacity: 0.9;
}

.bs-shortcode-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 12px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.bs-shortcode-display code {
    flex: 1;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.bs-copy-btn {
    padding: 6px 12px;
    background: white;
    color: #5850ec;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bs-copy-btn:hover {
    transform: scale(1.05);
}

/* ===== USER PANEL ===== */
.bs-user-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bs-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
}

.bs-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.bs-user-name {
    color: white;
    font-weight: 600;
    font-size: 15px;
}

.bs-user-email {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.bs-logout-btn {
    display: block;
    padding: 12px 24px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.bs-logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== TABLES ===== */
.bs-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bs-data-table thead {
    background: #f9fafb;
}

.bs-data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.bs-data-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.bs-data-table tbody tr {
    transition: background 0.15s ease;
}

.bs-data-table tbody tr:hover {
    background: #f9fafb;
}

.bs-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== STATUS BADGES ===== */
.bs-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.bs-status-confirmed { background: #d1fae5; color: #065f46; }
.bs-status-pending { background: #fef3c7; color: #92400e; }
.bs-status-cancelled { background: #fee2e2; color: #991b1b; }
.bs-status-rescheduled { background: #dbeafe; color: #1e40af; }
.bs-status-completed { background: #e9d5ff; color: #6b21a8; }

/* ===== FILTER DROPDOWN ===== */
.bs-filter-dropdown {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bs-filter-dropdown:focus {
    outline: none;
    border-color: #5850ec;
    box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.1);
}

/* ===== ADD BUTTON ===== */
.bs-btn-add {
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bs-btn-add:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* ===== FORM BOX ===== */
.bs-form-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.bs-form-box h4 {
    font-size: 16px;
    color: #5850ec;
    margin: 0 0 20px 0;
}

.bs-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bs-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bs-form-field.bs-form-full {
    grid-column: 1 / -1;
}

.bs-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.bs-form-field input[type="text"],
.bs-form-field input[type="email"],
.bs-form-field input[type="number"],
.bs-form-field input[type="color"],
.bs-form-field select,
.bs-form-field textarea {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.bs-form-field input[type="color"] {
    height: 48px;
    cursor: pointer;
}

.bs-form-field input:focus,
.bs-form-field select:focus,
.bs-form-field textarea:focus {
    outline: none;
    border-color: #5850ec;
    box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.1);
}

.bs-form-field small {
    font-size: 12px;
    color: #6b7280;
}

.bs-form-field textarea {
    resize: vertical;
}

.bs-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ===== BUTTONS ===== */
.bs-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bs-btn-primary {
    background: #5850ec;
    color: white;
}

.bs-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(88, 80, 236, 0.3);
}

.bs-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.bs-btn-secondary:hover {
    border-color: #5850ec;
    color: #5850ec;
}

.bs-btn-danger {
    background: #ef4444;
    color: white;
}

.bs-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.bs-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.bs-btn-large {
    padding: 14px 28px;
    font-size: 15px;
    width: 100%;
}

/* ===== SAVE SETTINGS BAR ===== */
.bs-save-settings-bar {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    margin: 24px -24px -24px;
    border-radius: 0 0 12px 12px;
}

/* ===== LOADING OVERLAY ===== */
.bs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.bs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOAST NOTIFICATIONS ===== */
#bs-toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.bs-toast {
    background: white;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bs-toast-success {
    border-left-color: #10b981;
    color: #065f46;
}

.bs-toast-error {
    border-left-color: #ef4444;
    color: #991b1b;
}

/* ===== EMPTY STATE ===== */
.bs-no-data,
.bs-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.bs-empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .bs-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .bs-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bs-top-tabs {
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .bs-top-tab {
        flex: 0 0 auto;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .bs-dashboard-container {
        padding: 16px;
    }
    
    .bs-stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .bs-top-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .bs-panel-body {
        padding: 16px;
    }
    
    .bs-form-row {
        grid-template-columns: 1fr;
    }
    
    #bs-toast-container {
        left: 16px;
        right: 16px;
    }
}