* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

a {
    text-decoration: none;
}

.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
    background: #111827;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.admin-login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #ffffff;
}

.admin-login-card p {
    margin: 0 0 24px;
    color: #94a3b8;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #cbd5e1;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
}

.form-group input:focus {
    border-color: #3b82f6;
}

.btn-primary {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 13px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.flash-wrapper {
    margin-bottom: 18px;
}

.flash-message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.flash-message.success {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.flash-message.error {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #111827;
    border-right: 1px solid #1f2937;
    padding: 24px 18px;
}

.sidebar-brand h2 {
    margin: 0;
    color: #ffffff;
}

.sidebar-brand p {
    margin: 6px 0 24px;
    color: #94a3b8;
    font-size: 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 10px;
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-nav a:hover {
    background: #1e293b;
    color: #ffffff;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.main-content {
    flex: 1;
    padding: 24px;
    background: #0b1220;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    color: #ffffff;
}

.admin-meta {
    color: #cbd5e1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 20px;
}

.stat-card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #94a3b8;
}

.stat-card p {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
}

.panel {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 20px;
}

.panel-header h2 {
    margin: 0 0 16px;
    color: #ffffff;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    text-align: left;
    padding: 12px;
    font-size: 14px;
    color: #94a3b8;
    border-bottom: 1px solid #1f2937;
}

table tbody td {
    padding: 12px;
    border-bottom: 1px solid #1f2937;
    color: #e2e8f0;
    font-size: 14px;
}

.empty-state {
    color: #94a3b8;
    margin: 0;
}

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input {
    min-width: 280px;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
}

.search-form input:focus {
    border-color: #3b82f6;
}

.small-btn {
    width: auto;
    padding: 12px 18px;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.action-group form {
    margin: 0;
}

.action-group a,
.action-group button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    white-space: nowrap;
}

.action-group .action-btn,
.action-group .btn-danger,
.action-group .btn-disabled {
    min-width: 130px;
}

.btn-secondary,
.btn-danger,
.btn-success {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-secondary {
    background: #475569;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #16a34a;
}

.btn-success:hover {
    background: #15803d;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.form-panel {
    max-width: 800px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form .form-group input {
    width: 100%;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.user-meta-box {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

.user-meta-box p {
    margin: 0 0 10px;
    color: #cbd5e1;
}

.user-meta-box p:last-child {
    margin-bottom: 0;
}

.filters-form select,
.admin-form select {
    min-width: 200px;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
}

.filters-form select:focus,
.admin-form select:focus {
    border-color: #3b82f6;
}

.status-badge.neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.btn-disabled {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: #334155;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: not-allowed;
}

.filters-form {
    align-items: center;
}

.mono-text {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    word-break: break-all;
}

.token-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

.token-badge.missing {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.plan-form-panel {
    max-width: 1100px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
}

.admin-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.admin-form textarea:focus {
    border-color: #3b82f6;
}

.checkbox-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

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

.vertical-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 130px;
}

.vertical-actions form,
.vertical-actions a {
    width: 100%;
}

.plans-table td,
.plans-table th {
    vertical-align: middle;
}

.plan-name-cell {
    min-width: 220px;
    font-weight: 600;
    line-height: 1.4;
}

.offers-cell {
    min-width: 90px;
    line-height: 1.5;
    color: #cbd5e1;
    font-size: 13px;
}

.plans-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    min-width: 280px;
    align-items: stretch;
}

.plans-actions-grid form,
.plans-actions-grid a {
    width: 100%;
    margin: 0;
}

.feature-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

/* Feature buttons */
.feature-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 5px;
}

.feature-btn {
    border: 1px solid #334155;
    background: transparent;
    color: #cbd5f5;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.feature-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Selected state */
.feature-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Disabled state */
.feature-buttons.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.action-btn {
    width: 100%;
    min-width: 0;
    text-align: center;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-warning,
.btn-info,
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    height: 42px;
}

.btn-warning {
    background: #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #0ea5e9;
}

.btn-info:hover {
    background: #0284c7;
}

.btn-dark {
    background: #111827;
}

.btn-dark:hover {
    background: #030712;
}

@media (max-width: 1400px) {
    .plans-actions-grid {
        grid-template-columns: 1fr;
        min-width: 150px;
    }
}

.pricing-preview-box {
    margin: 6px 0 18px;
    padding: 16px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

.pricing-preview-box p {
    margin: 0 0 8px;
    color: #cbd5e1;
}

.pricing-preview-box p:last-child {
    margin-bottom: 0;
}

.simple-actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    min-width: 220px;
}

.settings-box {
    margin-top: 10px;
    padding: 18px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

.settings-box h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.admin-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
}

.admin-form select:focus {
    border-color: #3b82f6;
}

.site-content-panel {
    max-width: 1100px;
    margin-bottom: 24px;
}

.download-file-box {
    margin: 8px 0 18px;
    padding: 18px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

.download-file-box p {
    margin: 0 0 10px;
    color: #cbd5e1;
    line-height: 1.6;
}

.download-file-box p:last-child {
    margin-bottom: 0;
}

input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px dashed #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    outline: none;
}

input[type="file"]:hover {
    border-color: #3b82f6;
}
.page-subtitle {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 15px;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.dashboard-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.card-header {
    margin-bottom: 18px;
}

.card-header h2 {
    margin: 0;
    font-size: 24px;
    color: #f8fafc;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.65);
    color: #e2e8f0;
}

.summary-row strong {
    color: #ffffff;
    font-size: 18px;
}

.empty-state {
    color: #94a3b8;
    margin: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.status-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

@media (max-width: 1100px) {
    .dashboard-grid.two-columns {
        grid-template-columns: 1fr;
    }
}

/* ===== Dashboard Refresh ===== */

.dashboard-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #111827, #0f172a);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.dashboard-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #60a5fa;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: 34px;
    color: #ffffff;
}

.dashboard-hero-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 220px;
}

.hero-mini-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-mini-card span {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
}

.hero-mini-card strong {
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.kpi-card.primary {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: rgba(255, 255, 255, 0.08);
}

.kpi-card.danger {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: rgba(255, 255, 255, 0.08);
}

.kpi-label {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 10px;
}

.kpi-foot {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.mini-stat-box {
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 16px 18px;
}

.mini-stat-title {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.mini-stat-box strong {
    font-size: 24px;
    color: #ffffff;
}

.dashboard-card {
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.compact-card .summary-row {
    padding: 12px 14px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header h2 {
    margin: 0;
    font-size: 22px;
    color: #ffffff;
}

.card-muted {
    display: inline-block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 13px;
}

.card-link {
    color: #60a5fa;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.card-link:hover {
    color: #93c5fd;
}

.summary-row {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.summary-row span {
    color: #cbd5e1;
}

.summary-row strong {
    font-size: 17px;
}

.compact-table thead th {
    font-size: 13px;
    padding: 10px 12px;
}

.compact-table tbody td {
    font-size: 13px;
    padding: 11px 12px;
    vertical-align: middle;
}

.audit-card {
    margin-top: 24px;
}

.audit-scroll {
    max-height: 340px;
    overflow: auto;
}

.status-badge {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
}

.status-active {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
}

.status-inactive {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

.status-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

@media (max-width: 1400px) {
    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    .dashboard-grid.two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .mini-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero {
        padding: 18px;
    }

    .dashboard-hero h1 {
        font-size: 28px;
    }

    .kpi-value {
        font-size: 32px;
    }
}

@media (max-width: 560px) {
    .mini-stats-grid,
    .dashboard-hero-side {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
.disabled-link {
    color: #64748b;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

/* ===== Analytics ===== */

.analytics-hero {
    margin-bottom: 24px;
}

.analytics-filter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.analytics-filter-form label {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.analytics-filter-form select {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}

.analytics-filter-form select:focus {
    border-color: #3b82f6;
}

@media (max-width: 760px) {
    .analytics-filter-form {
        width: 100%;
        min-width: 0;
    }

    .analytics-filter-form select {
        width: 100%;
    }
}

/* ===== Analytics Chart.js ===== */

.analytics-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 0 2px;
}

.analytics-title {
    margin: 0;
    font-size: 34px;
    color: #ffffff;
}

.analytics-filter-inline {
    min-width: 220px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analytics-filter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analytics-filter-form label {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.analytics-filter-form select {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}

.analytics-filter-form select:focus {
    border-color: #3b82f6;
}

.analytics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.analytics-kpi-card {
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.analytics-kpi-card.primary {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: rgba(255, 255, 255, 0.08);
}

.analytics-kpi-card.danger {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: rgba(255, 255, 255, 0.08);
}

.analytics-kpi-label {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 10px;
}

.analytics-kpi-value {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 10px;
}

.analytics-kpi-foot {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.5;
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.analytics-summary-card {
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 18px;
}

.analytics-summary-card span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 8px;
}

.analytics-summary-card strong {
    color: #ffffff;
    font-size: 26px;
}

.analytics-chart-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.analytics-chart-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-card {
    padding: 20px;
}

.chart-wrap {
    position: relative;
    height: 320px;
}

.doughnut-wrap {
    height: 320px;
}

.analytics-table-card {
    margin-top: 24px;
}

.analytics-table thead th,
.analytics-table tbody td {
    font-size: 13px;
}

.analytics-plan-name {
    font-weight: 600;
    color: #ffffff;
}

@media (max-width: 1400px) {
    .analytics-kpis,
    .analytics-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .analytics-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-filter-inline {
        width: 100%;
        min-width: 0;
    }

    .analytics-chart-grid.two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .analytics-kpis,
    .analytics-summary-grid {
        grid-template-columns: 1fr;
    }

    .analytics-title {
        font-size: 28px;
    }

    .analytics-kpi-value {
        font-size: 32px;
    }

    .chart-wrap,
    .doughnut-wrap {
        height: 280px;
    }
}

/* ===== Audit Logs ===== */

.audit-page-header {
    margin-bottom: 24px;
}

.audit-page-header h1 {
    margin: 0;
    font-size: 34px;
    color: #ffffff;
}

.audit-filter-card {
    margin-bottom: 22px;
    padding: 22px;
}

.audit-filters-form {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr auto;
    gap: 16px;
    align-items: end;
}

.audit-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-filter-group label {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.audit-filter-group input {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
}

.audit-filter-group input::placeholder {
    color: #64748b;
}

.audit-filter-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.audit-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.audit-filter-btn,
.audit-reset-btn {
    min-width: 110px;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    height: 46px;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.audit-logs-card {
    padding: 20px;
}

.audit-table thead th,
.audit-table tbody td {
    font-size: 13px;
    vertical-align: middle;
}

.audit-description-cell {
    max-width: 420px;
    color: #cbd5e1;
    line-height: 1.55;
}

.audit-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.audit-pagination-info {
    color: #94a3b8;
    font-size: 14px;
}

.audit-pagination-links {
    display: flex;
    gap: 10px;
}

.audit-pagination-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.audit-pagination-links a:hover {
    border-color: #3b82f6;
    color: #ffffff;
}

.audit-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
}

.audit-empty-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.audit-empty-state h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 24px;
}

.audit-empty-state p {
    margin: 0;
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.7;
    font-size: 15px;
}

@media (max-width: 1100px) {
    .audit-filters-form {
        grid-template-columns: 1fr;
    }

    .audit-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .audit-page-header h1 {
        font-size: 28px;
    }

    .audit-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .audit-pagination-links {
        width: 100%;
    }

    .audit-pagination-links a {
        flex: 1;
    }
}

/* ===== Website Content ===== */

.site-content-header {
    margin-bottom: 24px;
}

.site-content-header h1 {
    margin: 0;
    font-size: 34px;
    color: #ffffff;
}

.site-content-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.site-section-card {
    padding: 24px;
}

.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 12px;
}

.feature-editor-card {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 18px;
}

.feature-editor-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
    color: #ffffff;
}

.site-content-save-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.site-save-btn {
    width: auto;
    min-width: 220px;
    padding: 14px 22px;
    border-radius: 14px;
}

.site-assets-grid {
    margin-top: 26px;
}

.asset-preview-box {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.asset-preview-box p {
    margin: 0 0 10px;
    color: #cbd5e1;
    line-height: 1.6;
}

.asset-preview-box p:last-child {
    margin-bottom: 0;
}

.logo-preview-wrap {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-image {
    max-height: 72px;
    width: auto;
    display: block;
}

@media (max-width: 1100px) {
    .feature-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-content-header h1 {
        font-size: 28px;
    }

    .site-content-save-bar {
        justify-content: stretch;
    }

    .site-save-btn {
        width: 100%;
        min-width: 0;
    }
}
.form-group textarea,
.admin-form textarea,
.site-content-form textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea::placeholder,
.admin-form textarea::placeholder,
.site-content-form textarea::placeholder {
    color: #64748b;
}

.form-group textarea:focus,
.admin-form textarea:focus,
.site-content-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Make description areas taller in website content */
.site-content-form textarea {
    min-height: 140px;
}

/* Feature card descriptions a little smaller */
.feature-editor-card textarea {
    min-height: 120px;
}

/* Optional: smoother spacing */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
}

#hero_description,
#features_section_description,
#pricing_section_description,
#download_section_description,
#contact_section_description {
    min-height: 150px;
}

.model-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.model-btn {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

.model-btn.selected {
    background: #3b82f6;
    color: white;
}