/* ==========================================================================
   TRAVELTARA (TTJX) — CLIENT PORTAL TAILWIND CSS STYLESHEET
   Client Dashboard & Authentication Architecture · Responsive Utility Layers
   ========================================================================== */

@layer base {
    :root {
        --tt-ink: #0b1320;
        --tt-navy: #101b2e;
        --tt-muted: #718096;
        --tt-line: rgba(11, 19, 32, 0.10);
        --tt-paper: #f6f3ee;
        --tt-white: #ffffff;
        --tt-blue: #356cf4;
        --tt-gold: #d8b77a;
        --tt-shadow: 0 22px 70px rgba(10, 18, 32, 0.12);
    }

    * {
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        margin: 0;
        font-family: 'DM Sans', system-ui, sans-serif;
        color: var(--tt-ink);
        background: var(--tt-paper);
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    button, input {
        font: inherit;
    }

    button {
        cursor: pointer;
    }
}

@layer components {
    /* --------------------------------------------------------------------------
       1. AMBIENT NOISE & PAGE LOADER
       -------------------------------------------------------------------------- */
    .tt-noise {
        position: fixed;
        inset: 0;
        pointer-events: none;
        opacity: 0.045;
        z-index: 50;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
    }

    .tt-page-loader {
        position: fixed;
        inset: 0;
        background: #0b1320;
        z-index: 100;
        display: grid;
        place-items: center;
        transition: opacity 0.35s, visibility 0.35s;
    }

    .tt-page-loader span {
        width: 48px;
        height: 48px;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: ttSpin 1s linear infinite;
    }

    .tt-page-loader.is-hidden {
        opacity: 0;
        visibility: hidden;
    }

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

    /* --------------------------------------------------------------------------
       2. AUTHENTICATION SCREENS (LOGIN, REGISTER, RESET)
       -------------------------------------------------------------------------- */
    .tt-auth-shell {
        min-height: 100svh;
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
        background: var(--tt-white);
    }

    .tt-auth-visual {
        position: relative;
        overflow: hidden;
        min-height: 100svh;
        color: #ffffff;
        display: flex;
        align-items: flex-end;
        padding: 7vw;
    }

    .tt-auth-visual-bg {
        position: absolute;
        inset: -3%;
        background: url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2200&q=85') center/cover;
        transform: scale(1.04);
    }

    .tt-auth-visual-register .tt-auth-visual-bg {
        background-image: url('https://images.unsplash.com/photo-1470770841072-f978cf4d019e?auto=format&fit=crop&w=2200&q=85');
    }

    .tt-auth-visual-reset .tt-auth-visual-bg {
        background-image: url('https://images.unsplash.com/photo-1500534623283-312aade485b7?auto=format&fit=crop&w=2200&q=85');
    }

    .tt-auth-visual-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(7, 15, 25, 0.22), rgba(7, 15, 25, 0.72));
    }

    .tt-auth-brand {
        position: absolute;
        top: 42px;
        left: 42px;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.22em;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .tt-auth-brand img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

    .tt-auth-story {
        position: relative;
        z-index: 1;
        max-width: 600px;
    }

    .tt-eyebrow {
        font-size: 11px;
        letter-spacing: 0.22em;
        font-weight: 700;
        opacity: 0.78;
    }

    .tt-auth-story h1 {
        font-family: 'Playfair Display', serif;
        font-size: clamp(52px, 6vw, 92px);
        line-height: 0.95;
        letter-spacing: -0.045em;
        margin: 18px 0;
    }

    .tt-auth-story h1 em,
    .tt-dashboard-heading h1 em,
    .tt-dashboard-hero h2 em {
        font-style: italic;
        color: #e7c98b;
    }

    .tt-auth-story p {
        max-width: 500px;
        margin: 0;
        font-size: 18px;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.82);
    }

    .tt-route-line {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 32px;
        height: 1px;
        background: rgba(255, 255, 255, 0.18);
    }

    .tt-route-line span {
        display: block;
        width: 0;
        height: 100%;
        background: #ffffff;
    }

    .tt-auth-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 56px;
    }

    .tt-auth-panel-inner {
        width: min(100%, 500px);
    }

    .tt-mobile-brand {
        display: none;
        font-size: 14px;
        font-weight: 800;
        letter-spacing: 0.2em;
        margin-bottom: 48px;
    }

    .tt-auth-panel h2 {
        font-family: 'Playfair Display', serif;
        font-size: clamp(42px, 4vw, 62px);
        line-height: 1;
        margin: 15px 0 12px;
        letter-spacing: -0.04em;
    }

    .tt-auth-intro {
        margin: 0 0 26px;
        color: #708096;
        line-height: 1.7;
    }

    .tt-google-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding: 15px 20px;
        border: 1px solid var(--tt-line);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
        font-weight: 700;
        transition: 0.25s;
    }

    .tt-google-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    }

    .tt-google-icon {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        border: 1px solid #e2e8f0;
        font-weight: 800;
        color: #4285f4;
    }

    .tt-divider {
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 24px 0;
        color: #98a3b3;
        font-size: 12px;
    }

    .tt-divider:before,
    .tt-divider:after {
        content: '';
        height: 1px;
        background: var(--tt-line);
        flex: 1;
    }

    .tt-auth-form {
        display: grid;
        gap: 17px;
    }

    .tt-auth-form label {
        display: grid;
        gap: 8px;
    }

    .tt-auth-form label > span {
        font-size: 12px;
        font-weight: 700;
        color: #334155;
    }

    .tt-auth-form input:not([type=checkbox]) {
        width: 100%;
        height: 53px;
        border: 1px solid #dfe5eb;
        border-radius: 14px;
        padding: 0 16px;
        outline: none;
        background: #fbfcfe;
        transition: 0.2s;
    }

    .tt-auth-form input:not([type=checkbox]):focus {
        border-color: #8faefc;
        box-shadow: 0 0 0 4px rgba(53, 108, 244, 0.10);
        background: #ffffff;
    }

    .tt-password-field {
        position: relative;
    }

    .tt-password-field input {
        padding-right: 76px !important;
    }

    .tt-password-toggle {
        position: absolute;
        right: 10px;
        top: 8px;
        height: 37px;
        border: 0;
        background: transparent;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .tt-form-row {
        display: flex;
        justify-content: flex-end;
        font-size: 12px;
        font-weight: 700;
        color: #356cf4;
    }

    .tt-primary-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 55px;
        padding: 0 19px;
        border: 0;
        border-radius: 15px;
        background: var(--tt-navy);
        color: #ffffff;
        font-weight: 800;
        box-shadow: 0 12px 28px rgba(16, 27, 46, 0.18);
        transition: 0.25s;
    }

    .tt-primary-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 34px rgba(16, 27, 46, 0.24);
    }

    .tt-primary-btn i {
        font-style: normal;
        font-size: 20px;
    }

    .tt-btn-link {
        margin-top: 16px;
    }

    .tt-auth-switch {
        text-align: center;
        color: #7b8796;
        font-size: 13px;
        margin: 25px 0 0;
    }

    .tt-auth-switch a {
        color: #0f172a;
        font-weight: 800;
    }

    .tt-alert {
        padding: 13px 15px;
        border-radius: 13px;
        font-size: 13px;
        line-height: 1.6;
        margin: 0 0 17px;
    }

    .tt-alert-error {
        background: #fff2f2;
        color: #a61b1b;
        border: 1px solid #ffd5d5;
    }

    .tt-alert-success {
        background: #effaf3;
        color: #1f7a3b;
        border: 1px solid #d6f2df;
    }

    .tt-field-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .tt-check {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 10px !important;
        align-items: flex-start !important;
    }

    .tt-check input {
        margin-top: 3px;
    }

    .tt-check span {
        font-size: 12px !important;
        color: #788495 !important;
        line-height: 1.5;
    }

    /* --------------------------------------------------------------------------
       3. CLIENT DASHBOARD PORTAL
       -------------------------------------------------------------------------- */
    .tt-dashboard-page {
        background: #f5f2ec;
    }

    .tt-app-shell {
        min-height: 100svh;
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .tt-sidebar {
        position: sticky;
        top: 0;
        height: 100svh;
        background: #0b1320;
        color: #ffffff;
        padding: 28px 20px;
        display: flex;
        flex-direction: column;
        z-index: 40;
    }

    .tt-sidebar-brand {
        font-size: 15px;
        font-weight: 800;
        letter-spacing: 0.22em;
        padding: 9px 13px 42px;
    }

    .tt-sidebar nav {
        display: grid;
        gap: 5px;
    }

    .tt-sidebar nav a {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 13px 13px;
        border-radius: 12px;
        color: rgba(255, 255, 255, 0.62);
        font-size: 13px;
        font-weight: 600;
        transition: 0.2s;
    }

    .tt-sidebar nav a span {
        font-size: 10px;
        opacity: 0.6;
    }

    .tt-sidebar nav a:hover,
    .tt-sidebar nav a.is-active {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .tt-sidebar-bottom {
        margin-top: auto;
        display: grid;
        gap: 10px;
        padding-top: 30px;
    }

    .tt-sidebar-bottom a {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.48);
        padding: 8px 13px;
    }

    .tt-dashboard-main {
        min-width: 0;
    }

    .tt-topbar {
        height: 78px;
        padding: 0 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tt-user-chip {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 12px;
    }

    .tt-user-chip img,
    .tt-user-chip > span {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }

    .tt-user-chip > span {
        display: grid;
        place-items: center;
        background: #dce5f8;
        color: #35507e;
        font-weight: 800;
    }

    .tt-user-chip a {
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        border: 1px solid var(--tt-line);
        border-radius: 50%;
        margin-left: 4px;
    }

    .tt-mobile-menu {
        display: none;
        border: 0;
        background: transparent;
        font-size: 20px;
    }

    .tt-dashboard-content {
        padding: 12px 44px 70px;
        max-width: 1400px;
        margin: auto;
    }

    .tt-dashboard-heading {
        margin: 20px 0 34px;
    }

    .tt-dashboard-heading h1 {
        font-family: 'Playfair Display', serif;
        font-size: clamp(48px, 5vw, 80px);
        line-height: 0.95;
        margin: 14px 0 14px;
        letter-spacing: -0.05em;
    }

    .tt-dashboard-heading p {
        color: #718096;
        max-width: 520px;
        font-size: 16px;
        line-height: 1.7;
    }

    .tt-dashboard-hero {
        position: relative;
        min-height: 480px;
        border-radius: 30px;
        overflow: hidden;
        box-shadow: var(--tt-shadow);
        isolation: isolate;
    }

    .tt-hero-image {
        position: absolute;
        inset: -3%;
        background: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=2200&q=88') center/cover;
        z-index: -2;
    }

    .tt-hero-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(7, 14, 24, 0.72), rgba(7, 14, 24, 0.15) 80%);
        z-index: -1;
    }

    .tt-hero-content {
        padding: 56px;
        max-width: 690px;
        color: #ffffff;
    }

    .tt-hero-content h2 {
        font-family: 'Playfair Display', serif;
        font-size: clamp(52px, 6vw, 86px);
        line-height: 0.95;
        margin: 18px 0;
    }

    .tt-hero-content p {
        max-width: 520px;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.78);
    }

    .tt-hero-btn {
        display: inline-flex;
        align-items: center;
        gap: 16px;
        margin-top: 24px;
        padding: 14px 16px 14px 18px;
        background: #ffffff;
        color: #0b1320;
        border-radius: 999px;
        font-weight: 800;
        font-size: 12px;
    }

    .tt-hero-btn i {
        font-style: normal;
        font-size: 19px;
    }

    .tt-stat-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin: 18px 0 52px;
    }

    .tt-stat-grid article {
        background: #ffffff;
        border: 1px solid var(--tt-line);
        border-radius: 22px;
        padding: 25px;
    }

    .tt-stat-grid span {
        display: block;
        font-size: 10px;
        letter-spacing: 0.16em;
        font-weight: 800;
        color: #8993a1;
    }

    .tt-stat-grid strong {
        display: block;
        font-size: 36px;
        margin: 12px 0 5px;
    }

    .tt-stat-grid small {
        color: #8691a1;
        font-size: 12px;
    }

    .tt-dashboard-lower {
        padding-bottom: 50px;
    }

    .tt-section-heading {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 20px;
    }

    .tt-section-heading h2 {
        font-family: 'Playfair Display', serif;
        font-size: 38px;
        margin: 8px 0;
    }

    .tt-section-heading > a {
        font-size: 12px;
        font-weight: 800;
    }

    .tt-empty-journey {
        position: relative;
        min-height: 300px;
        border: 1px dashed #cdd4dd;
        border-radius: 28px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(242, 238, 230, 0.82));
        display: grid;
        place-items: center;
        text-align: center;
        padding: 45px;
        overflow: hidden;
    }

    .tt-empty-glow {
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(216, 183, 122, 0.2);
        filter: blur(50px);
        left: -100px;
        top: -120px;
    }

    .tt-empty-icon {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #0f172a;
        color: #ffffff;
    }

    .tt-empty-journey h3 {
        font-family: 'Playfair Display', serif;
        font-size: 34px;
        margin: 5px 0;
    }

    .tt-empty-journey p {
        max-width: 520px;
        color: #718096;
        line-height: 1.65;
        margin: 0;
    }

    .tt-outline-btn {
        display: inline-flex;
        gap: 13px;
        align-items: center;
        margin-top: 16px;
        padding: 13px 16px;
        border-radius: 999px;
        border: 1px solid #bcc4cf;
        background: #ffffff;
        font-size: 12px;
        font-weight: 800;
    }

    .tt-outline-btn span {
        font-size: 16px;
    }

    .tt-reveal {
        opacity: 1;
    }
}

@layer utilities {
    @media (max-width: 1050px) {
        .tt-auth-shell { grid-template-columns: 1fr; }
        .tt-auth-visual { display: none; }
        .tt-auth-panel { padding: 36px 24px; }
        .tt-mobile-brand { display: block; }
        .tt-app-shell { grid-template-columns: 1fr; }
        .tt-sidebar { position: fixed; left: -270px; width: 250px; transition: left 0.25s; height: 100svh; }
        .tt-sidebar.is-open { left: 0; }
        .tt-mobile-menu { display: block; }
        .tt-topbar { padding: 0 22px; }
        .tt-dashboard-content { padding: 12px 22px 50px; }
    }

    @media (max-width: 700px) {
        .tt-auth-panel { padding: 28px 18px; }
        .tt-auth-panel h2 { font-size: 40px; }
        .tt-field-grid { grid-template-columns: 1fr; }
        .tt-dashboard-heading h1 { font-size: 49px; }
        .tt-dashboard-hero { min-height: 400px; border-radius: 22px; }
        .tt-hero-content { padding: 30px 25px; }
        .tt-hero-content h2 { font-size: 52px; }
        .tt-stat-grid { grid-template-columns: 1fr; }
        .tt-stat-grid article { border-radius: 18px; }
        .tt-section-heading { align-items: flex-start; gap: 14px; }
        .tt-section-heading h2 { font-size: 33px; }
        .tt-empty-journey { min-height: 340px; padding: 30px 22px; }
        .tt-topbar { height: 68px; }
    }

    @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        .tt-page-loader span { animation: none; }
        .tt-primary-btn, .tt-google-btn, .tt-sidebar nav a { transition: none; }
    }
}

/* Custom scrollbar hide utility for smooth luxury carousels */
.scrollbar-none::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.scrollbar-none {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
