/* Hide Vue template content until mounted */
[v-cloak] {
    display: none !important;
}

:root {
    /* THE SURFACE COLORS (Tailwind Slate) */
    --surface-main: #0f172a;
    /* Slate 900 */
    --surface-card: #1e293b;
    /* Slate 800 */
    --surface-dark: #0b1120;
    /* Slate 950 */

    /* THE ACCENT COLORS (Tailwind Blue) */
    --brand-primary: #3b82f6;
    /* Blue 500 */
    --brand-hover: #2563eb;
    /* Blue 600 */
    --brand-light: rgba(59, 130, 246, 0.1);
    /* Blue 500, 10% opacity */

    /* THE TEXT COLORS */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --text-muted: #64748b;
    /* Slate 500 */

    /* STATUS COLORS */
    --status-success: #22c55e;
    /* Green 500 */
    --status-error: #ef4444;
    /* Red 500 */

    /* BORDERS */
    --border-color: #334155;
    /* Slate 700 */
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    background-color: var(--surface-main);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
aside {
    width: 260px;
    border-right: 1px solid var(--border-color);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(255, 255, 255, 0.01);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: var(--surface-card);
    color: var(--text-primary);
}

.nav-item:hover {
    padding-left: 20px;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05), transparent);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.breadcrumb span {
    cursor: pointer;
}

.breadcrumb span:hover {
    color: white;
}

.btn {
    background: var(--brand-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
    filter: brightness(1.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--surface-card);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Campaign Grid */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.campaign-card-v2 {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
}

.campaign-card-v2:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.media-preview-v2 {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-main);
}

.media-preview-v2 img,
.media-preview-v2 video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-metrics {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-item span {
    color: var(--text-primary);
    font-weight: 700;
}

.card-dates label,
.card-hours label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.date-range-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mini-hour-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.mini-hour-chip {
    font-size: 0.6rem;
    background: var(--surface-main);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 0;
    text-align: center;
    transition: all 0.2s;
}

.mini-hour-chip.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    font-weight: 600;
}

.rank-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
}

.rank-badge.top-tier {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-success);
    border-color: rgba(16, 185, 129, 0.2);
}

.rank-badge.competitive {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

/* Ad List */
.ad-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.ad-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ad-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ad-thumb {
    width: 80px;
    height: 45px;
    background: #1e1b4b;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.upload-area {
    border: 2px dashed var(--border-color);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.2s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.03);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.is-open {
    display: flex !important;
}

.modal-content {
    background: var(--surface-main);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    width: 450px;
    max-width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.95rem;
    margin-top: 8px;
    transition: border-color 0.2s;
    outline: none;
}

/* Ensure options are dark too */
select option {
    background: var(--surface-main);
    color: white;
}

input:focus,
select:focus {
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Custom Autocomplete */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 2000;
    display: block;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.autocomplete-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: white;
}

.autocomplete-item strong {
    color: white;
    font-weight: 600;
}

/* Light Theme Autocomplete (for Map Search) */
.autocomplete-results.light-theme {
    background: white;
    border-color: #ccc;
    color: #333;
}

.autocomplete-results.light-theme .autocomplete-item {
    color: #444;
    border-bottom: 1px solid #eee;
}

.autocomplete-results.light-theme .autocomplete-item:hover {
    background: #f0f9ff;
    /* Light blue tint */
    color: #000;
}

.autocomplete-results.light-theme .autocomplete-item strong {
    color: #000;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Mode Management */
.active-view {
    display: block !important;
}

.view-section {
    display: none;
}

.mode-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.mode-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.mode-btn.active {
    background: var(--brand-primary);
    color: white;
}

/* Screen Management Styles */
.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    width: 34px;
    height: 34px;
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.status-dot.status-online {
    background: #10b981;
}

.status-dot.status-paused {
    background: #b91c1c;
}

.status-dot.status-offline {
    background: #ef4444;
}

.screen-status-badge.paused {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.host-screen-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-offline {
    background: #ef4444;
}

.status-paused {
    background: #b91c1c;
}

/* Status-dot online box shadow update */
.status-online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Hierarchical Checkbox Tree */
.geo-tree {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.geo-group {
    margin-bottom: 4px;
}

.geo-state-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.geo-state-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.geo-city-list {
    margin-left: 24px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.geo-city-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    font-size: 0.9em;
    color: var(--text-secondary);
    cursor: pointer;
}

.geo-city-row:hover {
    color: var(--text-light);
}

/* Custom Checkbox */
/* Custom Checkbox */
.geo-check {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.status-active {
    background: var(--status-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-paused {
    background: #b91c1c;
    box-shadow: none;
    opacity: 1;
}

.status-standby {
    background: #f59e0b;
    /* Amber */
    box-shadow: none;
    opacity: 0.8;
}

.status-expired {
    background: #ef4444;
    box-shadow: none;
    opacity: 0.7;
}

/* Day Indicators */
.mini-day-grid,
.day-grid {
    display: flex;
    gap: 4px;
}

.mini-day-chip,
.day-chip {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Builder specific override for day chip size if needed, but 32px is inline in builder */
/* We will remove inline styles from builder and use class */
.day-chip {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.mini-day-chip.active,
.day-chip.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* 4-col grid for wider 12am/pm labels */
.mini-hour-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px;
}

.mini-hour-chip {
    width: 100%;
}

/* Export Button Hover */
.export-btn {
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Schedule Toggle (clickable date range) */
.schedule-toggle {
    cursor: pointer;
}

.schedule-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.schedule-label-row label {
    cursor: pointer;
}

.schedule-hint-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

.schedule-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s, background 0.2s;
}

.schedule-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.05);
}

.schedule-chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.schedule-chevron.expanded {
    transform: rotate(180deg);
}

.schedule-detail {
    margin-top: 12px;
}

/* Ad Card Stats Grid */
.card-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.metric-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.metric-box label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.metric-box span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    color: #1e293b;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    animation: toast-in 0.3s ease-out;
    border-left: 4px solid var(--brand-primary);
}

.toast.success {
    border-left-color: var(--status-success);
}

.toast.error {
    border-left-color: var(--status-error);
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* THEMED MODAL (Confirm / Alert) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-dialog {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    min-width: 340px;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modal-scale-in 0.2s ease-out;
}

@keyframes modal-scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-dialog.warning {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.modal-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.modal-dialog-icon.confirm {
    background: rgba(59, 130, 246, 0.15);
}

.modal-dialog-icon.warning {
    background: rgba(239, 68, 68, 0.15);
}

.modal-dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-dialog-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-btn.confirm {
    background: var(--brand-primary);
    color: white;
}

.modal-btn.confirm:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-btn.danger {
    background: var(--status-error);
    color: white;
}

.modal-btn.danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-btn.acknowledge {
    background: var(--brand-primary);
    color: white;
    flex: 1;
}

.modal-btn.acknowledge:hover {
    background: var(--brand-hover);
}

/* --- ADD CARD (Dashed CTA in grids) --- */
.add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
}

.add-card:hover {
    border-color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-3px);
}

.add-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.add-card:hover .add-card-icon {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.add-card-label {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.add-card:hover .add-card-label {
    color: var(--brand-primary);
}

/* --- NEW HOST SCREEN CARD DESIGN (Glassmorphism) --- */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 20px;
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    color: white;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.host-screen-card-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header Row */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status-dot-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-dot-pulse.status-online {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-green 2s infinite;
}

.status-dot-pulse.status-offline {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.status-dot-pulse.status-paused {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.status-text {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.last-seen {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 4px;
}

.last-seen-line {
    width: 100%;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: -4px;
    padding-left: 18px;
}

.card-actions-v2 {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    position: relative;
}

.action-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.action-btn.delete:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

/* Identity */
.screen-identity {
    text-align: center;
    margin: 8px 0 20px 0;
}

.screen-identity h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.screen-identity p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Metrics Grid */
.metrics-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.glass-metric {
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter internal blocks */
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.metric-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glass-metric .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.metric-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    opacity: 0.8;
}

/* ========================================
   PAIRING WIZARD STYLES
   ======================================== */

.wizard-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Step Indicator */
.wizard-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0 32px 0;
    flex-shrink: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-card);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.wizard-step.completed .wizard-step-number {
    background: var(--status-success);
    border-color: var(--status-success);
    color: white;
}

.wizard-step-label {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.wizard-step.active .wizard-step-label {
    color: var(--brand-primary);
}

.wizard-step.completed .wizard-step-label {
    color: var(--status-success);
}

.wizard-step-connector {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.wizard-step-connector.completed {
    background: var(--status-success);
}

/* Step Panels */
.wizard-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    min-height: 0;
    animation: fadeIn 0.3s ease;
}

.wizard-panel.active {
    display: flex;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step 1: Code Entry - flex properties only apply when .active sets display:flex */
.wizard-code-step {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    flex: 1;
}

.wizard-code-step h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.wizard-code-step p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 400px;
}

.wizard-code-input {
    font-size: 2rem !important;
    letter-spacing: 0.3em !important;
    text-align: center !important;
    width: 280px !important;
    padding: 16px 24px !important;
    text-transform: uppercase;
    font-weight: 600;
}

/* Step 2: Map (full width) - flex properties only apply when .active sets display:flex */
.wizard-map-step {
    flex: 1;
    flex-direction: column;
    padding: 0 24px 24px 24px;
    overflow: hidden;
    min-height: 0;
}

.wizard-map-step h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.wizard-map-container {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 400px;
}

.wizard-location-preview {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Step 3: Identity */
.wizard-identity-step {
    flex-direction: column;
    align-items: center;
    padding: 40px;
    flex: 1;
}

.wizard-identity-step .identity-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 450px;
}

.wizard-identity-step h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    text-align: center;
}

/* Step 4: Hours */
.wizard-hours-step {
    flex-direction: column;
    align-items: center;
    padding: 24px 40px;
    flex: 1;
    overflow-y: auto;
}

.wizard-hours-step h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-align: center;
}

.wizard-hours-step p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.hours-grid {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 8px;
}

.hours-day {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
}

.hours-times {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hours-times select {
    padding: 6px 8px;
    margin-top: 0;
    width: auto;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.wizard-nav .btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.wizard-nav .btn.secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Success Animation */
.success-animation {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex: 1;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--status-success);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.5);
}

.success-checkmark svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-checkmark svg path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.4s ease forwards 0.3s;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-animation h3 {
    margin-top: 24px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.success-animation p {
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Wizard Error State */
.wizard-error {
    color: var(--status-error);
    font-size: 0.9rem;
    margin-top: 16px;
    text-align: center;
}

/* Wizard Loading */
.wizard-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.wizard-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== BILLING TABLE ========== */
.billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.billing-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.billing-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.billing-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tx-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.tx-deposit {
    background: rgba(34, 197, 94, 0.1);
}

.tx-earning {
    background: rgba(34, 197, 94, 0.1);
}

.tx-charge {
    background: rgba(239, 68, 68, 0.1);
}

.tx-withdrawal {
    background: rgba(148, 163, 184, 0.1);
}

.tx-refund {
    background: rgba(59, 130, 246, 0.1);
}

.billing-filter-btn {
    padding: 4px 12px !important;
    font-size: 0.7rem !important;
    background: var(--surface-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    color: var(--text-muted) !important;
    transition: all 0.2s;
}

.billing-filter-btn:hover {
    border-color: var(--brand-primary) !important;
    color: var(--text-primary) !important;
}

.billing-filter-btn.active {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

/* ── Notification Bell & Dropdown ── */
.notif-badge {
    position: absolute;
    top: 6px;
    right: 12px;
    background: var(--status-error);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notif-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    z-index: 500;
    margin-top: 4px;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--brand-primary);
}

.notif-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Sidebar User Hub ── */
.sidebar-user-hub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 2px 0 16px;
    position: relative;
}

.user-hub-email {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-hub-notif {
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.user-hub-notif .notif-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
}

.sidebar-user-hub .notif-dropdown {
    left: 0;
    top: calc(100% + 4px);
}

/* ── Sidebar Logout ── */
.sidebar-logout {
    margin-top: auto !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04) !important;
    font-size: 0.9rem;
    text-align: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-logout:hover {
    color: var(--status-error) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Ad Detail Modal ── */
.ad-detail-modal {
    width: 560px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.adm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.adm-info-banner {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.adm-section {
    margin-bottom: 8px;
}

.adm-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.adm-locked-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.adm-locked-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
}

.adm-locked-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.adm-locked-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.adm-qr-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 8px;
}

.adm-qr-toggle button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.adm-qr-toggle button.active {
    background: var(--brand-primary);
    color: #fff;
}

.adm-media-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.adm-media-preview {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-main);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.adm-media-preview img,
.adm-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adm-media-upload {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adm-upload-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.adm-upload-btn:hover {
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.adm-file-clear {
    font-size: 0.75rem;
    color: var(--status-error);
    cursor: pointer;
}

.adm-file-clear:hover {
    text-decoration: underline;
}

/* Large media preview (edit modal) */
.adm-media-preview-lg {
    width: 100%;
    max-height: 250px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-main);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.adm-media-preview-lg:hover {
    border-color: var(--brand-primary);
}

.adm-media-preview-lg img,
.adm-media-preview-lg video {
    width: 100%;
    height: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.adm-enlarge-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.65);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.adm-media-preview-lg:hover .adm-enlarge-hint {
    opacity: 1;
}

/* Full-screen lightbox overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Admin panel clickable thumbnail */
.ad-preview-thumb {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ad-preview-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ── Business Hours Grid (Screen Edit Modal) ── */
.biz-hours-grid {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.biz-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.biz-hours-day {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 60px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.biz-hours-selects {
    display: flex;
    align-items: center;
    gap: 8px;
}

.biz-hours-selects select {
    width: 80px;
    padding: 6px 8px;
    font-size: 0.8rem;
    border-radius: 8px;
    margin-top: 0;
}

/* ── SVG Icon Theming (match help page style) ── */
.notif-icon svg,
.glow-icon svg {
    stroke: var(--brand-primary);
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================================
   MOBILE RESPONSIVE — Touch targets, font sizes, layout
   Only affects screens ≤ 768px. Desktop is completely unchanged.
   ========================================================================= */
@media (max-width: 768px) {

    /* --- Override inline styles on #app --- */
    #app {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* --- Layout: Sidebar → compact top bar --- */
    body {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    aside {
        width: 100% !important;
        flex-direction: column;
        padding: 8px 12px;
        gap: 6px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    /* Hide footer on mobile — save space */
    aside .sidebar-footer {
        display: none !important;
    }

    /* Compact logo on mobile */
    aside .logo {
        padding: 0 !important;
        margin-bottom: 4px;
    }

    aside .logo svg {
        height: 28px !important;
    }

    /* Hide email, keep notification bell */
    aside .user-hub-email {
        display: none !important;
    }

    /* Make bell match nav-item style */
    aside .sidebar-user-hub {
        padding: 0;
        margin: 0;
    }

    aside .user-hub-notif {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    /* Mode switcher: compact horizontal */
    aside .mode-switcher {
        margin: 0;
        width: 100%;
    }

    aside nav {
        flex-direction: row;
        gap: 4px;
        flex-wrap: wrap;
        flex: unset;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .nav-item:hover {
        padding-left: 12px;
        /* prevent shift on mobile */
    }

    /* --- Main content area --- */
    main {
        padding: 20px 16px;
        overflow-y: visible;
        height: auto;
    }

    /* --- Header --- */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 1.6rem;
    }

    /* --- Stats grid: 2 columns on mobile --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 16px;
        border-radius: 14px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* --- Buttons: 44px min touch target --- */
    .btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 44px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .mode-btn {
        padding: 10px 8px;
        font-size: 0.8rem;
        min-height: 44px;
    }

    /* --- Cards: ad cards stack vertically --- */
    .ad-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ad-info {
        gap: 12px;
        width: 100%;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .campaign-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .campaign-card-v2 {
        border-radius: 14px;
    }

    .campaign-card-v2:hover {
        transform: none;
        /* disable hover lift on touch */
    }

    /* --- Host screen cards --- */
    .host-screen-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px;
    }

    /* --- Font size bumps (small → readable) --- */
    .metric-item {
        font-size: 0.9rem;
    }

    .card-dates label,
    .card-hours label {
        font-size: 0.8rem;
    }

    .date-range-box {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .mini-hour-chip {
        font-size: 0.7rem;
        padding: 6px 2px;
    }

    .mini-day-chip,
    .day-chip {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .rank-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .field-group label {
        font-size: 0.85rem;
    }

    .schedule-hint-text {
        font-size: 0.8rem;
    }

    .breadcrumb {
        font-size: 0.9rem;
    }

    .status-pill {
        font-size: 1rem;
    }

    /* --- Forms: larger touch targets --- */
    input,
    select {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 44px;
    }

    /* --- Modals: full width on mobile --- */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 24px 20px;
        border-radius: 16px;
    }

    /* --- Upload area --- */
    .upload-area {
        padding: 24px;
    }

    /* --- Notification & billing items --- */
    .autocomplete-item {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    /* --- Screen/Ad card fixes --- */

    /* Header row: status left, buttons right */
    .card-header-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 8px;
    }

    /* Status wrapper: dot + text on first line, reported text on second */
    .status-indicator-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    /* Keep dot visible */
    .status-dot-pulse {
        flex-shrink: 0;
    }

    .status-text {
        font-size: 0.85rem !important;
    }

    /* Reported time: force to second line within wrapper */
    .last-seen-line {
        flex-basis: 100% !important;
        width: auto !important;
        padding-left: 18px !important;
        margin-top: -4px !important;
        font-size: 0.7rem !important;
    }

    /* Buttons: match .btn-icon exactly */
    .card-actions-v2 {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .action-btn {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        padding: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        font-size: 0.9rem;
    }

    .host-screen-card {
        flex-direction: row !important;
    }

    /* Force monochrome emoji on mobile */
    .action-btn,
    .btn-icon,
    .card-actions button {
        font-family: 'Outfit', sans-serif;
        color: white;
        -webkit-text-fill-color: white;
    }

    /* --- Wallet / billing on mobile --- */
    .biz-hours-selects select {
        width: 100%;
        min-height: 44px;
        font-size: 0.9rem;
    }

    /* --- Pairing wizard modal --- */
    .modal-overlay .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        height: auto !important;
        max-height: 90vh !important;
        padding: 16px !important;
    }

    .wizard-steps {
        gap: 0 !important;
        padding: 12px 8px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
    }

    .wizard-step-number {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }

    .wizard-step-label {
        font-size: 0.6rem !important;
        display: none;
    }

    .wizard-step-connector {
        width: 16px !important;
        min-width: 16px !important;
    }

    /* --- Business hours grid (step 4) --- */
    .hours-grid {
        padding: 4px !important;
    }

    .hours-row {
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 6px 4px !important;
    }

    .hours-day {
        min-width: auto !important;
        width: auto !important;
        gap: 4px !important;
    }

    .hours-day span {
        font-size: 0.75rem !important;
    }

    .hours-times {
        gap: 4px !important;
        flex-shrink: 1;
    }

    .hours-times select {
        width: 70px !important;
        min-width: 0 !important;
        font-size: 0.75rem !important;
        padding: 6px 2px !important;
    }

    .wizard-panel {
        padding: 16px !important;
        overflow-x: hidden;
    }

    /* Step 5: category grid — 2 columns instead of 3 */
    .wizard-blocking-step>div[style*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .wizard-blocking-step label {
        padding: 8px 8px !important;
        font-size: 0.8rem !important;
    }

    .wizard-blocking-step label span {
        font-size: 0.78rem !important;
    }
}

/* ===================================================================
   GEAR DROPDOWN MENU (Screen Card Settings)
   =================================================================== */
.dropdown-wrapper {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    z-index: 500;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    animation: dropdown-slide-in 0.15s ease-out;
}

@keyframes dropdown-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.dropdown-item.danger {
    color: #f87171;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}