:root {
    --ti-navy: #0f1b2d;
    --ti-navy-2: #16263d;
    --ti-accent: #f59e0b;
    --ti-accent-dark: #d97706;
    --ti-soft: #f5f7fb;
    --ti-text: #1f2937;
    --ti-muted: #6b7280;
    --ti-radius: 14px;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ti-text);
    background: #fff;
    padding-top: 72px;
}
body.page-home { padding-top: 0; }

/* ---------- Brand ---------- */
/* The company logo (from the letterhead, black) on a white tile, as in the phone app and its icon. */
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; box-shadow: inset 0 0 0 1px rgba(15, 27, 45, .12);
}
.brand-mark img { width: 84%; height: 84%; object-fit: contain; }
.brand-mark-lg { width: 56px; height: 56px; border-radius: 14px; }
.brand-text.brand-text-lg { font-size: 1.7rem; }
.brand-text { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--ti-text); }
.brand-text span { color: var(--ti-accent); }
.navbar .brand-text { color: #fff; }

.text-accent { color: var(--ti-accent) !important; }
.bg-accent { background-color: var(--ti-accent) !important; }
.btn-accent {
    background: var(--ti-accent); border-color: var(--ti-accent); color: var(--ti-navy); font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus { background: var(--ti-accent-dark); border-color: var(--ti-accent-dark); color: #fff; }
.btn-accent:disabled { background: var(--ti-accent); border-color: var(--ti-accent); color: var(--ti-navy); opacity: .75; }

/* ---------- Navbar ---------- */
.ti-navbar { background: var(--ti-navy); transition: background .25s, box-shadow .25s; padding: .9rem 0; }
.page-home .ti-navbar { background: transparent; }
.page-home .ti-navbar.scrolled, .ti-navbar.scrolled { background: var(--ti-navy); box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: .6rem 0; }
.ti-navbar .nav-link { color: rgba(255,255,255,.8); font-weight: 500; margin: 0 .4rem; }
.ti-navbar .nav-link:hover { color: var(--ti-accent); }
@media (max-width: 991.98px) {
    .page-home .ti-navbar { background: var(--ti-navy); }
    .ti-navbar .navbar-collapse { padding: 1rem 0; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(245,158,11,.18), transparent 40%),
        linear-gradient(135deg, var(--ti-navy) 0%, #1b2f4d 100%);
    color: #fff; padding: 150px 0 110px;
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 44px 44px;
}
.hero .container { z-index: 1; }
.eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ti-accent); background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
    padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.eyebrow.dark { background: rgba(245,158,11,.1); color: var(--ti-accent-dark); }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.hero-lead { font-size: 1.15rem; color: rgba(255,255,255,.75); max-width: 540px; margin-top: 1.2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9rem; color: rgba(255,255,255,.7); }
.hero-trust i { color: var(--ti-accent); margin-right: .35rem; }

.hero-card {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px; backdrop-filter: blur(8px); box-shadow: 0 30px 60px rgba(0,0,0,.35);
    animation: floaty 6s ease-in-out infinite;
}
.hero-card-head { display: flex; align-items: center; gap: .35rem; padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-card .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.progress-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: .8rem; font-size: .85rem; color: rgba(255,255,255,.8); margin-bottom: .8rem; }
.progress-row .progress { height: 8px; background: rgba(255,255,255,.1); }
.mini-stat { background: rgba(255,255,255,.06); border-radius: 10px; padding: .75rem; text-align: center; }
.mini-stat strong { display: block; font-size: 1.15rem; color: #fff; }
.mini-stat small { color: rgba(255,255,255,.6); font-size: .72rem; }
.badge-soft-success { background: rgba(34,197,94,.15); color: #4ade80; }
.badge-soft-accent { background: rgba(245,158,11,.15); color: var(--ti-accent); font-size: .85rem; padding: .5rem .9rem; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-card { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Stats ---------- */
.stats-strip { background: var(--ti-navy-2); color: #fff; padding: 2.5rem 0; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--ti-accent); }
.stat-label { color: rgba(255,255,255,.65); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.bg-soft { background: var(--ti-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head h2, .section h2 { font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--ti-muted); }

.feature-card, .step-card, .price-card, .form-card {
    background: #fff; border: 1px solid #e8ecf2; border-radius: var(--ti-radius);
    padding: 1.75rem; height: 100%; transition: transform .2s, box-shadow .2s;
}
.feature-card:hover, .step-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,27,45,.08); }
.feature-card p, .step-card p { color: var(--ti-muted); margin-bottom: 0; }
.feature-icon {
    width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: rgba(245,158,11,.12); color: var(--ti-accent-dark); font-size: 1.5rem; margin-bottom: 1rem;
}
.module-pill {
    background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 1rem 1.2rem; font-weight: 600;
    display: flex; align-items: center; gap: .8rem;
}
.module-pill i { color: var(--ti-accent-dark); font-size: 1.3rem; }
.step-no {
    width: 44px; height: 44px; border-radius: 50%; background: var(--ti-navy); color: var(--ti-accent);
    font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}

.price-card { position: relative; }
.price-card.featured { border: 2px solid var(--ti-accent); box-shadow: 0 20px 50px rgba(245,158,11,.15); }
.price-card .price { font-size: 1.8rem; font-weight: 800; margin: 1rem 0; }
.price-card .price small { font-size: .9rem; color: var(--ti-muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.price-card li { padding: .35rem 0; }
.price-card li i { color: #16a34a; margin-right: .5rem; }
.ribbon {
    position: absolute; top: -12px; right: 20px; background: var(--ti-accent); color: var(--ti-navy);
    font-size: .75rem; font-weight: 700; padding: .25rem .75rem; border-radius: 999px;
}

.cta-band { background: linear-gradient(135deg, var(--ti-navy), #1b2f4d); color: #fff; padding: 3rem 0; }
.cta-band h3 { font-weight: 800; }

/* Honeypot field of the contact form: out of sight for people, still filled in by form bots. */
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-list li { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; color: var(--ti-text); }
.contact-list i {
    width: 40px; height: 40px; border-radius: 10px; background: rgba(245,158,11,.12); color: var(--ti-accent-dark);
    display: inline-flex; align-items: center; justify-content: center;
}
.form-card { box-shadow: 0 16px 40px rgba(15,27,45,.06); }

.form-control:focus, .form-check-input:focus { border-color: var(--ti-accent); box-shadow: 0 0 0 .2rem rgba(245,158,11,.2); }
.form-check-input:checked { background-color: var(--ti-accent); border-color: var(--ti-accent); }

/* ---------- Footer ---------- */
.ti-footer { background: var(--ti-navy); color: #fff; padding: 60px 0 30px; }
.ti-footer h6 { font-weight: 700; margin-bottom: 1rem; }
.ti-footer ul li { margin-bottom: .5rem; }
.ti-footer a { color: rgba(255,255,255,.6); text-decoration: none; }
.ti-footer a:hover { color: var(--ti-accent); }

/* ---------- Auth ---------- */
.auth-body { padding-top: 0; background: var(--ti-soft); }
.auth-wrap { display: flex; min-height: 100vh; }
.auth-side {
    flex: 0 0 44%; flex-direction: column; justify-content: space-between; padding: 3rem;
    background:
        radial-gradient(circle at 20% 80%, rgba(245,158,11,.2), transparent 45%),
        linear-gradient(160deg, var(--ti-navy), #1b2f4d);
}
.auth-points li { color: rgba(255,255,255,.8); margin-bottom: 1rem; display: flex; gap: .8rem; align-items: center; }
.auth-points i { color: var(--ti-accent); font-size: 1.2rem; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
    width: 100%; max-width: 440px; background: #fff; border-radius: 18px; padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(15,27,45,.08);
}
.auth-card .input-group-text { background: #f8fafc; color: var(--ti-muted); }
@media (max-width: 575.98px) { .auth-card { padding: 1.75rem 1.25rem; } }

/* ---------- Dashboard ---------- */
.dash-head { background: linear-gradient(135deg, var(--ti-navy), #1b2f4d); padding: 2.5rem 0; }
.dash-tile {
    background: #fff; border: 1px solid #e8ecf2; border-radius: var(--ti-radius); padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
}
.dash-tile i {
    width: 48px; height: 48px; border-radius: 12px; background: rgba(245,158,11,.12); color: var(--ti-accent-dark);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.dash-tile strong { display: block; font-size: 1.5rem; }
.dash-tile span { color: var(--ti-muted); font-size: .85rem; }

/* ---------- App pages ---------- */
.page-head { background: linear-gradient(135deg, var(--ti-navy), #1b2f4d); padding: 2rem 0; }
.ti-navbar .nav-link.active { color: var(--ti-accent); }
.btn-company {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; font-weight: 500;
    max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-company:hover, .btn-company:focus, .btn-company.show { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }
.alert-stack { position: relative; z-index: 5; }

.company-picker { max-width: 520px; }
.company-option {
    width: 100%; display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem;
    background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.company-option:hover { border-color: var(--ti-accent); box-shadow: 0 6px 20px rgba(245,158,11,.12); }
.company-option.current { border-color: #16a34a; background: #f0fdf4; }
.company-avatar {
    width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: var(--ti-navy); color: var(--ti-accent);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; text-transform: uppercase;
}
.company-avatar.sm { width: 36px; height: 36px; flex-basis: 36px; font-size: .85rem; }

.ti-table thead th { background: var(--ti-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ti-muted); border-bottom: 0; padding: .9rem 1rem; }
.ti-table td { padding: .9rem 1rem; }
.badge-current { background: rgba(22,163,74,.12); color: #15803d; }
.badge-role { background: rgba(245,158,11,.14); color: var(--ti-accent-dark); font-weight: 600; }
.quick-link:hover { border-color: var(--ti-accent); }

/* ---------- Users ---------- */
.search-box { max-width: 560px; }
.user-avatar {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: rgba(245,158,11,.15);
    color: var(--ti-accent-dark); font-weight: 700; font-size: .85rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.row-muted td { opacity: .6; }
.access-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ti-muted); border-bottom-width: 1px; }
.access-row td { transition: background .15s; }
.access-row.is-selected td { background: rgba(245,158,11,.06); }
.access-row label { cursor: pointer; }

/* ---------- Change password ---------- */
.password-rules li { color: var(--ti-muted); display: flex; align-items: center; gap: .4rem; }
.password-rules li.ok { color: #15803d; }

/* An empty validation summary (no errors) renders with the alert classes; keep it hidden on every page. */
.validation-summary-valid.alert { display: none; }
