@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Manrope:wght@400;500;700&display=swap");

:root {
    --tis-navy: #0e1c53;
    --tis-mid: #1c4ea1;
    --tis-blue: #1496ff;
    --tis-aqua: #47c2ff;
    --tis-ice: #eef7ff;
    --tis-white: #ffffff;
    --tis-text: #101a3a;
    --surface-glass: rgba(255, 255, 255, 0.8);
    --stroke: #cfe3ff;
    --radius-lg: 1.2rem;
    --radius-md: 0.9rem;
}

* {
    box-sizing: border-box;
}

html {
    font-size: clamp(15px, 0.25vw + 14px, 18px);
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--tis-text);
    min-height: 100dvh;
    background:
        radial-gradient(1300px 540px at -6% -8%, rgba(65, 166, 255, 0.24), transparent 62%),
        radial-gradient(1200px 500px at 110% 110%, rgba(12, 35, 96, 0.13), transparent 58%),
        linear-gradient(150deg, #ffffff 0%, #f4faff 40%, #edf6ff 100%);
    animation: page-enter 560ms ease-out both;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, #ffffff 86%, #e7f2ff);
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(14px);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: clamp(66px, 6vw, 76px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #35528f;
    text-decoration: none;
    font-weight: 700;
    padding: 0.35rem 0.1rem;
    border-bottom: 2px solid transparent;
    transition: color 180ms ease, border-color 180ms ease;
}

.nav-links a:hover {
    color: var(--tis-navy);
    border-color: #8fc2ff;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: "Sora", "Manrope", sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--tis-navy);
    text-decoration: none;
}

.brand-logo {
    width: clamp(42px, 4vw, 50px);
    height: clamp(42px, 4vw, 50px);
    object-fit: contain;
}

.nav-action {
    text-decoration: none;
    color: var(--tis-navy);
    border: 1px solid #b9d9ff;
    background: linear-gradient(180deg, #ffffff, #f5faff);
    padding: 0.56rem 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-auth-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.nav-logout-form {
    margin: 0;
}

.nav-action-ghost {
    background: #fff;
    cursor: pointer;
}

.nav-action:hover {
    transform: translateY(-1px);
    border-color: #94c6ff;
    box-shadow: 0 10px 24px rgba(19, 72, 167, 0.14);
}

.hero {
    padding: clamp(2.2rem, 8vw, 4.2rem) 0 clamp(1.8rem, 4.5vw, 2.8rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(1rem, 2.3vw, 2rem);
    align-items: stretch;
}

.tag {
    margin: 0;
    color: var(--tis-mid);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: clamp(0.72rem, 0.35vw + 0.66rem, 0.86rem);
}

h1 {
    font-family: "Sora", sans-serif;
    margin: 0.45rem 0 0.72rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.04;
    color: var(--tis-navy);
}

.lead {
    margin: 0;
    font-size: clamp(1rem, 0.8vw + 0.9rem, 1.24rem);
    line-height: 1.72;
    max-width: 46ch;
}

.hero-actions {
    margin-top: 1.34rem;
    display: flex;
    gap: 0.72rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.74rem 1.18rem;
    border-radius: 0.82rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(95deg, #21a4ff 0%, #1c4ea1 55%, #13317c 100%);
    color: var(--tis-white);
    box-shadow: 0 12px 24px rgba(28, 78, 161, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--tis-mid);
    border: 1px solid #b6d8ff;
}

.hero-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(165deg, #10296e 2%, #0a1c55 68%);
    color: var(--tis-white);
    border-radius: var(--radius-lg);
    padding: clamp(1.1rem, 2vw, 1.6rem);
    box-shadow: 0 24px 48px rgba(12, 35, 95, 0.22);
}

.hero-card h2,
.hero-card p {
    color: #ffffff;
}

.info-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1rem;
    align-items: stretch;
}

.info-highlight {
    margin: 0;
}

.info-highlight h2 {
    color: #ffffff;
}

.content-panel {
    background: var(--surface-glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 14px 30px rgba(18, 57, 133, 0.08);
}

.page-copy {
    font-size: 1.02rem;
    line-height: 1.75;
    margin: 0 0 0.85rem;
}

.content-list {
    margin: 0.8rem 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.55rem;
}

.content-list li {
    line-height: 1.65;
}

.service-item h3 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    color: var(--tis-mid);
    font-size: 1rem;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -45% auto;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(60, 190, 255, 0.5), transparent 64%);
    z-index: -1;
}

.section {
    padding: clamp(1.5rem, 4vw, 2.4rem) 0;
}

.section h2 {
    margin-top: 0;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.25rem, 1.3vw + 1rem, 2rem);
    color: var(--tis-navy);
    margin-bottom: 1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.72rem, 1.4vw, 1rem);
}

.service-item {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #d7e9ff;
    background: var(--surface-glass);
    box-shadow: 0 8px 20px rgba(18, 57, 133, 0.08);
    backdrop-filter: blur(6px);
    transform: translateY(8px);
    opacity: 0;
    animation: card-reveal 560ms ease forwards;
}

.service-item:nth-child(2) { animation-delay: 60ms; }
.service-item:nth-child(3) { animation-delay: 120ms; }
.service-item:nth-child(4) { animation-delay: 180ms; }
.service-item:nth-child(5) { animation-delay: 240ms; }
.service-item:nth-child(6) { animation-delay: 300ms; }

.section-alt {
    background: linear-gradient(180deg, #f7fbff, #edf6ff);
    border-top: 1px solid #d8e7ff;
    border-bottom: 1px solid #d8e7ff;
}

.subtle {
    color: #365092;
}

.sla-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.sla-grid article {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #d7e9ff;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 8px 18px rgba(18, 57, 133, 0.08);
}

.sla-grid h3 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    color: var(--tis-mid);
    font-size: 1rem;
}

.sla-grid p {
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--tis-navy);
}

.site-footer {
    padding: 1.2rem 0 2rem;
    color: #2f4e94;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #2f4e94;
    text-decoration: none;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--tis-navy);
}

.auth-shell,
.dashboard-shell {
    min-height: min(70vh, 760px);
    display: grid;
    align-items: center;
}

.auth-grid {
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(560px, 100%);
    background: color-mix(in srgb, #ffffff 88%, #e9f4ff);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2.3vw, 1.8rem);
    box-shadow: 0 20px 38px rgba(15, 48, 120, 0.14);
}

.auth-card h1,
.dash-header h1 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.auth-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.auth-form label {
    display: grid;
    gap: 0.34rem;
    font-weight: 600;
    color: var(--tis-navy);
}

.auth-form input {
    width: 100%;
    border: 1px solid #bdd7fb;
    border-radius: 0.75rem;
    padding: 0.68rem 0.8rem;
    background: #fff;
    font: inherit;
}

.auth-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form-grid label:has(input[name="password1"]),
.auth-form-grid label:has(input[name="password2"]),
.auth-form-grid .btn {
    grid-column: 1 / -1;
}

.auth-help {
    margin-bottom: 0;
}

.auth-forgot {
    text-align: right;
    font-size: 0.9rem;
    margin-top: -0.3rem;
}

.auth-forgot a {
    color: var(--tis-mid);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

.auth-divider {
    border: none;
    border-top: 1px solid var(--stroke);
    margin: 1.2rem 0;
}

.auth-card-wide {
    width: min(760px, 100%);
}

.auth-list {
    display: grid;
    gap: 0.55rem;
}

.auth-list-item {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    border: 1px solid #cfe3ff;
    border-radius: 0.7rem;
    padding: 0.62rem 0.72rem;
    background: #fff;
    color: var(--tis-text);
    font-weight: 600;
}

.auth-list-item input[type="radio"] {
    margin: 0;
}

.auth-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.auth-pill-success {
    background: #e8f8ef;
    border-color: #aee9c7;
    color: #1a6b3c;
}

.auth-pill-warning {
    background: #fffbea;
    border-color: #ffe08a;
    color: #7a5c00;
}

.auth-pill-neutral {
    background: #eef4ff;
    border-color: #c9dcff;
    color: #244b8d;
}

.auth-actions-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.auth-error {
    background: #fff0f0;
    border: 1px solid #ffc0c0;
    border-radius: 0.6rem;
    padding: 0.6rem 0.8rem;
    color: #a00;
    font-size: 0.95rem;
    margin: 0;
}

.messages-bar {
    padding: 0.5rem 0;
}

.message {
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.message--success {
    background: #e8f8ef;
    border: 1px solid #aee9c7;
    color: #1a6b3c;
}

.message--warning {
    background: #fffbea;
    border: 1px solid #ffe08a;
    color: #7a5c00;
}

.message--error {
    background: #fff0f0;
    border: 1px solid #ffc0c0;
    color: #a00;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-cards {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-card {
    background: var(--surface-glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 12px 26px rgba(20, 63, 146, 0.1);
}

.dash-card h2 {
    margin-top: 0;
}

.dash-card-alert {
    background: #fffbea;
    border: 1px solid #ffe08a;
}

.dash-card-alert h2 {
    color: #7a5c00;
}

.dash-card-alert p {
    color: #5d4700;
}

.dash-form {
    margin-top: 1rem;
}

.dash-menu {
    margin-top: 1.4rem;
}

.dash-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.dash-menu-head h2 {
    margin: 0;
}

.dash-menu-head p {
    margin: 0;
    color: #35528f;
    max-width: 42ch;
}

.dash-menu-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-menu-item {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    text-decoration: none;
    background:
        radial-gradient(220px 140px at 110% -20%, rgba(71, 194, 255, 0.18), transparent 58%),
        linear-gradient(175deg, rgba(255, 255, 255, 0.98), rgba(242, 249, 255, 0.96));
    border: 1px solid #cde2ff;
    border-radius: var(--radius-md);
    padding: 1rem 1rem 0.95rem;
    min-height: 180px;
    box-shadow: 0 12px 26px rgba(20, 63, 146, 0.1);
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.dash-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.58rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(140deg, #2aa8ff, #1c4ea1);
}

.dash-menu-item h3 {
    margin: 0.2rem 0 0;
    color: var(--tis-navy);
    font-family: "Sora", sans-serif;
    font-size: 1.08rem;
}

.dash-menu-item p {
    margin: 0;
    color: #2d4a89;
    line-height: 1.5;
}

.dash-menu-cta {
    margin-top: auto;
    font-weight: 700;
    color: #1b66cf;
    font-size: 0.92rem;
}

.dash-menu-item:hover {
    transform: translateY(-2px);
    border-color: #97c6ff;
    box-shadow: 0 18px 30px rgba(20, 63, 146, 0.16);
}

.api-key-reveal {
    background: #fffbea;
    border: 1px solid #ffe08a;
    border-radius: var(--radius-md);
    padding: 1rem;
}

.api-key-reveal h2 {
    margin-top: 0;
    color: #7a5c00;
}

.api-key-value-wrap {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.api-key-value-wrap input {
    flex: 1 1 360px;
    border: 1px solid #d8d8d8;
    border-radius: 0.7rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--stroke);
    border-radius: 0.7rem;
    overflow: hidden;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid #e7f0ff;
    vertical-align: top;
    font-size: 0.94rem;
}

.data-table th {
    background: #f4f9ff;
    color: var(--tis-navy);
    font-weight: 700;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-reveal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .service-grid,
    .sla-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .hero-grid,
    .service-grid,
    .sla-grid {
        grid-template-columns: 1fr;
    }

    .nav-row {
        min-height: 64px;
    }

    .brand-link span {
        display: none;
    }

    .auth-form-grid,
    .dash-cards {
        grid-template-columns: 1fr;
    }

    .dash-menu-grid {
        grid-template-columns: 1fr;
    }

    .dash-menu-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
