/* =========================================================
   FILE: app.css

   PURPOSE:
   Global visual system for the Vixly Control Plane.

   RESPONSIBILITIES:
   - Define framework defaults
   - Define base reset
   - Define Control Plane shell styling
   - Define sidebar, menu, topbar, public layout, and login visuals
   - Provide responsive behavior

   IMPORTANT NOTES:
   - ControlPlane intentionally differs from Operations Plane
   - Shell/layout styling is intentionally global
   - Sections are numbered for easier future reference
   - Duplicate login/public styles have been removed
   ========================================================= */

/* =========================================================
   1. FRAMEWORK DEFAULTS
   ========================================================= */

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================================
   2. BASE RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #eef3f8;
    color: #0f172a;
}

body {
    overflow-x: hidden;
}

/* =========================================================
   3. CONTROL PLANE SHELL
   ========================================================= */

.vx-platform-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28rem), linear-gradient(135deg, #eef3f8 0%, #f8fafc 48%, #eef2ff 100%);
}

/* =========================================================
   4. SIDEBAR
   ========================================================= */

.vx-platform-shell__sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(18px);
}

    .vx-platform-shell__sidebar::before {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 140px;
        content: "";
        background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 72%);
        pointer-events: none;
    }

.vx-platform-shell__sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* =========================================================
   5. BRAND
   ========================================================= */

.vx-platform-shell__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vx-platform-shell__brand-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 46%, #7c3aed 100%);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
}

.vx-platform-shell__brand-image,
.vx-public-shell__brand-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vx-platform-shell__brand-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vx-platform-shell__brand-label {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.vx-platform-shell__brand-subtitle {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   6. PLATFORM NAVIGATION
   ========================================================= */

.vx-platform-nav__inner {
    display: flex;
    flex-direction: column;
}

.vx-platform-nav__brand {
    display: none;
}

.vx-platform-nav__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .vx-platform-nav__section:not(:last-child) {
        margin-bottom: 18px;
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    }

.vx-platform-nav__section-title {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.vx-platform-nav__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vx-platform-nav__item {
    margin: 0;
    padding: 0;
}

.vx-platform-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    color: #475569 !important;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none !important;
    border-radius: 15px;
    border: 1px solid transparent;
    overflow: hidden;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

    .vx-platform-nav__link:hover {
        color: #0f172a !important;
        background: rgba(255,255,255,0.92);
        border-color: rgba(148,163,184,0.14);
        transform: translateX(2px);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    }

.vx-platform-nav__link--active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: rgba(37,99,235,0.22);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

.vx-platform-nav__link-indicator {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.vx-platform-nav__link:hover .vx-platform-nav__link-indicator {
    background: #2563eb;
    transform: scale(1.15);
}

.vx-platform-nav__link--active .vx-platform-nav__link-indicator {
    background: #ffffff;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.14);
}

.vx-platform-nav__link-text {
    min-width: 0;
    line-height: 1.1;
}

/* =========================================================
   7. SIDEBAR FOOTER / IDENTITY / LOGOUT
   ========================================================= */

.vx-platform-shell__sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.vx-platform-shell__identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vx-platform-shell__identity-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.vx-platform-shell__identity-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.vx-platform-shell__identity-name {
    color: #0f172a;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vx-platform-shell__identity-role {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.vx-logout-form {
    width: 100%;
}

.vx-button {
    border: none;
    cursor: pointer;
    font: inherit;
}

.vx-button--secondary {
    width: 100%;
    min-height: 46px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 800;
    border-radius: 15px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.16);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

    .vx-button--secondary:hover {
        background: rgba(239, 68, 68, 0.14);
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(239, 68, 68, 0.10);
    }

/* =========================================================
   8. MAIN AREA / TOPBAR / CONTENT
   ========================================================= */

.vx-platform-shell__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.vx-platform-shell__topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    min-height: 88px;
    padding: 20px 34px;
    background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.76));
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    backdrop-filter: blur(16px);
}

    .vx-platform-shell__topbar::after {
        position: absolute;
        right: 34px;
        top: 50%;
        width: 180px;
        height: 180px;
        content: "";
        border-radius: 999px;
        background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 72%);
        transform: translateY(-50%);
        pointer-events: none;
    }

.vx-platform-shell__topbar-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vx-platform-shell__topbar-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vx-platform-shell__topbar-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
}

.vx-platform-shell__content {
    padding: 30px;
    min-width: 0;
}

/* =========================================================
   9. PUBLIC LAYOUT
   ========================================================= */

.vx-public-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 42px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28rem), radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.12), transparent 24rem), linear-gradient(135deg, #eef3f8 0%, #f8fafc 48%, #eef2ff 100%);
}

.vx-public-shell__background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 20rem);
}

.vx-public-shell__main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1320px;
}

.vx-public-shell__brand {
    display: none;
}

.vx-public-shell__content {
    width: 100%;
}

/* =========================================================
   10. LOGIN PAGE
   ========================================================= */

.vx-login {
    width: 100%;
}

.vx-login__shell {
    display: grid;
    grid-template-columns: 1.1fr 480px;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 38px 90px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(18px);
}

.vx-login__showcase {
    position: relative;
    overflow: hidden;
    padding: 54px;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.26), transparent 20rem), linear-gradient(135deg, #020617 0%, #0f172a 46%, #1d4ed8 100%);
}

    .vx-login__showcase::before {
        position: absolute;
        right: -60px;
        bottom: -60px;
        width: 220px;
        height: 220px;
        content: "";
        border-radius: 999px;
        background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 72%);
    }

.vx-login__showcase-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.vx-login__showcase-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    margin-top: 42px;
}

.vx-login__showcase-logo {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin-bottom: 30px;
    border-radius: 28px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
}

.vx-login__showcase-logo-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.vx-login__showcase-title {
    margin: 0;
    max-width: 560px;
    color: #ffffff;
    font-size: clamp(2.6rem, 4vw, 4.4rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.vx-login__showcase-text {
    max-width: 540px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.9;
}

.vx-login__showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 42px;
}

.vx-login__showcase-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(10px);
}

    .vx-login__showcase-card strong {
        color: #ffffff;
        font-size: 14px;
        font-weight: 850;
    }

    .vx-login__showcase-card span {
        color: #cbd5e1;
        font-size: 12px;
        line-height: 1.6;
    }

.vx-login__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
}

.vx-login__header {
    margin-bottom: 34px;
}

.vx-login__badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.vx-login__title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.vx-login__subtitle {
    margin: 18px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.vx-login__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vx-login__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vx-login__label {
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.vx-input {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 650;
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

    .vx-input:focus {
        border-color: rgba(37, 99, 235, 0.42);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    }

    .vx-input::placeholder {
        color: #94a3b8;
    }

.vx-login__error {
    padding: 14px 16px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.14);
}

.vx-login__actions {
    padding-top: 6px;
}

.vx-button--primary {
    width: 100%;
    min-height: 58px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 24px 44px rgba(37, 99, 235, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

    .vx-button--primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 30px 52px rgba(37, 99, 235, 0.26);
    }

.vx-login__footer {
    margin-top: 26px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.vx-login__assist-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.vx-login__assist-link {
    color: #2563eb;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

    .vx-login__assist-link:hover {
        text-decoration: underline;
    }

/* =========================================================
   11. SHARED CONTROLPLANE PANEL LANGUAGE
   ========================================================= */

.vx-tenant-panel {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.07);
}

.vx-tenant-panel__header {
    margin-bottom: 22px;
}

.vx-tenant-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 12px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
}

.vx-tenant-panel__title {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.vx-tenant-panel__subtitle {
    max-width: 760px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* =========================================================
   12. BLAZOR ERROR UI
   ========================================================= */

#blazor-error-ui {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: none;
    padding: 14px 18px;
    color: #ffffff;
    border-radius: 16px;
    background: #b32121;
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

    #blazor-error-ui .reload {
        color: #ffffff;
        font-weight: 800;
    }

    #blazor-error-ui .dismiss {
        margin-left: 12px;
        cursor: pointer;
    }

/* =========================================================
   13. RESPONSIVE
   ========================================================= */

@media (max-width: 1080px) {
    .vx-platform-shell {
        grid-template-columns: 1fr;
    }

    .vx-platform-shell__sidebar {
        position: relative;
        height: auto;
    }

    .vx-login__shell {
        grid-template-columns: 1fr;
    }

    .vx-login__showcase-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .vx-platform-shell__topbar {
        padding: 18px 20px;
    }

    .vx-platform-shell__content {
        padding: 20px;
    }

    .vx-platform-shell__topbar-title {
        font-size: 2rem;
    }

    .vx-public-shell {
        padding: 16px;
    }

    .vx-login__showcase,
    .vx-login__card {
        padding: 30px;
    }

    .vx-login__showcase-title {
        font-size: 2.5rem;
    }

    .vx-login__title {
        font-size: 2rem;
    }

    .vx-tenant-panel {
        padding: 18px;
        border-radius: 22px;
    }
}
