:root {
    --conaix-primary: #6947c4;
    --conaix-secondary: #3468d4;
    --conaix-tertiary: #00b4f8;
    --conaix-ink: #031d39;
    --conaix-surface: #f9f9ff;
    --conaix-surface-soft: #eff3ff;
    --conaix-panel: #ffffff;
    --conaix-outline: rgba(3, 29, 57, 0.12);
    --conaix-shadow: 0 20px 40px rgba(2, 28, 56, 0.06);
    --conaix-radius: 1.1rem;
    --conaix-radius-sm: 0.8rem;
    --conaix-gradient: linear-gradient(135deg, #6947c4 0%, #3468d4 55%, #00b4f8 100%);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--conaix-surface);
    color: var(--conaix-ink);
    font-family: "Inter", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.aurora {
    position: fixed;
    border-radius: 999px;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.aurora-top {
    inset: -8rem auto auto 68%;
    width: 24rem;
    height: 24rem;
    background: #83cfff;
}

.aurora-bottom {
    inset: auto auto -8rem -4rem;
    width: 22rem;
    height: 22rem;
    background: #cebdff;
}

.public-body,
.auth-body,
.app-body {
    position: relative;
}

.public-header,
.hero-shell,
.auth-shell,
.app-shell {
    position: relative;
    z-index: 1;
}

.public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 0;
}

.brand-logo-full {
    width: min(14rem, 46vw);
}

.public-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-weight: 600;
}

.ghost-link,
.text-link {
    color: var(--conaix-secondary);
}

.hero-shell {
    min-height: calc(100vh - 4.5rem);
    display: grid;
    place-items: center;
    padding: 2rem;
}

.hero-card,
.auth-card,
.panel-card,
.stat-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: var(--conaix-shadow);
}

.hero-card {
    width: min(72rem, 100%);
    border-radius: 1.6rem;
    padding: clamp(2rem, 4vw, 4rem);
    display: grid;
    gap: 1.5rem;
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(3, 29, 57, 0.62);
}

.hero-logo {
    width: min(18rem, 60vw);
}

.hero-card h1,
.page-header h1,
.auth-header h2 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-card h1 {
    font-size: clamp(2.3rem, 5vw, 4rem);
    max-width: 16ch;
}

.hero-card p,
.section-copy,
.auth-header p,
.auth-hero-copy p {
    max-width: 44rem;
    line-height: 1.7;
    color: rgba(3, 29, 57, 0.72);
}

.hero-actions,
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.provider-button,
.icon-button {
    border: 0;
    border-radius: 0.95rem;
    cursor: pointer;
}

.primary-button {
    background: var(--conaix-gradient);
    color: #fff;
    padding: 0.95rem 1.35rem;
    font-weight: 700;
    box-shadow: 0 18px 28px rgba(52, 104, 212, 0.24);
}

.secondary-button,
.provider-button {
    background: var(--conaix-surface-soft);
    color: var(--conaix-ink);
    padding: 0.95rem 1.35rem;
    font-weight: 600;
}

.wide {
    width: 100%;
}

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

.hero-metrics article,
.stat-card,
.panel-card {
    border-radius: var(--conaix-radius);
    padding: 1.35rem;
}

.hero-metrics strong,
.stat-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-family: "Manrope", sans-serif;
    font-size: 1.05rem;
}

.hero-metrics span,
.stat-card small {
    color: rgba(3, 29, 57, 0.66);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 34rem);
}

.auth-hero {
    background:
        radial-gradient(circle at 18% 18%, rgba(105, 71, 196, 0.72), transparent 32%),
        radial-gradient(circle at 82% 20%, rgba(0, 180, 248, 0.42), transparent 28%),
        linear-gradient(145deg, #07142c 0%, #13264a 50%, #1a3562 100%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.auth-logo {
    width: min(16rem, 58vw);
    filter: brightness(0) invert(1);
}

.auth-hero-copy h1 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    margin: 0.75rem 0 1rem;
    letter-spacing: -0.04em;
}

.auth-hero-copy p,
.auth-version {
    color: rgba(255, 255, 255, 0.72);
}

.auth-version {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.divider {
    width: 3rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.34);
}

.auth-panel {
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-card {
    width: min(30rem, 100%);
    border-radius: 1.4rem;
    padding: 2rem;
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-form,
.grid-form {
    display: grid;
    gap: 1rem;
}

.field-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(3, 29, 57, 0.62);
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.field-link {
    font-size: 0.82rem;
    color: var(--conaix-secondary);
}

.field-input {
    width: 100%;
    border: 0;
    border-bottom: 2px solid rgba(3, 29, 57, 0.14);
    border-radius: 0.6rem 0.6rem 0 0;
    background: #fff;
    padding: 0.95rem 1rem;
    color: var(--conaix-ink);
    outline: none;
}

.field-input:focus {
    border-bottom-color: var(--conaix-primary);
}

.checkbox-line {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: rgba(3, 29, 57, 0.75);
}

.checkbox-line input {
    margin-top: 0.18rem;
}

.field-error,
.validation-summary {
    color: #b3261e;
    font-size: 0.82rem;
}

.auth-separator {
    margin: 1.6rem 0 1rem;
    text-align: center;
    color: rgba(3, 29, 57, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
}

.provider-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.provider-button {
    width: 100%;
}

.auth-footnote {
    margin-top: 1.3rem;
    text-align: center;
    color: rgba(3, 29, 57, 0.65);
}

.toast-message {
    margin: 1rem auto 0;
    width: min(52rem, calc(100% - 2rem));
    background: rgba(255, 255, 255, 0.94);
    border-radius: 1rem;
    box-shadow: var(--conaix-shadow);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    background: linear-gradient(180deg, #f8f8ff 0%, #eff3ff 100%);
}

.sidebar {
    background: rgba(215, 228, 255, 0.88);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-logo {
    width: 12rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.45rem;
}

.sidebar-nav a,
.sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    color: rgba(3, 29, 57, 0.76);
    font-weight: 600;
}

.sidebar-nav .is-active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--conaix-primary);
}

.is-disabled {
    opacity: 0.62;
}

.app-main {
    display: grid;
    grid-template-rows: auto 1fr;
}

.topbar {
    margin: 1.2rem;
    border-radius: 1.2rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(34rem, 100%);
    background: rgba(239, 243, 255, 0.95);
    border-radius: 0.95rem;
    padding: 0.85rem 1rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-chip {
    padding: 0.55rem 0.8rem;
    border-radius: 0.95rem;
    background: rgba(239, 243, 255, 0.95);
}

.user-chip strong,
.user-chip span {
    display: block;
}

.user-chip span {
    font-size: 0.8rem;
    color: rgba(3, 29, 57, 0.58);
}

.icon-button {
    width: 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    background: rgba(239, 243, 255, 0.95);
    color: var(--conaix-ink);
}

.app-content {
    padding: 0 1.2rem 1.2rem;
    display: grid;
    gap: 1.25rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.stats-grid,
.content-grid {
    display: grid;
    gap: 1.25rem;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    display: grid;
    gap: 0.5rem;
}

.stat-card span.material-symbols-outlined {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 0.9rem;
    background: rgba(105, 71, 196, 0.1);
    color: var(--conaix-primary);
}

.content-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 1fr);
}

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

.panel-card {
    display: grid;
    gap: 1rem;
}

.panel-header,
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.panel-header h2,
.table-header h2 {
    margin: 0;
    font-family: "Manrope", sans-serif;
}

.bar-chart {
    min-height: 18rem;
    display: grid;
    align-items: end;
    gap: 0.8rem;
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.bar-chart span {
    border-radius: 1rem 1rem 0.4rem 0.4rem;
    background: var(--conaix-gradient);
    min-height: 4rem;
}

.bar-chart span:nth-child(odd) {
    background: rgba(52, 104, 212, 0.18);
}

.activity-list {
    display: grid;
    gap: 1rem;
}

.stack-list {
    display: grid;
    gap: 0.85rem;
}

.stack-item {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(239, 243, 255, 0.65);
}

.stack-item p,
.stack-item small {
    margin: 0.2rem 0 0;
    color: rgba(3, 29, 57, 0.62);
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
}

.activity-item p,
.activity-item small {
    margin: 0.2rem 0 0;
    color: rgba(3, 29, 57, 0.62);
}

.activity-icon {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.9rem;
    display: grid;
    place-items: center;
}

.accent-blue { background: rgba(52, 104, 212, 0.12); color: #3468d4; }
.accent-green { background: rgba(0, 153, 102, 0.12); color: #13805f; }
.accent-purple { background: rgba(105, 71, 196, 0.12); color: #6947c4; }
.accent-amber { background: rgba(255, 168, 0, 0.12); color: #bb7e00; }

.table-wrapper {
    overflow-x: auto;
}

.conaix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.8rem;
}

.conaix-table th {
    text-align: left;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(3, 29, 57, 0.54);
    padding: 0 0.8rem;
}

.conaix-table td {
    padding: 1rem 0.8rem;
    background: rgba(239, 243, 255, 0.58);
}

.conaix-table td:first-child {
    border-radius: 1rem 0 0 1rem;
}

.conaix-table td:last-child {
    border-radius: 0 1rem 1rem 0;
}

.conaix-table td strong,
.conaix-table td small {
    display: block;
}

.empty-state {
    text-align: center;
    color: rgba(3, 29, 57, 0.6);
}

.status-pill {
    display: inline-flex;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 153, 102, 0.12);
    color: #13805f;
    font-weight: 700;
    font-size: 0.82rem;
}

.form-panel {
    max-width: 64rem;
}

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

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

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.inline-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.compact-input {
    min-width: 16rem;
    width: min(22rem, 100%);
}

@media (max-width: 1080px) {
    .auth-shell,
    .app-shell,
    .content-grid,
    .panel-grid,
    .stats-grid,
    .hero-metrics,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 22rem;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 720px) {
    .public-header,
    .topbar,
    .app-content,
    .hero-shell,
    .auth-panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .public-header,
    .page-header,
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-meta {
        justify-content: space-between;
    }

    .hero-actions,
    .form-actions {
        flex-direction: column;
    }
}
