/* TicLite shared styles: errors and storefront helpers.
 * Frontend uses /css/frontend/frontend.css; login uses /css/login/login.css.
 * Admin and management panels load their own CSS.
 */
:root {
    --auth-bg: #f0f0f1;
    --auth-card: #fff;
    --auth-border: #c3c4c7;
    --auth-text: #1d2327;
    --auth-muted: #646970;
    --auth-accent: #2271b1;
    --auth-accent-hover: #135e96;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 0;
    color: #1f2937;
}

.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.site-header, .administration-header { background: #111827; color: #fff; padding: 1rem 0; }
.site-header a, .administration-header { color: #fff; text-decoration: none; }
.site-header nav a { margin-left: 1rem; }
.hero { padding: 3rem 0; }

.pricing { padding: 2rem 0 3rem; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.pricing-plan {
    border: 1px solid var(--auth-border, #c3c4c7);
    padding: 1.25rem;
    background: #fff;
}
.pricing-plan.is-featured { border-color: var(--auth-accent, #004EB4); }
.pricing-plan h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.pricing-plan__price { margin: .75rem 0; font-size: 1.35rem; }
.button {
    display: inline-block;
    background: var(--auth-accent);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
}
.button:hover { background: var(--auth-accent-hover); }
.error-page { padding: 4rem 0; text-align: center; }
.error { color: #b32d2e; margin: 0 0 1rem; }

.error-layout {
    --error-blue: var(--error-brand, #0046a0);
    --error-blue-deep: var(--error-brand-deep, #003578);
    --error-orange: var(--error-accent, #ff8a00);
    --error-orange-hot: var(--error-accent-hot, #ff6900);
    --error-fog: #f4f7fb;
    --error-ink: #1f2124;
    --error-muted: #69727d;
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--error-ink);
    font-family: "Noto Sans", "Segoe UI", sans-serif;
    background: var(--error-fog);
}

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

.error-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.error-atmosphere__wash {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #eaf2fb 0%, #f4f7fb 42%, #ffffff 100%);
}

.error-atmosphere__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
}

.error-atmosphere__orb--a {
    width: min(70vw, 34rem);
    height: min(70vw, 34rem);
    top: -12rem;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 70, 160, 0.18), transparent 70%);
}

.error-atmosphere__orb--b {
    width: min(50vw, 22rem);
    height: min(50vw, 22rem);
    right: -4rem;
    bottom: 10%;
    background: radial-gradient(circle, rgba(255, 138, 0, 0.12), transparent 70%);
}

.error-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.error-panel {
    width: min(100%, 52rem);
    min-height: min(78vh, 42rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.35rem;
    background: #fff;
    border: 1px solid rgba(0, 70, 160, 0.1);
    box-shadow: 0 24px 56px rgba(24, 60, 81, 0.12);
}

.error-panel__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.15rem 1.25rem;
    background: linear-gradient(140deg, var(--error-blue) 20%, var(--error-blue-deep) 100%);
}

.error-panel__logo {
    display: block;
    width: auto;
    height: clamp(2.8rem, 7vw, 3.75rem);
    max-width: min(100%, 18rem);
    object-fit: contain;
}

.error-panel__mark {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--error-blue);
    font-size: 1.15rem;
    font-weight: 800;
}

.error-panel__name {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.error-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.15rem, 4vw, 2.5rem) clamp(1.6rem, 4vw, 2.5rem);
}

.error-panel__status {
    margin: 0;
    font-size: clamp(4.5rem, 16vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: var(--error-blue);
}

.error-panel__eyebrow {
    margin: 0.85rem 0 0;
    color: var(--error-blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.error-panel__title {
    margin: 0.5rem 0 0;
    max-width: 18ch;
    font-size: clamp(1.7rem, 4.8vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--error-ink);
}

.error-panel__message {
    margin: 0.95rem auto 0;
    max-width: 34rem;
    color: var(--error-muted);
    font-size: clamp(0.98rem, 2.3vw, 1.12rem);
    line-height: 1.65;
}

.error-panel__support {
    margin: 1rem 0 0;
    color: var(--error-ink);
    font-size: 1rem;
}

.error-panel__support a {
    color: var(--error-blue);
    font-weight: 700;
    text-decoration: none;
}

.error-panel__support a:hover,
.error-panel__support a:focus-visible {
    color: var(--error-blue-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.error-panel__details {
    width: min(100%, 40rem);
    margin-top: 1.35rem;
    border-radius: 0.9rem;
    background: #111827;
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: #fecaca;
    text-align: left;
    overflow: hidden;
}

.error-panel__details-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid rgba(248, 113, 113, 0.18);
    background: rgba(0, 0, 0, 0.28);
}

.error-panel__details-label {
    margin: 0;
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.error-panel__copy {
    appearance: none;
    border: 1px solid rgba(252, 165, 165, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #fecaca;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.error-panel__copy:hover,
.error-panel__copy:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(252, 165, 165, 0.8);
    color: #fff;
    outline: none;
}

.error-panel__copy.is-copied {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(74, 222, 128, 0.7);
    color: #bbf7d0;
}

.error-panel__details-scroll {
    padding: 1rem 1.1rem;
    overflow: auto;
    max-height: min(32vh, 16rem);
}

.error-panel__detail,
.error-panel__trace {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: 0.84rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.error-panel__trace {
    margin-top: 0.8rem;
    color: #cbd5e1;
}

.error-panel__meta {
    margin: 0.7rem 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.error-panel__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: clamp(1.4rem, 3.5vw, 2rem);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.error-panel__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.8rem 1.35rem;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: var(--error-orange);
    color: #111;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(255, 138, 0, 0.28);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.error-panel__button:hover,
.error-panel__button:focus-visible {
    background: var(--error-orange-hot);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 105, 0, 0.32);
}

.error-panel__button--ghost {
    background: transparent;
    color: var(--error-blue);
    border: 1.5px solid rgba(0, 70, 160, 0.35);
    box-shadow: none;
}

.error-panel__button--ghost:hover,
.error-panel__button--ghost:focus-visible {
    background: #eef4ff;
    color: var(--error-blue-deep);
    box-shadow: none;
}

@media (max-width: 639px) {
    .error-shell {
        padding: 1rem;
        align-items: stretch;
    }

    .error-panel {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: auto 0;
    }

    .error-panel__brand {
        padding: 1rem 1.25rem;
    }

    .error-panel__body {
        padding: 1.5rem 1.25rem 1.6rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .error-panel__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-panel__button {
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 640px) {
    .error-shell {
        padding: 2rem;
    }
}
.form-stack { max-width: 420px; }
.form-stack label { display: block; margin-bottom: .75rem; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; padding: .5rem; box-sizing: border-box; }
.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: #fff; }
.data-table th, .data-table td { border: 1px solid #e5e7eb; padding: .5rem .75rem; text-align: left; }
.pagination { margin-top: 1rem; display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }

.theme-pagination {
    margin: 1.25rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
}
.theme-pagination__meta {
    margin: 0;
    color: #6b7280;
    font-size: .92rem;
    font-weight: 600;
}
.theme-pagination__meta--solo { margin-top: 1rem; }
.theme-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}
.theme-pagination__pages a,
.theme-pagination__pages strong,
.theme-pagination__nav {
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
}
.theme-pagination__pages a:hover,
.theme-pagination__nav:hover {
    border-color: #111827;
}
.theme-pagination__pages strong {
    background: #111827;
    border-color: #111827;
    color: #fff;
}
.theme-pagination__ellipsis,
.theme-pagination__nav.is-disabled {
    border: 0;
    background: transparent;
    color: #9ca3af;
    min-width: 1.25rem;
}
.theme-pagination__nav.is-disabled { cursor: default; }
.inline-form { display: inline; }

.muted { color: var(--auth-muted); font-size: 13px; margin: 0 0 .75rem; }

.sf-legal-footer {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .45rem;
    font-size: .85rem;
}

.sf-legal-footer a {
    font-weight: 600;
    text-decoration: none;
}

.sf-legal-footer a:hover {
    text-decoration: underline;
}
