/**
 * Admin & Dashboard - Clean, Fresh, Compact
 * Unified styling for admin panel and user dashboard
 */

/* ===== COMPACT SPACING ===== */
.admin-main { padding: 1rem 1.25rem !important; }
.page-header { padding: 0.75rem 1rem !important; margin-bottom: 1rem !important; }
.page-title { font-size: 1rem !important; font-weight: 600 !important; }
.content-card { margin-bottom: 1rem !important; }
.card-header { padding: 0.625rem 0.875rem !important; font-size: 0.875rem !important; }
.card-body { padding: 0.75rem 1rem !important; }

/* ===== COMPACT TABLES ===== */
.table thead th {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}
.table tbody td {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.8125rem !important;
}

/* ===== COMPACT BUTTONS ===== */
.btn { padding: 0.3125rem 0.75rem !important; font-size: 0.8125rem !important; }
.btn-sm { padding: 0.2rem 0.5rem !important; font-size: 0.75rem !important; }

/* ===== COMPACT BADGES ===== */
.badge { font-size: 0.625rem !important; padding: 0.15rem 0.35rem !important; }

/* ===== COMPACT STAT CARDS ===== */
.admin-stat-card, .stat-card {
    padding: 0.75rem !important;
    margin-bottom: 0 !important;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
}
.stat-card:hover { border-color: #7E2C8A; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.stat-icon-wrapper, .stat-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
}
.stat-icon.services { background: #7E2C8A !important; }
.stat-icon.conditions { background: #2EBF6D !important; }
.stat-icon.jobs { background: #3B82F6 !important; }
.stat-icon.applications { background: #F59E0B !important; }
.stat-icon.messages { background: #EF4444 !important; }
.stat-icon.testimonials { background: #7E2C8A !important; }
.stat-icon.staff { background: #2EBF6D !important; }
.stat-icon.content { background: #6B7280 !important; }
.stat-number { font-size: 1.25rem !important; font-weight: 600; }
.stat-label { font-size: 0.6875rem !important; color: #6B7280; }

/* ===== COMPACT SIDEBAR ===== */
.admin-sidebar { width: 180px !important; }
.sidebar-header { padding: 0.625rem 0.75rem !important; }
.sidebar-logo img { height: 24px !important; }
.sidebar-title { font-size: 0.8125rem !important; }
.sidebar-nav { padding: 0.5rem 0.375rem !important; }
.nav-link { padding: 0.375rem 0.5rem !important; font-size: 0.75rem !important; }
.admin-main { margin-left: 180px !important; }
.sidebar-footer { width: 180px !important; padding: 0.5rem !important; }
.user-avatar { width: 24px !important; height: 24px !important; font-size: 0.625rem !important; }
.user-name { font-size: 0.6875rem !important; }
.user-role { font-size: 0.5625rem !important; }
.logout-btn { padding: 0.375rem !important; font-size: 0.75rem !important; }

/* ===== COMPACT ALERTS ===== */
.alert { padding: 0.625rem 1rem !important; font-size: 0.8125rem !important; margin-bottom: 0.75rem !important; }

/* ===== COMPACT FORMS ===== */
.form-control, .form-select { padding: 0.375rem 0.625rem !important; font-size: 0.8125rem !important; }
.form-label { font-size: 0.8125rem !important; margin-bottom: 0.25rem !important; }

/* ===== COMPACT PAGINATION ===== */
.pagination { padding: 0.5rem 0.75rem !important; }
.page-link { padding: 0.25rem 0.5rem !important; font-size: 0.75rem !important; }

/* ===== CLEAN EMPTY STATE ===== */
.empty-state { padding: 1.5rem 1rem !important; }
.empty-state i { font-size: 2rem !important; }
.empty-state h3 { font-size: 0.9375rem !important; }
.empty-state p { font-size: 0.75rem !important; }

/* ===== DASHBOARD HEADER - COMPACT ===== */
.dashboard-header { padding: 0.75rem 0 !important; }
.dashboard-header .page-title { font-size: 1.25rem !important; }
.dashboard-header .page-subtitle { font-size: 0.875rem !important; }
.quick-actions { padding: 1rem 0 !important; }
.quick-actions .btn { min-height: auto !important; padding: 0.5rem 1rem !important; }

/* ===== STAT GRID - TIGHTER ===== */
.stats-grid { gap: 0.75rem !important; margin-bottom: 1rem !important; }
.row.g-4 { --bs-gutter-y: 0.75rem; --bs-gutter-x: 0.75rem; }

/* ===== MAIN DASHBOARD ADMIN STAT CARDS ===== */
.admin-stat-card {
    padding: 0.875rem 1rem !important;
    margin-bottom: 0 !important;
}
.admin-stat-card .stat-icon-wrapper {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
}
.admin-stat-card .stat-number { font-size: 1.5rem !important; }
.admin-stat-card .stat-label { font-size: 0.75rem !important; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .admin-main { padding: 0.75rem 1rem !important; margin-left: 0 !important; }
    .admin-sidebar { width: 200px !important; }
    .sidebar-footer { width: 200px !important; }
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.sidebar-open { transform: translateX(0); }
}

/* ===== ADMIN FORM PAGES - COMPACT CLEAN LOOK ===== */
.admin-main .form-container {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.admin-main .form-header {
    text-align: left;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E5E7EB;
}
.admin-main .form-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 0.125rem 0;
}
.admin-main .form-subtitle {
    color: #6B7280;
    font-size: 0.75rem;
    margin: 0;
}
.admin-main .form-grid {
    padding: 0;
}
.admin-main .form-section {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #F8F9FC;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
}
.admin-main .form-section:last-child {
    margin-bottom: 0;
}
.admin-main .section-title {
    color: #7E2C8A;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
}
.admin-main .form-group {
    margin-bottom: 0.5rem;
}
.admin-main .form-group:last-child {
    margin-bottom: 0;
}
.admin-main .form-label {
    font-size: 0.75rem !important;
    margin-bottom: 0.125rem !important;
}
.admin-main .form-label i {
    color: #7E2C8A;
    width: 12px;
    font-size: 0.6875rem;
}
.admin-main .form-control,
.admin-main .form-select {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8125rem !important;
    min-height: 32px;
}
.admin-main textarea.form-control {
    min-height: 60px;
    padding: 0.5rem !important;
}
.admin-main .form-control:focus,
.admin-main .form-select:focus {
    border-color: #7E2C8A;
    box-shadow: 0 0 0 0.15rem rgba(126, 44, 138, 0.15);
}
.admin-main .form-check {
    padding: 0.375rem 0.5rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #E5E7EB;
}
.admin-main .form-check-input {
    width: 1rem;
    height: 1rem;
}
.admin-main .form-check-input:checked {
    background-color: #7E2C8A;
    border-color: #7E2C8A;
}
.admin-main .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #E5E7EB;
}
.admin-main .form-actions .btn {
    min-width: 90px;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
}
.admin-main .row.g-2 {
    --bs-gutter-y: 0.5rem;
    --bs-gutter-x: 0.5rem;
}
.admin-main .form-text {
    color: #6B7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.admin-main .errorlist {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0 0;
}
.admin-main .errorlist li {
    background: #FEF2F2;
    color: #DC2626;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border-left: 3px solid #DC2626;
}
.admin-main .required {
    color: #DC2626;
}

/* ===== ADMIN CHAT - MODERN CLEAN DESIGN ===== */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-chat-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 992px) {
    .admin-chat-main { grid-template-columns: 1fr; }
}
.admin-chat-messages {
    background: #FAFBFC;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.admin-chat-messages .chat-header {
    background: linear-gradient(135deg, #7E2C8A 0%, #9B59B6 100%);
    color: white;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
}
.admin-chat-messages .chat-body {
    min-height: 420px;
    max-height: 520px;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}
.admin-chat-messages .chat-msg {
    display: flex;
    margin-bottom: 1rem;
    max-width: 78%;
}
.admin-chat-messages .chat-msg.staff { justify-content: flex-end; margin-left: auto; }
.admin-chat-messages .chat-msg.client { justify-content: flex-start; }
.admin-chat-messages .chat-msg-bubble {
    padding: 0.625rem 1rem;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.admin-chat-messages .chat-msg.staff .chat-msg-bubble {
    background: linear-gradient(135deg, #7E2C8A, #9B59B6);
    color: white;
    border-radius: 16px 16px 4px 16px;
}
.admin-chat-messages .chat-msg.client .chat-msg-bubble {
    background: white;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-radius: 16px 16px 16px 4px;
}
.admin-chat-messages .chat-msg-sender {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}
.admin-chat-messages .chat-msg-time {
    font-size: 0.6875rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}
.admin-chat-input-wrap {
    padding: 1rem 1.25rem;
    background: white;
    border-top: 1px solid #E5E7EB;
}
.admin-chat-input-wrap .form-control {
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.admin-chat-input-wrap .form-control:focus {
    border-color: #7E2C8A;
    box-shadow: 0 0 0 3px rgba(126,44,138,0.12);
}
.admin-chat-input-wrap .btn-primary {
    border-radius: 20px;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #7E2C8A, #9B59B6);
    border: none;
}
.admin-chat-sidebar .chat-sidebar-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.admin-chat-sidebar .chat-sidebar-card .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    background: #F8F9FC;
    border-bottom: 1px solid #E5E7EB;
}
.admin-chat-sidebar .chat-sidebar-card .card-body {
    padding: 1rem;
    font-size: 0.8125rem;
}
.admin-chat-sidebar .chat-sidebar-card .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}
.admin-chat-sidebar .chat-sidebar-card .form-select {
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
}
.admin-chat-list-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    transition: all 0.2s;
}
.admin-chat-list-card:hover {
    border-color: #7E2C8A;
    box-shadow: 0 2px 8px rgba(126,44,138,0.08);
}
.admin-chat-list-card .chat-row {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    align-items: center;
}
.admin-chat-list-card .chat-row:last-child { border-bottom: none; }
.admin-chat-list-card .chat-row:hover { background: #FAFBFC; }
