/* ============================================
   Admin Panel - Style inspiré Metronic v8.3
   Font: Inter | Colors: Metronic demo36
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === Variables === */
:root {
    --primary: #1B84FF;
    --primary-hover: #056EE9;
    --primary-light: #d1e6ff;
    --success: #17C653;
    --success-light: #d1f4dd;
    --warning: #F6C000;
    --warning-light: #fdf2cc;
    --danger: #F8285A;
    --danger-light: #fed4de;
    --info: #7239EA;
    --info-light: #e3d7fb;
    --dark: #071437;
    --gray-100: #F9F9F9;
    --gray-200: #F1F1F4;
    --gray-300: #DBDFE9;
    --gray-400: #C4CADA;
    --gray-500: #99A1B7;
    --gray-600: #78829D;
    --gray-700: #4B5675;
    --gray-800: #252F4A;
    --gray-900: #071437;
    --white: #ffffff;
    --body-bg: #F9F9F9;
    --card-bg: #ffffff;
    --border-color: #F1F1F4;
    --border-radius: 0.475rem;
    --border-radius-lg: 0.625rem;
    --border-radius-xl: 1rem;
    --shadow-sm: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.05);
    --shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
    --font-family: 'Inter', Helvetica, sans-serif;
    --sidebar-bg: #1E2129;
    --sidebar-width: 265px;
    --transition: all 0.2s ease;
}

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-family);
    font-size: 0.925rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark);
    background: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--gray-100);
}
.login-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}
.login-container h1 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}
.login-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* ============================================
   LAYOUT ADMIN
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--gray-400);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}
.sidebar-header {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.country-switcher select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--gray-300);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    appearance: auto;
}
.country-switcher select:hover {
    background: rgba(255,255,255,0.1);
}
.country-switcher select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,132,255,0.15);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
    transition: var(--transition);
    position: relative;
}
.sidebar-menu li a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.04);
}
.sidebar-menu li a.active {
    color: var(--white);
    background: rgba(27,132,255,0.1);
}
.sidebar-menu li a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}
.sidebar-footer span { color: var(--gray-500); }
.sidebar-footer a { color: var(--gray-600); font-size: 0.8rem; }
.sidebar-footer a:hover { color: var(--danger); }

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem 2.25rem;
    min-height: 100vh;
}
.content-header {
    margin-bottom: 1.75rem;
}
.content-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

/* ============================================
   CARDS / SECTIONS
   ============================================ */
.section {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.section h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.stat-card.highlight {
    border-left: 3px solid var(--primary);
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}
.stat-label {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}
.stat-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}
.stat-link:hover { color: var(--primary-hover); }

/* ============================================
   TABLE
   ============================================ */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-100);
    border-bottom: 1px solid var(--border-color);
}
.table th:first-child { border-radius: var(--border-radius) 0 0 0; }
.table th:last-child { border-radius: 0 var(--border-radius) 0 0; }
.table td {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-100); }
.row-unread td { font-weight: 600; color: var(--gray-900); }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.badge-green { background: var(--success-light); color: #0a7e33; }
.badge-orange { background: var(--warning-light); color: #8a6d00; }
.badge-blue { background: var(--primary-light); color: #0b4f99; }
.badge-grey { background: var(--gray-200); color: var(--gray-600); }

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.15rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    background: var(--card-bg);
    transition: var(--transition);
    appearance: auto;
}
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--gray-400);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,132,255,0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Meta description field */
.meta-desc-wrapper {
    position: relative;
}
.meta-description-field {
    resize: none;
    overflow: hidden;
    min-height: 70px;
    line-height: 1.5;
    padding-bottom: 1.8rem !important;
}
.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.78rem;
    color: var(--gray-500);
    pointer-events: none;
}
.char-counter.warn {
    color: var(--warning);
    font-weight: 500;
}
.char-counter.over {
    color: var(--danger);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding-top: 1.5rem;
    font-weight: 500 !important;
}
.checkbox-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    background: var(--gray-100);
    color: var(--gray-700);
}
.btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    text-decoration: none;
}
.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}
.btn-secondary:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #d91a4a;
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover {
    background: #12a344;
    color: var(--white);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius);
}

.btn-block {
    width: 100%;
    display: flex;
}

.actions { white-space: nowrap; }
.actions form { display: inline; }
.actions .btn + .btn,
.actions .btn + form,
.actions form + .btn,
.actions form + form { margin-left: 0.35rem; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.alert-success {
    background: var(--success-light);
    color: #0a7e33;
    border: 1px solid #a2e8ba;
}
.alert-error {
    background: var(--danger-light);
    color: #9e1335;
    border: 1px solid #fca9bd;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}
.filter-separator {
    width: 1px;
    height: 1.5rem;
    background: var(--gray-300);
    margin: 0 0.25rem;
}

/* ============================================
   CARD (style Metronic)
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.card-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}
.card-header-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}
.card-header-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.card-body {
    padding: 1.75rem;
}
.card-body-table {
    padding: 0;
}
.card-body-table .table th:first-child,
.card-body-table .table td:first-child { padding-left: 1.75rem; }
.card-body-table .table th:last-child,
.card-body-table .table td:last-child { padding-right: 1.75rem; }

/* === Btn icon / back === */
.btn-icon { padding: 0.5rem; }
.btn-back {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 1.1rem;
    font-weight: 600;
}
.btn-back:hover { background: var(--gray-200); color: var(--gray-900); }

/* === Btn light variants (Metronic) === */
.btn-light {
    background: var(--gray-100);
    color: var(--gray-700);
}
.btn-light:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}
.btn-light-danger {
    background: var(--danger-light);
    color: #9e1335;
}
.btn-light-danger:hover {
    background: #fca9bd;
    color: #7a0f2a;
}
.btn-light-primary {
    background: var(--primary-light);
    color: #0b4f99;
}
.btn-light-primary:hover {
    background: #a4ceff;
    color: #083a73;
}

/* ============================================
   TABLE ROW-DASHED (style Metronic)
   ============================================ */
.table-row-dashed th {
    background: transparent;
    border-bottom: 1px dashed var(--gray-300);
}
.table-row-dashed td {
    border-bottom: 1px dashed var(--gray-300);
}
.table-row-dashed tr:last-child td {
    border-bottom: none;
}
.table-row-dashed th:first-child,
.table-row-dashed th:last-child { border-radius: 0; }

/* === Text helpers === */
.text-gray-400 { color: var(--gray-400); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-sm { font-size: 0.8rem; }

/* ============================================
   BADGES LIGHT (style Metronic)
   ============================================ */
.badge-light {
    background: var(--gray-200);
    color: var(--gray-700);
}
.badge-light-primary {
    background: var(--primary-light);
    color: #0b4f99;
}
.badge-light-success {
    background: var(--success-light);
    color: #0a7e33;
}
.badge-light-danger {
    background: var(--danger-light);
    color: #9e1335;
}
.badge-light-warning {
    background: var(--warning-light);
    color: #8a6d00;
}

/* ============================================
   SEARCH (style Metronic)
   ============================================ */
.search-form { display: flex; }
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--gray-400);
    pointer-events: none;
}
.search-input {
    padding-left: 2.5rem !important;
    min-width: 250px;
}
.form-control-solid {
    background: var(--gray-100) !important;
    border: 1px solid var(--gray-100) !important;
}
.form-control-solid:focus {
    background: var(--gray-100) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(27,132,255,0.15) !important;
}

/* ============================================
   FILTER TABS (style Metronic nav pills)
   ============================================ */
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--gray-100);
    padding: 0.2rem;
    border-radius: var(--border-radius);
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
}
.filter-tab:hover { color: var(--gray-900); text-decoration: none; }
.filter-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.filter-count {
    font-size: 0.7rem;
    background: var(--gray-200);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    color: var(--gray-500);
}
.filter-tab.active .filter-count {
    background: var(--primary-light);
    color: var(--primary);
}
.site-filters {
    display: flex;
    gap: 0.35rem;
}

/* ============================================
   CONTACTS TABLE COLUMNS
   ============================================ */
.col-date { white-space: nowrap; }
.col-date span { display: block; }
.col-status { white-space: nowrap; }
.col-actions { white-space: nowrap; text-align: right; }

.contact-name-link {
    display: flex;
    flex-direction: column;
    color: inherit;
}
.contact-name-link:hover { text-decoration: none; }
.contact-name-link:hover .contact-name { color: var(--primary); }
.contact-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    transition: var(--transition);
}
.contact-email {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 400;
}
.contact-company {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ============================================
   DROPDOWN ACTIONS (style Metronic)
   ============================================ */
.dropdown-actions {
    position: relative;
    display: inline-block;
}
.btn-actions-toggle {
    gap: 0.3rem;
}
.btn-actions-toggle svg {
    transition: transform 0.2s;
}
.dropdown-actions.open .btn-actions-toggle svg {
    transform: rotate(180deg);
}
.dropdown-actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 175px;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 50;
}
.dropdown-actions.open .dropdown-actions-menu {
    display: block;
}
.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition);
    text-decoration: none;
}
.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
    text-decoration: none;
}
.dropdown-item-danger {
    color: var(--danger);
}
.dropdown-item-danger:hover {
    background: var(--danger-light);
    color: #9e1335;
}
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.35rem 0;
}

/* ============================================
   CONTACT VIEW (detail page)
   ============================================ */
.contact-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.contact-view-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.contact-view-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.contact-view-value {
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--gray-900);
}
.contact-view-message {
    margin-top: 0.5rem;
}
.contact-view-message-body {
    margin-top: 0.5rem;
    background: var(--gray-100);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--gray-800);
}

/* ============================================
   MEDIA GALLERY
   ============================================ */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.media-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.media-item:hover {
    box-shadow: var(--shadow);
}
.media-preview {
    height: 140px;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-info {
    padding: 0.6rem 0.75rem;
}
.media-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.media-meta {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.media-actions {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
}
.media-actions .btn { font-size: 0.7rem; padding: 0.25rem 0.5rem; }

/* === Empty state === */
.empty-state {
    padding: 3rem 1.75rem;
    text-align: center;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-muted {
    color: var(--gray-500);
    font-style: normal;
    font-weight: 500;
}
code {
    background: var(--gray-100);
    padding: 0.15rem 0.45rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    color: var(--info);
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-header {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    .sidebar-header h2 { margin-bottom: 0; }
    .country-switcher { max-width: 200px; }
    .sidebar-menu {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0;
        border-top: 1px solid rgba(255,255,255,0.07);
    }
    .sidebar-menu li a {
        padding: 0.65rem 1rem;
        white-space: nowrap;
        font-size: 0.8rem;
    }
    .sidebar-menu li a.active::before {
        left: 0.5rem;
        right: 0.5rem;
        top: auto;
        bottom: 0;
        width: auto;
        height: 3px;
        border-radius: 3px 3px 0 0;
    }
    .sidebar-footer {
        width: 100%;
        padding: 0.65rem 1.5rem;
        border-top: 1px solid rgba(255,255,255,0.07);
    }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .dashboard-sections { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .contact-view-grid { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .card-header-toolbar { width: 100%; }
    .filter-tabs { width: 100%; }
    .search-input { min-width: 100%; }
    .site-filters { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-content { padding: 1rem; }
    .section { padding: 1.25rem; }
    .card-body { padding: 1.25rem; }
    .card-body-table .table th:first-child,
    .card-body-table .table td:first-child { padding-left: 1rem; }
    .card-body-table .table th:last-child,
    .card-body-table .table td:last-child { padding-right: 1rem; }
}
