﻿/* StyleSheet.css — clean “Voltano-style” kit
   Fonts: load in HTML head (Google Fonts):
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@600;700&display=swap" rel="stylesheet">
*/

:root {
    --color-primary: #0C7A8A;
    --color-primary-600: #0A5E6A;
    --color-accent: #17B6C8;
    --color-charcoal: #2B2F33;
    --color-muted: #6B7780;
    --color-gray: #C8D1D6;
    --color-border: #E8ECEF;
    --color-surface: #F5F7F9;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0,0,0,.08);
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    background: var(--color-surface);
    color: var(--color-charcoal);
    font: 400 16px/1.6 Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

/* Typography */
.h1, .h2, .h3 {
    font-family: Montserrat,Inter,sans-serif;
    margin: 0 0 12px
}

.h1 {
    font-size: clamp(32px,6vw,56px);
    line-height: 1.1;
    letter-spacing: .2px
}

.h2 {
    font-size: clamp(24px,4.2vw,34px)
}

.h3 {
    font-size: 22px
}

/* Layout helpers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

.section {
    padding: 64px 0
}

.mt-1 {
    margin-top: 8px
}

.mt-2 {
    margin-top: 16px
}

.mt-3 {
    margin-top: 24px
}

.mt-4 {
    margin-top: 32px
}

.center {
    display: flex;
    align-items: center;
    justify-content: center
}

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--color-border)
}

.nav__wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 0
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: Montserrat;
    font-weight: 700;
    color: var(--color-charcoal);
    text-decoration: none
}

.brand__logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg,var(--color-primary),var(--color-accent));
    display: inline-block
}

/* Hero */
.hero {
    background: radial-gradient(1200px 400px at 20% -10%, rgba(23,182,200,.25), transparent 60%), linear-gradient(180deg,#ffffff 0%, #F7FAFB 100%);
    border-bottom: 1px solid var(--color-border);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 36px;
    align-items: center
}

.hero p {
    margin: 14px 0 24px;
    color: #4B5860
}

/* Buttons */
.btn {
    --bg: var(--color-primary);
    --bg2: var(--color-primary-600);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    background: linear-gradient(180deg,var(--bg),var(--bg2));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform .06s ease, filter .2s ease
}

    .btn:hover {
        filter: brightness(1.05)
    }

    .btn:active {
        transform: translateY(1px)
    }

.btn--ghost {
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--color-charcoal);
    box-shadow: none
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 22px
}

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow)
}

    .card .icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: linear-gradient(135deg,var(--color-primary),var(--color-accent));
        display: grid;
        place-items: center;
        color: #fff;
        font-weight: 700
    }

/* Forms */
.input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-charcoal);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .input:focus, select:focus, textarea:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(12,122,138,.15);
    }

.label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px
}

.help {
    color: var(--color-muted);
    font-size: 14px
}

/* Footer */
.footer {
    background: #0B0E10;
    color: #D1D6DB;
    padding: 32px 0;
    margin-top: 48px
}

    .footer a {
        color: #D1F1F5;
        text-decoration: none
    }

    .footer small {
        color: #9AA6AE
    }

/* Tables (handy for quick data dumps) */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px
}

    .table th {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: #6B7780;
        text-align: left;
        padding: 0 10px
    }

    .table td {
        background: #fff;
        border: 1px solid var(--color-border);
        padding: 12px 10px
    }

    .table tr td:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px
    }

    .table tr td:last-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px
    }

/* Utility badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--color-border);
    background: #fff
}

.badge--ok {
    border-color: #C7EBD8;
    background: #F0FBF5;
    color: #0F6B3E
}

.badge--warn {
    border-color: #FFE3B3;
    background: #FFF8E8;
    color: #7A4B00
}

.badge--err {
    border-color: #F7C5C5;
    background: #FFF0F0;
    color: #8F1D1D
}



.nav-user {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999
}

.chip {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0C7A8A;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px
}

.hamburger {
    width: 34px;
    height: 34px;
    border: 1px solid #C8D1D6;
    background: #fff;
    border-radius: 8px;
    cursor: pointer
}

.menu {
    position: absolute;
    top: 44px;
    right: 0;
    background: #fff;
    border: 1px solid #E8ECEF;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    min-width: 180px;
    overflow: hidden
}

    .menu a, .menu button {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        background: #fff;
        border: 0;
        cursor: pointer
    }

        .menu a:hover, .menu button:hover {
            background: #F5F7F9
        }

    .menu .sep {
        height: 1px;
        background: #E8ECEF;
        margin: 6px 0
    }


/* Scoped auth nav (no clashes) */
#authNav, .auth-nav {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .auth-nav .auth-chip {
        display: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #0C7A8A;
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        align-items: center;
        justify-content: center;
    }

    .auth-nav .auth-hamburger {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid #C8D1D6;
        background: #fff;
        color: #2B2F33;
        line-height: 0;
        font-size: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .auth-nav .auth-menu {
        position: absolute;
        top: 44px;
        right: 0;
        min-width: 180px;
        background: #fff;
        border: 1px solid #E8ECEF;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
        overflow: hidden;
    }

        .auth-nav .auth-menu button {
            display: block;
            width: 100%;
            text-align: left;
            padding: 10px 12px;
            background: #fff;
            border: 0;
            cursor: pointer;
            color: #2B2F33;
        }

            .auth-nav .auth-menu button:hover {
                background: #F5F7F9;
            }

    .auth-nav .sep {
        height: 1px;
        background: #E8ECEF;
        margin: 6px 0;
    }

/* Toasts — Voltano style */
.toast-host {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* container is click-through */
}

.toast {
    pointer-events: auto;
    min-width: 240px;
    max-width: 460px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-charcoal);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    padding: 12px 14px 12px 14px;
    display: grid;
    grid-template-columns: 6px 1fr; /* accent bar + content */
    gap: 12px;
    /* motion */
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, filter .18s ease, border-color .18s ease;
}

/* slide-in once mounted */
.toast-host .toast {
    opacity: 1;
    transform: translateY(0);
}

/* slide-out when removing */
.toast--out {
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    filter: saturate(.9) !important;
}

/* accent bar */
.toast::before {
    content: "";
    display: block;
    width: 6px;
    height: 100%;
    border-top-left-radius: calc(var(--radius) - 2px);
    border-bottom-left-radius: calc(var(--radius) - 2px);
    background: var(--toast-accent, var(--color-primary));
}

/* per-state styling (uses light tints + strong accent) */
.toast--ok {
    --toast-accent: #0F6B3E; /* from badge--ok text */
    background: #F0FBF5; /* from badge--ok bg */
    border-color: #C7EBD8; /* from badge--ok border */
    color: #0F6B3E;
}

.toast--info {
    --toast-accent: var(--color-primary);
    background: #F1FBFD; /* subtle cyan tint */
    border-color: #D3EEF3;
    color: var(--color-primary-600);
}

.toast--warn {
    --toast-accent: #7A4B00; /* from badge--warn text */
    background: #FFF8E8; /* from badge--warn bg */
    border-color: #FFE3B3; /* from badge--warn border */
    color: #7A4B00;
}

.toast--error {
    --toast-accent: #8F1D1D; /* from badge--err text */
    background: #FFF0F0; /* from badge--err bg */
    border-color: #F7C5C5; /* from badge--err border */
    color: #8F1D1D;
}

/* optional: tighter mobile spacing */
@media (max-width: 520px) {
    .toast-host {
        right: 12px;
        left: 12px;
        top: 12px;
    }

    .toast {
        max-width: none;
    }
}