/* 
 * QuantLease Feature Tour - FinQuery Inspired Styles
 * Full-bleed app interface with floating, glowing popovers
 */

:root {
    /* Light Theme Defaults */
    --ft-bg: #f8fafc;
    --ft-panel: #ffffff;
    --ft-border: rgba(0, 0, 0, 0.08);
    --ft-text: #1e293b;
    --ft-muted: #64748b;
    --ft-primary: #6366f1;
    --ft-primary-hover: #4f46e5;
    --ft-sidebar: #f1f5f9;

    /* Glass popover tokens - light */
    --tour-popover-bg: rgba(255, 255, 255, 0.72);
    --tour-popover-border: rgba(255, 255, 255, 0.55);
    --tour-popover-text: #0f172a;
    --tour-popover-muted: #475569;
    --tour-popover-footer-bg: rgba(0, 0, 0, 0.03);
    --tour-popover-footer-border: rgba(0, 0, 0, 0.07);
    --tour-beacon: #6366f1;
}

.dark,
[data-theme="dark"] {
    /* Dark Theme Overrides */
    --ft-bg: #0f111a;
    --ft-panel: #1a1d2d;
    --ft-border: rgba(255, 255, 255, 0.1);
    --ft-text: #e2e8f0;
    --ft-muted: #94a3b8;
    --ft-primary: #7c3aed;
    --ft-primary-hover: #6d28d9;
    --ft-sidebar: #131520;

    --tour-popover-bg: rgba(18, 20, 32, 0.80);
    --tour-popover-border: rgba(255, 255, 255, 0.10);
    --tour-popover-text: #f1f5f9;
    --tour-popover-muted: #94a3b8;
    --tour-popover-footer-bg: rgba(255, 255, 255, 0.03);
    --tour-popover-footer-border: rgba(255, 255, 255, 0.07);
    --tour-beacon: #7c3aed;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    /* App fills the iframe */
}

/* ===========================
   App Layout Shell
   =========================== */
.ft-app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

/* Sidebar */
.ft-app-sidebar {
    width: 260px;
    background-color: var(--ft-sidebar);
    border-right: 1px solid var(--ft-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
    z-index: 10;
}

.ft-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 32px 8px;
}

.ft-logo-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--ft-primary), #4f46e5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.ft-brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ft-nav-group {
    margin-bottom: 24px;
}

.ft-nav-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ft-muted);
    letter-spacing: 0.05em;
    padding: 0 8px;
    margin-bottom: 8px;
}

.ft-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.ft-nav-item.active {
    color: var(--ft-primary) !important;
    font-weight: 500 !important;
    background-color: rgba(124, 58, 237, 0.1) !important;
}

.ft-nav-item.active svg {
    color: var(--ft-primary) !important;
}


/* Main Content Area */
.ft-app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--ft-bg);
}

.ft-app-topbar {
    height: 64px;
    border-bottom: 1px solid var(--ft-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background-color: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.ft-breadcrumb {
    font-size: 14px;
    color: var(--ft-muted);
}

.ft-breadcrumb strong {
    color: var(--ft-text);
    font-weight: 500;
}

.ft-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ft-btn-icon,
.ft-btn-avatar {
    background: transparent;
    border: none;
    color: var(--ft-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.ft-btn-icon:hover {
    color: var(--ft-text);
}


/* Screens Container */
.ft-screens-container {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
}

.ft-screen {
    position: absolute;
    top: 32px;
    left: 32px;
    right: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1;
}

.ft-screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
}

/* ===========================
   Common UI Components
   =========================== */
.ft-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.ft-btn-primary {
    background: var(--ft-primary);
    color: white;
    border: 1px solid var(--ft-primary);
}

.ft-btn-outline {
    background: transparent;
    color: var(--ft-text);
    border: 1px solid var(--ft-border);
}

.ft-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.text-purple {
    color: #a855f7 !important;
}

.text-green {
    color: #22c55e !important;
}

.text-red {
    color: #ef4444 !important;
}

.font-bold {
    font-weight: 600 !important;
}

.muted {
    color: var(--ft-muted) !important;
}

.primary-text {
    color: var(--ft-primary) !important;
}

.bg-white {
    background-color: white !important;
    color: #1e293b !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

/* ===========================
   TOUR LAYER: Mask, Beacon, Popover
   =========================== */

/* Tour Overlay Mask: Dims everything outside the target */
.tour-overlay-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 9, 10, 0.5);
    /* Lighter opacity */
    backdrop-filter: blur(3px);
    /* Less blur */
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

.tour-overlay-mask.active {
    opacity: 1;
}

/* Highlighted Target Element */
.tour-target-active {
    position: relative;
    z-index: 10000 !important;
    border-radius: inherit;
    box-shadow: 0 0 0 4px rgba(94, 106, 210, 0.4) !important;
    /* Highlight ring (primary color) */
    pointer-events: auto;
    transition: box-shadow 0.3s ease;
}

/* Pulsing Beacon */
.tour-beacon {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translate(-50%, -50%);
}

.tour-beacon.active {
    opacity: 1;
}

.beacon-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    background-color: var(--tour-beacon);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--tour-beacon);
}

.beacon-pulse,
.beacon-pulse-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background-color: var(--tour-beacon);
    border-radius: 50%;
    opacity: 0.6;
    animation: beacon-pulse-anim 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.beacon-pulse-2 {
    animation-delay: 1s;
}

@keyframes beacon-pulse-anim {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Popover Card - Glassmorphism */
.tour-popover {
    position: absolute;
    width: 300px;
    background: var(--tour-popover-bg);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--tour-popover-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.20),
        0 2px 8px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    z-index: 10002;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--tour-popover-text);
    pointer-events: auto;
    overflow: hidden;
}

.tour-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Gradient accent bar at top */
.tour-popover::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
    border-radius: 16px 16px 0 0;
}

.tour-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 14px 16px 0;
}

.step-count {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.close-tour {
    background: none;
    border: none;
    color: var(--tour-popover-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    opacity: 0.55;
}

.close-tour:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--tour-popover-text);
    opacity: 1;
}

.dark .close-tour:hover {
    background: rgba(255, 255, 255, 0.10);
}

.popover-title {
    margin: 0 0 5px 0;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--tour-popover-text);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.popover-text {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--tour-popover-muted);
}

.tour-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-top: 1px solid var(--tour-popover-footer-border);
    background: var(--tour-popover-footer-bg);
}

/* Pill-style dot progress */
.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dark .tour-dot {
    background: rgba(255, 255, 255, 0.18);
}

.tour-dot.active {
    width: 18px;
    background: #6366f1;
}

.btn-back,
.btn-next {
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    line-height: 1;
}

.btn-back {
    background: rgba(0, 0, 0, 0.06);
    color: var(--tour-popover-text);
    border: 1px solid rgba(0, 0, 0, 0.09);
}

.dark .btn-back {
    background: rgba(255, 255, 255, 0.07);
    color: var(--tour-popover-text);
    border-color: rgba(255, 255, 255, 0.10);
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.10);
}

.dark .btn-back:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-next {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-next:hover {
    opacity: 0.90;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

/* Popover Arrow */
.popover-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--tour-popover-bg);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    border: 1px solid var(--tour-popover-border);
    transform: rotate(45deg);
    z-index: -1;
}

/* Arrow Positioning */
.tour-popover[data-placement="bottom"] .popover-arrow {
    top: -5px;
    left: 50%;
    margin-left: -7px;
    border-bottom: none;
    border-right: none;
}

.tour-popover[data-placement="top"] .popover-arrow {
    bottom: -5px;
    left: 50%;
    margin-left: -7px;
    border-top: none;
    border-left: none;
}

.tour-popover[data-placement="right"] .popover-arrow {
    left: -5px;
    top: 50%;
    margin-top: -7px;
    border-right: none;
    border-top: none;
}

.tour-popover[data-placement="left"] .popover-arrow {
    right: -5px;
    top: 50%;
    margin-top: -7px;
    border-left: none;
    border-bottom: none;
}


/* ===========================
   MOCKUP SPECIFIC STYLES
   =========================== */

/* Dashboard */
.ft-dash {
    max-width: 1000px;
    margin: 0 auto;
}

.ft-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--ft-panel);
    border-radius: 12px;
    border: 1px solid var(--ft-border);
}

.ft-dash-title {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Outfit';
}

.ft-dash-sub {
    font-size: 14px;
    color: var(--ft-muted);
    margin-top: 4px;
    flex: 1;
    margin-right: 20px;
    padding-left: 16px;
    border-left: 2px solid var(--ft-border);
}

.ft-btn-live {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ft-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ft-card {
    background: var(--ft-panel);
    border: 1px solid var(--ft-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.ft-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.ft-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-card-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--ft-muted);
    letter-spacing: 0.05em;
}

.ft-card-sub {
    font-size: 16px;
    font-weight: 500;
    margin-top: 4px;
}

.ft-chart-bars {
    height: 180px;
    display: flex;
    gap: 16px;
}

.ft-bar-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ft-muted);
    text-align: right;
}

.ft-bar-area {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    padding-bottom: 1px;
}

.ft-bar-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ft-border);
}

.ft-bar {
    width: 24px;
    background: var(--ft-primary);
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
    transition: height 1s;
}

.ft-chart-trend {
    height: 180px;
    display: flex;
    gap: 16px;
}

/* Data Entry Form Styles */
.ft-ai {
    display: flex;
    gap: 24px;
    height: calc(100vh - 140px);
}

.ft-ai-form {
    flex: 1;
    background: var(--ft-panel);
    border: 1px solid var(--ft-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
}

.ft-ai-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ft-border);
    padding-bottom: 16px;
}

.ft-ai-h2 {
    font-size: 20px;
    font-family: 'Outfit';
    margin: 0 0 24px 0;
}

.flex-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ft-form-group {
    margin-bottom: 24px;
}

.ft-form-lbl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ft-muted);
    margin-bottom: 12px;
}

.ft-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ft-input-wrap {
    flex: 1;
}

.ft-input-wrap label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: var(--ft-muted);
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

/* Form inputs targeted here apply to both AI extraction and manual forms */
.ft-input-wrap input,
.ft-input-wrap input[type="date"],
.ft-input-wrap input[type="number"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--ft-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--ft-text);
    font-size: 13px;
    font-family: inherit;
}

.bg-white .ft-input-wrap input {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.ft-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.ft-dot.blue {
    background: #3b82f6;
}

.ft-dot.orange {
    background: #f59e0b;
}

/* PDF Panel */
.ft-ai-pdf {
    flex: 1;
    background: #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #1e293b;
    position: relative;
}

.ft-pdf-toolbar {
    background: #cbd5e1;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
}

.ft-pdf-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ft-pdf-actions button {
    background: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
}

.ft-pdf-content {
    padding: 40px;
    background: white;
    flex: 1;
    overflow-y: auto;
    font-family: serif;
    font-size: 14px;
    line-height: 1.6;
}

.pdf-center {
    text-align: center;
}

mark {
    padding: 2px 4px;
    border-radius: 2px;
}

.hl-orange {
    background: rgba(245, 158, 11, 0.3);
}

.hl-blue {
    background: rgba(59, 130, 246, 0.3);
}

.hl-teal {
    background: rgba(20, 184, 166, 0.3);
}

.ft-pdf-scanline {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(124, 58, 237, 0.1), rgba(124, 58, 237, 0.4));
    border-bottom: 2px solid var(--ft-primary);
    animation: scan 3s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 40px;
    }

    100% {
        top: 300px;
    }
}

/* Schedule / Tables */
.ft-sched {
    max-width: 1000px;
    margin: 0 auto;
}

.ft-sched-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ft-border);
}

.ft-sched-title {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Outfit';
    display: flex;
    align-items: center;
}

.ft-table-wrap {
    background: var(--ft-panel);
    border: 1px solid var(--ft-border);
    border-radius: 12px;
    overflow: hidden;
}

.ft-schedule-table,
.ft-jnl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ft-schedule-table th,
.ft-jnl-table th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ft-border);
    color: var(--ft-muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.2);
}

.ft-schedule-table td,
.ft-jnl-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ft-schedule-table th.r,
.ft-schedule-table td.r,
.ft-jnl-table th.r,
.ft-jnl-table td.r {
    text-align: right;
}

.hl-row {
    background: rgba(124, 58, 237, 0.05);
    border-left: 2px solid var(--ft-primary);
}

/* Journals specific */
.ft-jnl {
    max-width: 900px;
    margin: 0 auto;
}

.ft-jnl-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ft-border);
    padding-bottom: 8px;
    font-size: 13px;
    align-items: center;
}

.ft-jnl-tabs button {
    background: none;
    border: none;
    color: var(--ft-muted);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
}

.ft-jnl-tabs button.active {
    color: var(--ft-primary);
    border-bottom: 2px solid var(--ft-primary);
    margin-bottom: -9px;
}

.purple-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ft-primary);
    margin-right: 8px;
}

.ft-jnl-h2 {
    font-size: 18px;
    margin: 0 0 16px 0;
    font-family: 'Outfit';
}

.spacer {
    height: 16px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0 !important;
}

.italic {
    font-style: italic;
}

/* Modifications */
.ft-mod {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 40px;
}

.ft-mod-alert {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 14px;
}

.ft-mod-tag {
    margin-left: auto;
    background: #f59e0b;
    color: #614002;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.ft-mod-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.ft-mod-card {
    background: var(--ft-panel);
    border: 1px solid var(--ft-border);
    border-radius: 12px;
    padding: 24px;
    width: 240px;
}

.ft-mod-card h3 {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--ft-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ft-mod-card .val {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Outfit';
    margin-bottom: 4px;
}

.ft-mod-card .sub {
    font-size: 12px;
    color: var(--ft-muted);
    margin-bottom: 20px;
}

.ft-mod-card .detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.ft-mod-card .detail-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.ft-mod-card.after {
    border-color: var(--ft-primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
    background: linear-gradient(to bottom, var(--ft-panel), rgba(124, 58, 237, 0.05));
}

.highlight {
    color: #a855f7;
}

.ft-mod-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ft-mod-arrow .badge {
    background: var(--ft-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: white;
}

.ft-mod-arrow .sub {
    font-size: 11px;
    color: var(--ft-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ===========================
   TOUR GATE MODAL (ENHANCED)
   =========================== */
.tour-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 9, 10, 0.9);
    backdrop-filter: blur(12px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-gate-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tour-gate-content {
    width: 100%;
    max-width: 600px;
    background: rgba(22, 23, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
}

.tour-gate-overlay.active .tour-gate-content {
    transform: translateY(0) scale(1);
}

.tour-gate-header {
    text-align: center;
    margin-bottom: 32px;
}

.tour-gate-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tour-gate-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Enhanced Form Styles */
.enhanced-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.enhanced-form .form-group.full-width {
    grid-column: span 2;
}

.enhanced-form .form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6366f1;
    margin-bottom: 8px;
}

.enhanced-form input,
.enhanced-form select,
.enhanced-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.enhanced-form input:focus,
.enhanced-form select:focus,
.enhanced-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.enhanced-form .btn-submit {
    margin-top: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.enhanced-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

.enhanced-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading .spinner {
    display: block;
}

.loading .btn-text {
    opacity: 0.7;
}

/* Success Message Container */
.success-container {
    text-align: center;
    display: none;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.success-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.success-container p {
    color: #94a3b8;
}