/* ===== CSS Variables ===== */
:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Header ===== */
.gov-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.gov-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text);
        font-weight: 500;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.75rem;
        border-radius: var(--radius-sm);
        transition: var(--transition);
        position: relative;
    }

        .nav-links a:hover {
            background: var(--border-light);
            color: var(--primary);
        }

.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.user-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout {
    color: var(--danger) !important;
}

/* ===== Main Layout ===== */
.gov-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-lg);
    }

.btn-success {
    background: var(--success);
    color: white;
}

    .btn-success:hover {
        background: #059669;
    }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

    .btn-outline:hover {
        background: var(--border-light);
        border-color: var(--primary);
        color: var(--primary);
    }

.btn-text {
    background: none;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
}

    .btn-text:hover {
        text-decoration: underline;
    }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    border: none;
    font-size: inherit;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: block;
        font-weight: 500;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        color: var(--text);
    }

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

    .checkbox-label input[type="checkbox"] {
        width: 1.125rem;
        height: 1.125rem;
        accent-color: var(--primary);
    }

/* ===== Auth Pages ===== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

    .auth-footer a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

/* ===== Alerts ===== */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-logo {
    margin-bottom: 1.5rem;
}

.hero-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* ===== Swipe Page ===== */
.swipe-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

.filters-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

    .filters-header h3 {
        font-size: 1.125rem;
        font-weight: 600;
    }

.interests-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-chip {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--border-light);
    border-radius: 9999px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

    .checkbox-chip:hover {
        background: var(--border);
    }

    .checkbox-chip input {
        display: none;
    }

    .checkbox-chip:has(input:checked) {
        background: var(--primary);
        color: white;
    }

/* Cards */
.cards-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swipe-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.card-image {
    height: 320px;
    overflow: hidden;
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-body {
    padding: 1.5rem;
}

.card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.meta-item {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.interest-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.no-interests {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

.card-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-swipe {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-dislike {
    background: var(--danger);
    color: white;
}

    .btn-dislike:hover {
        transform: scale(1.1);
        background: #dc2626;
    }

.btn-like {
    background: var(--primary);
    color: white;
}

    .btn-like:hover {
        transform: scale(1.1);
        background: var(--primary-dark);
    }

/* ===== Chat ===== */
.chat-list-page, .chat-page {
    max-width: 800px;
    margin: 0 auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

    .chat-item:hover {
        transform: translateX(4px);
        box-shadow: var(--shadow-lg);
    }

.chat-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

    .chat-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border: 2px solid white;
    border-radius: 50%;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-name {
    font-weight: 600;
    font-size: 1rem;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.chat-preview {
    color: var(--text-muted);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    min-width: 20px;
    text-align: center;
}

/* Chat Messages */
.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.btn-back {
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text);
    padding: 0.5rem;
}

.partner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.partner-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.online-status {
    font-size: 0.75rem;
    color: var(--success);
}

.messages-container {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.message {
    display: flex;
    margin-bottom: 1rem;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-own {
    justify-content: flex-end;
}

.message-partner {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.message-own .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-partner .message-bubble {
    background: var(--border-light);
    color: var(--text);
    border-bottom-left-radius: 0.25rem;
}

.message-text {
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.message-time {
    font-size: 0.625rem;
    opacity: 0.7;
    display: block;
    margin-top: 0.25rem;
    text-align: right;
}

.chat-input-area {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

    .chat-input-area input:focus {
        outline: none;
        border-color: var(--primary);
    }

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .btn-send:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== Profile ===== */
.profile-page {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-upload {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .avatar-overlay:hover {
        transform: scale(1.1);
    }

    .avatar-overlay span {
        font-size: 1rem;
    }

    .avatar-overlay small {
        font-size: 0.5rem;
        color: var(--text-muted);
    }

.profile-titles h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.profile-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

    .form-section h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: var(--text);
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.interest-chip {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--border-light);
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

    .interest-chip:hover {
        background: var(--border);
    }

    .interest-chip input {
        display: none;
    }

    .interest-chip.selected {
        background: var(--primary);
        color: white;
    }

.profile-stats-section {
    padding: 2rem;
    background: var(--border-light);
    border-top: 1px solid var(--border);
}

    .profile-stats-section h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }

/* ===== Admin ===== */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.toolbar-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border-collapse: collapse;
}

    .data-table th,
    .data-table td {
        padding: 1rem;
        text-align: left;
        font-size: 0.875rem;
    }

    .data-table th {
        background: var(--border-light);
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .data-table tr {
        border-bottom: 1px solid var(--border);
    }

        .data-table tr:hover {
            background: var(--border-light);
        }

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.table-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag {
    padding: 0.125rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 9999px;
    font-size: 0.75rem;
}

.tag-more {
    background: var(--border);
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.ip-address {
    font-family: monospace;
    font-size: 0.75rem;
    background: var(--border-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.session-time {
    color: var(--success);
    font-weight: 500;
}

.status-online {
    color: var(--success);
    font-weight: 500;
}

.status-offline {
    color: var(--text-light);
}

/* ===== Notifications ===== */
.notifications-page {
    max-width: 600px;
    margin: 0 auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .notification-item:hover {
        box-shadow: var(--shadow-lg);
    }

    .notification-item.unread {
        border-left: 3px solid var(--primary);
    }

.notification-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

    .notification-content h4 {
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .notification-content p {
        font-size: 0.8125rem;
        color: var(--text-muted);
        margin-bottom: 0.25rem;
    }

.notification-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== Likes Page ===== */
.likes-page {
    max-width: 600px;
    margin: 0 auto;
}

.likes-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.like-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.like-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

    .like-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.like-info {
    flex: 1;
}

    .like-info h3 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

.like-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.like-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.like-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== Loading & Empty States ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--text);
    color: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 400px;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

.toast-match {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.toast-error {
    background: var(--danger);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Footer ===== */
.gov-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-links {
    margin-top: 0.5rem;
}

    .footer-links a {
        color: var(--text-muted);
        text-decoration: none;
    }

        .footer-links a:hover {
            color: var(--primary);
        }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .gov-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-features {
        grid-template-columns: 1fr;
    }

    .swipe-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gov-main {
        padding: 1rem;
    }
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.loading-small {
    display: inline-block;
}

.error-state {
    color: var(--danger);
    padding: 2rem;
    text-align: center;
}

.error-small {
    color: var(--danger);
    font-size: 0.875rem;
}
/* ===== Chart Fixes ===== */
.chart-wrapper {
    position: relative;
    height: 250px; /* ФИКСИРОВАННАЯ высота */
    width: 100%;
}

.chart-card canvas {
    max-height: 250px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}