﻿:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --sidebar: #08111f;
    --sidebar-soft: #101b2f;
    --text: #0f172a;
    --muted: #667085;
    --muted-2: #98a2b3;
    --border: rgba(15, 23, 42, 0.10);
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 12px 35px rgba(15, 23, 42, 0.06);
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --accent-soft: rgba(37, 99, 235, 0.10);
    --success: #16a34a;
    --success-soft: #dcfce7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --neutral: #475569;
    --neutral-soft: #e2e8f0;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 35%), radial-gradient(circle at 85% 12%, rgba(124, 58, 237, 0.12), transparent 30%), linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
        background-size: 52px 52px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 65%);
        z-index: -1;
    }

.app-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 20px;
    background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.25), transparent 30%), linear-gradient(180deg, #08111f 0%, #0b1220 100%);
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

.brand {
    padding: 14px 8px 26px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand-title {
    font-weight: 850;
    font-size: 21px;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.brand-subtitle {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 14px;
    line-height: 1.55;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link-custom {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 54px;
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    border-radius: 18px;
    font-weight: 650;
    transition: all 180ms ease;
}

    .nav-link-custom i {
        font-size: 18px;
        opacity: 0.95;
    }

    .nav-link-custom:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
        transform: translateX(3px);
    }

    .nav-link-custom.active {
        color: #ffffff;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(124, 58, 237, 0.22)), rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    }

        .nav-link-custom.active::before {
            content: "";
            position: absolute;
            left: -8px;
            width: 4px;
            height: 26px;
            border-radius: 999px;
            background: linear-gradient(180deg, var(--accent), var(--accent-2));
        }

.main-content {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 96px;
    padding: 24px 36px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--border);
}

.topbar-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -0.05em;
}

.topbar-title p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.content-area {
    padding: 34px 36px 54px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 26px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.70)), radial-gradient(circle at 95% 20%, rgba(37, 99, 235, 0.16), transparent 35%);
    box-shadow: var(--shadow);
}

    .hero-card::after {
        content: "";
        position: absolute;
        right: -110px;
        top: -110px;
        width: 260px;
        height: 260px;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.23), rgba(124, 58, 237, 0.18));
        filter: blur(2px);
    }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.hero-title {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 18px 0 8px;
    font-size: 36px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-text {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 26px;
}

.stat-card,
.panel-card,
.form-card,
.list-card,
.summary-box {
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(22px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 25px 25px 23px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

    .stat-card:hover,
    .panel-card:hover,
    .form-card:hover,
    .list-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow);
        border-color: rgba(37, 99, 235, 0.18);
    }

    .stat-card::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 5px;
        background: linear-gradient(180deg, var(--accent), var(--accent-2));
        opacity: 0;
        transition: opacity 180ms ease;
    }

    .stat-card:hover::before {
        opacity: 1;
    }

.stat-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.stat-value {
    margin-top: 16px;
    font-size: 40px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.stat-extra {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.panels-grid,
.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
}

.page-grid {
    align-items: start;
}

.form-card,
.list-card,
.panel-card {
    padding: 26px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.panel-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-group-custom {
    margin-bottom: 18px;
}

.form-label-custom {
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 750;
    font-size: 14px;
}

.form-control,
.form-select {
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--text);
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: rgba(37, 99, 235, 0.60);
        box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
    }

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    min-height: 44px;
    border-radius: 15px;
    font-weight: 750;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    border: none;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.btn-warning {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.20);
}

.btn-dark {
    background: #0f172a;
    border: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.btn-outline-secondary,
.btn-outline-danger {
    background: rgba(255,255,255,0.70);
}

.page-alert {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.alert-success {
    background: rgba(220, 252, 231, 0.82);
    color: #14532d;
}

.alert-danger {
    background: rgba(254, 226, 226, 0.82);
    color: #7f1d1d;
}

.form-note,
.empty-state {
    color: var(--muted);
    line-height: 1.65;
}

.form-note {
    margin-top: 14px;
    font-size: 14px;
}

.empty-state {
    padding: 22px;
    border: 1px dashed rgba(100, 116, 139, 0.25);
    border-radius: var(--radius-md);
    background: rgba(248, 250, 252, 0.70);
}

.review-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.full-width {
    grid-column: 1 / -1;
}

.review-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

    .review-card:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, 0.18);
        box-shadow: var(--shadow-soft);
    }

    .review-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 20px;
        bottom: 20px;
        width: 4px;
        border-radius: 0 999px 999px 0;
        background: linear-gradient(180deg, var(--accent), var(--accent-2));
    }

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 13px;
}

    .review-top strong {
        font-size: 17px;
        letter-spacing: -0.03em;
    }

.review-meta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.review-text {
    margin: 16px 0;
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

.reply-box {
    padding: 16px 18px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.04)), rgba(255,255,255,0.70);
    color: #1e293b;
    line-height: 1.6;
}

    .reply-box strong {
        color: var(--accent);
    }

    .reply-box textarea,
    .review-card textarea {
        width: 100%;
        min-height: 92px;
        padding: 13px 14px;
        border-radius: 16px;
        border: 1px solid rgba(37, 99, 235, 0.18);
        outline: none;
        background: rgba(255,255,255,0.92);
        color: var(--text);
        resize: vertical;
    }

.badge-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 850;
}

.badge-positive {
    background: var(--success-soft);
    color: var(--success);
}

.badge-negative {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-neutral {
    background: var(--neutral-soft);
    color: var(--neutral);
}

.business-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 17px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

    .business-item:last-child {
        border-bottom: none;
    }

.business-name {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.business-email,
.small-muted {
    color: var(--muted);
    font-size: 14px;
}

.text-end {
    text-align: right;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.page-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .page-table th {
        color: var(--muted);
        font-size: 13px;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 15px 14px;
        border-bottom: 1px solid var(--border);
    }

    .page-table td {
        padding: 16px 14px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
        vertical-align: middle;
    }

    .page-table tr {
        transition: background 160ms ease;
    }

    .page-table tbody tr:hover {
        background: rgba(37, 99, 235, 0.04);
    }


.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.summary-box {
    padding: 22px;
}

.summary-box-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-box-value {
    margin-top: 12px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.ai-progress-row {
    padding: 16px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

    .ai-progress-row:last-child {
        border-bottom: none;
    }

.ai-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 9px;
    font-weight: 800;
}

.ai-progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.20);
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.ai-progress-meta {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.30);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(100, 116, 139, 0.45);
        border: 3px solid transparent;
        background-clip: content-box;
    }

@media (max-width: 1200px) {
    .grid-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panels-grid,
    .page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        padding: 20px;
    }

    .nav-section {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .content-area {
        padding: 22px;
    }

    .grid-stats,
    .summary-grid,
    .review-form-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 28px;
    }
}
/* Cleaner Apple-like refinement */

body {
    font-weight: 400;
    color: #111827;
}

.topbar-title h1,
.hero-title,
.panel-title,
.brand-title {
    font-weight: 720;
    letter-spacing: -0.035em;
}

.stat-value {
    font-weight: 720;
    letter-spacing: -0.035em;
}

.review-top strong,
.business-name {
    font-weight: 650;
}

.nav-link-custom {
    font-weight: 520;
}

    .nav-link-custom.active {
        background: rgba(255, 255, 255, 0.10);
        box-shadow: none;
    }

.stat-card,
.panel-card,
.form-card,
.list-card,
.review-card,
.summary-box {
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.055);
}

    .stat-card:hover,
    .panel-card:hover,
    .form-card:hover,
    .list-card:hover,
    .review-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 22px 55px rgba(15, 23, 42, 0.075);
    }

.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

    .stat-card-link:hover {
        color: inherit;
    }

.clickable-card {
    cursor: pointer;
}

    .clickable-card:hover {
        border-color: rgba(37, 99, 235, 0.28);
        background: rgba(255, 255, 255, 0.92);
    }

.business-item.clickable-card {
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 18px;
    transition: background 160ms ease, transform 160ms ease;
}

    .business-item.clickable-card:hover {
        background: rgba(37, 99, 235, 0.055);
        transform: translateX(2px);
    }

.highlight-card {
    border-color: rgba(37, 99, 235, 0.55) !important;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12), 0 22px 55px rgba(15, 23, 42, 0.10) !important;
}

.badge-soft {
    font-weight: 650;
}

.btn {
    font-weight: 600;
}

.hero-card {
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.hero-eyebrow {
    font-weight: 600;
}

/* Custom Apple-like dropdowns */

.native-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.82);
    color: #111827;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

    .custom-select-trigger:hover {
        border-color: rgba(59, 130, 246, 0.35);
        background: rgba(255, 255, 255, 0.96);
    }

.custom-select-wrapper.open .custom-select-trigger {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.12), 0 16px 36px rgba(15, 23, 42, 0.08);
}

.custom-select-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-icon {
    font-size: 14px;
    color: #64748b;
    transition: transform 180ms ease;
}

.custom-select-wrapper.open .custom-select-icon {
    transform: rotate(180deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 2000;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.custom-select-wrapper.open .custom-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-select-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: #111827;
    padding: 12px 14px;
    border-radius: 16px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

    .custom-select-option:hover {
        background: rgba(59, 130, 246, 0.08);
        transform: translateX(2px);
    }

    .custom-select-option.active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(79, 70, 229, 0.92));
        color: white;
    }

    .custom-select-option:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.custom-select-menu::-webkit-scrollbar {
    width: 8px;
}

.custom-select-menu::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

/* FIX CONFIRM MODAL */

.confirm-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(15, 23, 42, 0.48) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    animation: confirmFadeIn 0.18s ease-out;
}

    .confirm-overlay.removing {
        animation: confirmFadeOut 0.16s ease-in forwards;
    }

.confirm-modal {
    width: min(460px, 100%) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 30px !important;
    padding: 28px !important;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.32) !important;
    color: #0f172a !important;
    transform: translateY(0);
    animation: confirmPopIn 0.18s ease-out;
}

.confirm-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
    font-size: 24px;
    margin-bottom: 18px;
}

.confirm-title {
    margin: 0 0 8px 0 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    color: #0f172a !important;
}

.confirm-message {
    margin-bottom: 24px !important;
    color: #64748b !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.confirm-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

    .confirm-actions .btn {
        border-radius: 999px !important;
        padding: 10px 18px !important;
        font-weight: 700 !important;
    }

@keyframes confirmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes confirmFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes confirmPopIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.clickable-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .clickable-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
        border-color: rgba(37, 99, 235, 0.28);
    }

/* PREMIUM TOAST NOTIFICATIONS */

.toast-container-premium {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999990;
    width: min(390px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-premium {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: toastPremiumIn 0.22s ease-out;
}

    .toast-premium.removing {
        animation: toastPremiumOut 0.18s ease-in forwards;
    }

    .toast-premium.success {
        border-color: rgba(22, 163, 74, 0.30);
    }

    .toast-premium.danger {
        border-color: rgba(220, 38, 38, 0.30);
    }

    .toast-premium.warning {
        border-color: rgba(245, 158, 11, 0.35);
    }

    .toast-premium.info {
        border-color: rgba(37, 99, 235, 0.30);
    }

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--accent);
}

.toast-premium.success .toast-icon {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
}

.toast-premium.danger .toast-icon {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.toast-premium.warning .toast-icon {
    background: rgba(245, 158, 11, 0.14);
    color: var(--warning);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 750;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 3px;
}

.toast-message {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
}

.toast-close {
    border: 0;
    background: transparent;
    color: var(--muted-2);
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: color 150ms ease, transform 150ms ease;
}

    .toast-close:hover {
        color: var(--text);
        transform: scale(1.08);
    }

@keyframes toastPremiumIn {
    from {
        opacity: 0;
        transform: translateX(18px) translateY(-4px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

@keyframes toastPremiumOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(18px) scale(0.98);
    }
}

/* AUTH PAGE */

body[data-page="login"],
body[data-page="registerOwner"] {
    min-height: 100dvh;
    margin: 0;
}

.auth-page {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 5vw;
}

.auth-card {
    width: min(92vw, 620px);
    padding: clamp(30px, 4vw, 46px);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.13);
}

.auth-header {
    margin-bottom: 28px;
}

    .auth-header h1 {
        margin: 0;
        font-size: clamp(30px, 4vw, 42px);
        font-weight: 720;
        letter-spacing: -0.045em;
        color: #111827;
    }

    .auth-header p {
        margin: 10px 0 0;
        color: #667085;
        font-size: 16px;
    }

.auth-link {
    margin-top: 22px;
    text-align: center;
}

    .auth-link a {
        color: #2563eb;
        font-weight: 500;
        text-decoration: none;
    }

        .auth-link a:hover {
            text-decoration: underline;
        }

body[data-page="login"] .btn-dark,
body[data-page="registerOwner"] .btn-dark {
    min-height: 52px;
    border-radius: 18px;
    background: #08111f;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.20);
}

@media (max-height: 720px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 8vh;
    }
}

@media (max-width: 600px) {
    .auth-page {
        padding: 4vh 4vw;
    }

    .auth-card {
        width: 100%;
        padding: 28px 22px;
        border-radius: 22px;
    }
}

/* =========================================================
   BOOTSTRAP FALLBACK / LAYOUT FIX
   Keeps the UI stable even if Bootstrap CDN does not load.
   ========================================================= */

.form-label-custom {
    display: block;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0 16px;
    line-height: 1.5;
}

textarea.form-control {
    padding-top: 14px;
    padding-bottom: 14px;
}

.form-group-custom input,
.form-group-custom select,
.form-group-custom textarea {
    width: 100%;
}

.review-form-grid .form-group-custom {
    min-width: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 18px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-sm {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 14px;
}

.btn-outline-secondary {
    border-color: rgba(15, 23, 42, 0.30);
    color: #111827;
    background: rgba(255, 255, 255, 0.72);
}

    .btn-outline-secondary:hover {
        background: rgba(15, 23, 42, 0.06);
    }

.btn-outline-danger {
    border-color: rgba(220, 38, 38, 0.55);
    color: #991b1b;
    background: rgba(255, 255, 255, 0.72);
}

    .btn-outline-danger:hover {
        background: rgba(254, 226, 226, 0.95);
    }

.btn-outline-primary {
    border-color: rgba(37, 99, 235, 0.55);
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.72);
}

    .btn-outline-primary:hover {
        background: rgba(219, 234, 254, 0.95);
    }

/* Bootstrap utility fallback */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.w-100 {
    width: 100% !important;
}

.text-muted {
    color: var(--muted) !important;
}

.small {
    font-size: 0.875rem !important;
}

.text-end {
    text-align: right !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Alerts fallback */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
}

.alert-success {
    background: rgba(220, 252, 231, 0.82);
    color: #14532d;
}

.alert-danger {
    background: rgba(254, 226, 226, 0.82);
    color: #7f1d1d;
}

/* Tables fallback */
table {
    width: 100%;
}

th,
td {
    text-align: left;
}

/* Auth page restore */
.auth-card .form-group-custom {
    width: 100%;
}

.auth-card .btn {
    margin-top: 6px;
}

/* Register page restore */
.auth-card-wide {
    width: min(92vw, 720px);
}

.auth-section {
    margin-bottom: 22px;
}

.auth-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-weight: 650;
    color: var(--text);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-divider {
    height: 1px;
    margin: 22px 0;
    background: rgba(15, 23, 42, 0.10);
}

.auth-main-button {
    margin-top: 8px;
}

/* Better spacing on form pages */
.page-grid .form-card,
.page-grid .list-card {
    min-width: 0;
}

.page-table th,
.page-table td {
    word-break: normal;
}

/* Keep review panels readable */
.review-card textarea {
    font-family: inherit;
    font-size: 14px;
}

@media (max-width: 820px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   BUTTON TEXT COLOR FIX
   ========================================================= */

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-dark,
.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active,
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    color: #ffffff !important;
}

.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    color: #111827 !important;
}

.btn-outline-secondary,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #111827 !important;
}

.btn-outline-danger,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    color: #991b1b !important;
}

.btn-outline-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #1d4ed8 !important;
}

/* Login/register main button */
body[data-page="login"] .btn-dark,
body[data-page="registerOwner"] .btn-dark {
    color: #ffffff !important;
}

/* Summary dark buttons */
button.btn-dark {
    color: #ffffff !important;
}