/* ═══════════════════════════════════════════════════════════════════════════
   Aravet Conseil — Back-office Administration
   Premium Dark Mode Design System
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ─── CSS Variables ───────────────────────────────────────────────────────── */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161821;
    --bg-tertiary: #1c1e2a;
    --bg-card: #1a1c28;
    --bg-card-hover: #1f2133;
    --bg-input: #12131c;

    --border-primary: #2a2d3e;
    --border-secondary: #353849;
    --border-focus: #3b82f6;

    --text-primary: #e8eaf0;
    --text-secondary: #9ca3b4;
    --text-muted: #6b7280;
    --text-heading: #f1f3f9;

    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-subtle: rgba(59, 130, 246, 0.12);
    --accent-blue-glow: rgba(59, 130, 246, 0.25);

    --accent-green: #10b981;
    --accent-green-subtle: rgba(16, 185, 129, 0.12);
    --accent-red: #ef4444;
    --accent-red-subtle: rgba(239, 68, 68, 0.12);
    --accent-amber: #f59e0b;
    --accent-amber-subtle: rgba(245, 158, 11, 0.12);
    --accent-purple: #8b5cf6;
    --accent-purple-subtle: rgba(139, 92, 246, 0.12);

    --sidebar-width: 260px;
    --header-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-blue-glow);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--accent-blue-hover); }

/* ─── Login Page ──────────────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.06), transparent);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-blue));
    background-size: 200% auto;
    animation: gradient-slide 3s linear infinite;
}

@keyframes gradient-slide {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.login-logo h1 span {
    color: var(--accent-blue);
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.87rem;
    margin-top: 0.3rem;
}

/* ─── Form Elements ───────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.93rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-subtle), var(--shadow-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2.5rem;
}

.form-input-inline {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    font-size: 0.87rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--accent-red-subtle);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

/* ─── Layout: Sidebar ─────────────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.sidebar-logo span {
    color: var(--accent-blue);
}

.sidebar-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.87rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-blue);
    border-radius: 0 2px 2px 0;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-count {
    margin-left: auto;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-primary);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

.sidebar-user:hover {
    background: var(--bg-tertiary);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ─── Layout: Main Content ────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    min-height: var(--header-height);
}

.content-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.content-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* ─── Hamburger (mobile) ──────────────────────────────────────────────────── */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.3rem;
}

.hamburger svg {
    width: 22px;
    height: 22px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* ─── Stat Cards ──────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.04;
    transform: translate(20%, -20%);
}

.stat-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card-icon svg {
    width: 20px;
    height: 20px;
}

.stat-card-icon.blue {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
}

.stat-card-icon.green {
    background: var(--accent-green-subtle);
    color: var(--accent-green);
}

.stat-card-icon.amber {
    background: var(--accent-amber-subtle);
    color: var(--accent-amber);
}

.stat-card-icon.purple {
    background: var(--accent-purple-subtle);
    color: var(--accent-purple);
}

.stat-card-icon.red {
    background: var(--accent-red-subtle);
    color: var(--accent-red);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ─── Cards / Panels ──────────────────────────────────────────────────────── */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
}

.panel-body {
    padding: 1.5rem;
}

.panel-body-flush {
    padding: 0;
}

/* ─── Tables ──────────────────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.87rem;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

/* ─── Badges ──────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-contact {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
}

.badge-careers {
    background: var(--accent-green-subtle);
    color: var(--accent-green);
}

.badge-unread {
    background: var(--accent-amber-subtle);
    color: var(--accent-amber);
}

.badge-read {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ─── Filter Bar ──────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.filter-bar .form-input {
    max-width: 220px;
}

.filter-bar .form-input.search-input {
    max-width: 280px;
}

.filter-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 0.2rem;
    border: 1px solid var(--border-primary);
}

.filter-tab {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
    border: none;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--accent-blue);
    color: #fff;
}

.filter-spacer {
    flex: 1;
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    gap: 0.3rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    font-family: inherit;
}

.pagination-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.pagination-link.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Flash Messages / Alerts ─────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.87rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--accent-green-subtle);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: var(--accent-red-subtle);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Contact Detail ──────────────────────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-field.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.93rem;
    color: var(--text-primary);
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    word-break: break-word;
}

.detail-value.message {
    white-space: pre-wrap;
    min-height: 100px;
    line-height: 1.6;
}

/* ─── Chart Container ─────────────────────────────────────────────────────── */
.chart-container {
    position: relative;
    width: 100%;
    height: 260px;
}

.chart-bar-group {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    height: 200px;
    padding: 1rem 0.5rem 0;
}

.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: linear-gradient(180deg, var(--accent-blue), rgba(59, 130, 246, 0.5));
    transition: all 0.4s ease;
    min-height: 4px;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.03);
    transform-origin: bottom;
}

.chart-bar-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: center;
}

.chart-bar-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ─── Grid Layouts ────────────────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.empty-state p {
    font-size: 0.87rem;
}

/* ─── Text Utilities ──────────────────────────────────────────────────────── */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }

.mono {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
}

/* ─── User Agent parser (simplified display) ──────────────────────────────── */
.ua-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Top Pages List ──────────────────────────────────────────────────────── */
.top-pages-list {
    list-style: none;
}

.top-pages-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-primary);
}

.top-pages-item:last-child {
    border-bottom: none;
}

.top-pages-url {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 1rem;
}

.top-pages-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-blue);
    flex-shrink: 0;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

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

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .content-header {
        padding: 1rem;
    }

    .content-body {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar {
        padding: 1rem;
    }

    .filter-bar .form-input,
    .filter-bar .form-input.search-input {
        max-width: 100%;
        flex: 1;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── Animations ──────────────────────────────────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse-dot 2s ease infinite;
    margin-right: 0.4rem;
}

/* ─── Confirm Dialog ──────────────────────────────────────────────────────── */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.confirm-overlay.visible {
    display: flex;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.confirm-dialog h3 {
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.87rem;
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
