/*
 * Shared styles for the client landing pages.
 * Each client folder overrides the variables below in its own customer.css.
 */

:root {
    --accent: #c8202b;                          /* buttons, focus, top border of the main card */
    --accent-dark: #a11720;                     /* button hover */
    --accent-soft: #fdf3f3;                     /* outline button hover background */
    --accent-ring: rgba(200, 32, 43, 0.2);      /* focus ring */
    --ink: #1b1e23;
    --muted: #636b76;
    --line: #dfe2e6;
    --page: #f4f5f7;
    --card: #ffffff;
    --radius: 12px;
    --logo-width: 170px;
    --side-bg: linear-gradient(160deg, #2b3038, #15171b);
    --second-hand: #ff6b74;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
}

h1, h2, p { margin: 0; }

a { color: var(--accent); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Layout ---------- */
.page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 40%);
    min-height: 100vh;
}

.main {
    padding: 40px clamp(20px, 5vw, 64px) 24px;
    display: flex;
    flex-direction: column;
}

.main-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    flex: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.brand img { width: var(--logo-width); max-width: 100%; height: auto; display: block; }

.brand-text {
    border-left: 1px solid var(--line);
    padding-left: 20px;
}

.brand-text h1 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-text p { color: var(--muted); font-size: 0.9rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.span-2 { grid-column: 1 / -1; }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.card h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.card-primary {
    border-top: 4px solid var(--accent);
    box-shadow: 0 8px 24px rgba(27, 30, 35, 0.07);
}

.card-primary h2 { font-size: 1.3rem; }

.hint {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 16px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #c5cad1;
    border-radius: 8px;
}

.input::placeholder { color: #8b929c; }

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.login-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 18px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn:focus-visible,
.engines label:focus-within {
    outline: 3px solid var(--accent-ring);
    outline-offset: 2px;
}

.btn-outline {
    color: var(--ink);
    background: #fff;
    border-color: #c5cad1;
}

.btn-outline:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.btn-stack { display: grid; gap: 10px; }

#msg.alert {
    display: block;
    color: #9b1c1c;
    font-size: 0.9rem;
    font-weight: 600;
}

#msg.alert:not(:empty) { margin-bottom: 12px; }

/* ---------- Search ---------- */
.engines {
    display: inline-flex;
    padding: 3px;
    margin-bottom: 12px;
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.engines input { position: absolute; opacity: 0; pointer-events: none; }

.engines span {
    display: block;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    border-radius: 7px;
    cursor: pointer;
}

.engines input:checked + span {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 3px rgba(27, 30, 35, 0.18);
}

.search-row { display: flex; gap: 10px; }

.search-row .btn { width: auto; flex: none; }

/* ---------- Side panel ---------- */
.side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px, 4vw, 48px);
    color: #fff;
    background: var(--side-bg);
}

.now {
    margin: auto 0;
    text-align: center;
}

#clockContainer {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 24px;
    background: url("/assets/images/background/clock-bg-dark.svg") center / 100% no-repeat;
}

#hour, #minute, #second {
    position: absolute;
    background: #fff;
    border-radius: 10px;
    transform-origin: bottom;
    opacity: 0.9;
}

#hour   { width: 1.8%; height: 25%; top: 25%; left: 48.85%; }
#minute { width: 1.6%; height: 30%; top: 19%; left: 48.9%; }
#second { width: 1%;   height: 40%; top: 9%;  left: 49.25%; background: var(--second-hand); }

.time {
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    font-weight: 300;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.date { color: rgba(255, 255, 255, 0.78); margin-top: 6px; }

.session {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
}

.session h2 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

/* ---------- Footer ---------- */
footer {
    max-width: 720px;
    width: 100%;
    margin: 32px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .page { grid-template-columns: minmax(0, 1fr); }

    .side {
        position: static;
        height: auto;
        order: -1;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        padding: 20px;
    }

    .now {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }

    #clockContainer { width: 72px; height: 72px; margin: 0; flex: none; }

    .time { font-size: 1.6rem; }
    .date { font-size: 0.85rem; margin-top: 0; }
    .session { padding: 10px 14px; font-size: 0.9rem; }
}

@media (max-width: 620px) {
    .main { padding-top: 28px; }
    .grid, .login-fields { grid-template-columns: minmax(0, 1fr); }
    .side { flex-direction: column; align-items: stretch; }
    .search-row { flex-direction: column; }
    .search-row .btn { width: 100%; }
    .brand-text { border-left: 0; padding-left: 0; }
}
