﻿:root {
    --bg: #020617;
    --bg-alt: #0b1120;
    --card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
}
:root {
    --font-brand: "Poppins", sans-serif;
    --font-base: "Inter", sans-serif;
}

body {
    font-family: var(--font-base);
}
.brand-mark {
    font-family: var(--font-brand);
    font-weight: 600;
}
html {
    font-size: 16px;
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    color: var(--text);
}

a {
    color: inherit;
}

.text-muted {
    color: var(--muted) !important;
}

.link-muted {
    color: var(--muted);
    text-decoration: none;
}

    .link-muted:hover {
        color: var(--text);
    }

/* =========================
   APP SHELL (main layout)
   ========================= */

body.app-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, var(--bg-alt), var(--bg) 55%);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(2,6,23,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: var(--shadow);
    font-weight: 800;
    color: #fff;
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-sub {
    color: var(--muted);
    font-size: 0.9rem;
}

.topbar-auth {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

/* Wrapper onder topbar */
.app-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

/* Sidebar + content */
.app-row {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    min-width: 0;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid var(--border);
}

.sidebar-section {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.25rem 0 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
}

    .sidebar-link:hover {
        background: rgba(255,255,255,0.06);
    }

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

/* Content */
main.content {
    flex: 1 1 auto;
    min-height: calc(100vh - 125px);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    main.content > .container-fluid {
        flex: 1 1 auto;
        min-width: 0;
    }

/* Footer */
footer.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.05);
}

/* =========================
   COMPONENTS (cards/tables)
   ========================= */

.page-title {
    font-size: 1.6rem;
    margin: 0;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.card-soft {
    background: rgba(255,255,255,0.03);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-hover-bg: rgba(255,255,255,0.06);
    --bs-table-color: var(--text);
    border-color: var(--border);
}

.stat {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-sm {
    font-size: 1rem;
    font-weight: 700;
    word-break: break-all;
}

.icon-badge {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(37,99,235,0.15);
    border: 1px solid rgba(37,99,235,0.35);
    color: #93c5fd;
}

.code-block {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
    color: var(--text);
    overflow-x: auto;
}

/* Forms (global) */
.form-control, .form-select {
    background: rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    color: var(--text);
}

    .form-control:focus, .form-select:focus {
        border-color: rgba(37,99,235,0.7);
        box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.15);
        background: rgba(0,0,0,0.18);
        color: var(--text);
    }

.form-text {
    color: var(--muted);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    border-color: rgba(37,99,235,0.75);
}

    .btn-primary:hover {
        background: var(--accent-strong);
        border-color: var(--accent-strong);
    }

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text);
}

    .btn-outline-secondary:hover {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.18);
        color: var(--text);
    }

/* Alerts */
.alert {
    border-radius: 16px;
    border: 1px solid var(--border);
}

/* Dropdowns */
.dropdown-menu {
    background: rgba(2,6,23,0.98);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--text);
}

    .dropdown-item:hover {
        background: rgba(255,255,255,0.06);
    }

    .dropdown-item.active {
        background: rgba(37,99,235,0.15);
    }

/* Docs/privacy */
.doc-page, .privacy-page {
    max-width: 920px;
    margin: 0 auto;
}

    .privacy-page h1, .privacy-page h2, .privacy-page h3 {
        margin-top: 2rem;
    }

    .privacy-page p, .privacy-page li {
        line-height: 1.6;
        color: var(--text);
    }

    .privacy-page ul {
        padding-left: 1.25rem;
    }

/* =========================
   TENANT UI + BADGES
   ========================= */

.tenant-btn .tenant-name {
    max-width: 180px;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-btn .tenant-role {
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

    .badge-role i {
        font-size: 0.85rem;
        opacity: 0.95;
    }

    .badge-role.owner {
        background: rgba(37,99,235,0.16);
        border-color: rgba(37,99,235,0.35);
        color: #bfdbfe;
    }

    .badge-role.admin {
        background: rgba(168,85,247,0.16);
        border-color: rgba(168,85,247,0.35);
        color: #e9d5ff;
    }

    .badge-role.member {
        background: rgba(16,185,129,0.14);
        border-color: rgba(16,185,129,0.30);
        color: #bbf7d0;
    }

    .badge-role.readonly {
        background: rgba(148,163,184,0.12);
        border-color: rgba(148,163,184,0.25);
        color: #e5e7eb;
    }

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

    .badge-status.is-success {
        background: #0f2a1a;
        color: #7ee2a8;
        border-color: #1f6b3a;
    }

    .badge-status.is-muted {
        background: #111827;
        color: #9ca3af;
        border-color: #1f2937;
    }

    .badge-status.is-danger {
        background: #2a1212;
        color: #fca5a5;
        border-color: #7f1d1d;
    }

    .badge-status.is-draft {
        background: #1e1b4b;
        color: #c7d2fe;
        border-color: #4338ca;
    }

.callout {
    border: 1px solid rgba(148,163,184,.25);
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.callout-warning {
    background: rgba(234,179,8,.10);
    border-color: rgba(234,179,8,.30);
}

.callout-title {
    font-weight: 650;
    margin-bottom: 4px;
}

/* =========================
   AUTH (Index/Login/Register)
   ========================= */

/* Body class is already auth-shell in your AuthLayout */
body.auth-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, var(--bg-alt), var(--bg) 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Container inside auth layout */
.auth-wrap {
    width: 100%;
    max-width: 520px;
}

/* Use Bootstrap card but make it look SaaS */
.auth-card.card {
    border-radius: 22px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}

/* Brand in auth header */
.auth-card .brand {
    gap: 12px;
}

.auth-card .brand-name {
    font-size: 1rem;
}

/* Fix empty validation summary "pink bar" */
.validation-summary-valid {
    display: none;
}

.auth-card .validation-summary-errors {
    border-radius: 14px;
    border: 1px solid rgba(248,113,113,0.25);
    background: rgba(248,113,113,0.10);
    color: rgba(255,255,255,0.92);
    padding: 10px 12px;
    margin: 0;
}

    .auth-card .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

/* Input-group sizing on auth pages */
.auth-card .input-group-text,
.auth-card .form-control {
    border-color: rgba(255,255,255,0.12) !important;
}

.auth-card .input-group-text {
    width: 46px;
    justify-content: center;
    background: rgba(255,255,255,0.02) !important;
    color: rgba(229,231,235,0.75) !important;
}

.auth-card .form-control {
    background: rgba(0,0,0,0.18) !important;
    color: var(--text) !important;
    font-size: 0.95rem;
    line-height: 1.25;
}

/* Input-group-lg padding tweak (prevents “giant email”) */
.auth-card .input-group-lg > .form-control,
.auth-card .input-group-lg > .input-group-text {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.95rem;
}

/* Checkbox: visible + clickable */
.auth-card .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.auth-card .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    accent-color: var(--accent);
    background-color: transparent;
    border-color: rgba(255,255,255,0.25);
    cursor: pointer;
}

.auth-card .form-check-label {
    margin: 0;
    cursor: pointer;
    color: rgba(229,231,235,0.75);
    font-size: 0.85rem;
}

/* Auth footer links */
.auth-footer a {
    opacity: 0.85;
}

    .auth-footer a:hover {
        opacity: 1;
        text-decoration: underline !important;
    }
/* =========================
   ACCOUNT / MANAGE UI
   ========================= */

.manage-shell {
    max-width: 980px; /* ← dit is de game changer */
    width: 100%;
    margin: 0 auto;
}

.manage-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text);
}

.manage-sub {
    font-size: 0.95rem;
}

.manage-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.manage-nav {
    position: sticky;
    top: 18px;
}

.manage-nav-inner {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.manage-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(229,231,235,0.82);
    font-weight: 600;
    font-size: 0.9rem;
}

    .manage-link i {
        opacity: 0.9;
    }

    .manage-link:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }

    .manage-link.active {
        background: rgba(37,99,235,0.16);
        border: 1px solid rgba(37,99,235,0.35);
        color: #bfdbfe;
    }

.manage-card {
    border-radius: 22px;
}

/* Make default Identity headings less shouty */
.manage-content h3,
.manage-content h4 {
    margin-top: 0;
    font-weight: 750;
}

/* Responsive */
@media (max-width: 768px) {
    .manage-grid {
        grid-template-columns: 1fr;
    }

    .manage-nav {
        position: static;
    }
}
/* ---- Manage content should be full width ---- */
.manage-content .card-body {
    width: 100%;
}

.manage-content form {
    width: 100%;
}

.manage-content .form-control,
.manage-content .form-select {
    width: 100%;
    max-width: 100%;
}

/* Buttons: default = auto, alleen full-width als je het vraagt */
.manage-content .btn {
    width: auto;
    max-width: 100%;
}

/* Fix: buttons should not become super narrow */
.manage-content .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

/* Make the default scaffolded headings nicer */
.manage-content h3 {
    font-size: 1.25rem;
    font-weight: 750;
    margin: 0 0 14px;
}

/* Links in scaffold pages (e.g. "Send verification email") */
.manage-content a {
    color: #bfdbfe;
}

    .manage-content a:hover {
        color: #ffffff;
    }

/* If scaffold uses bootstrap grid columns, neutralize awkward max widths */
.manage-content .col-md-6,
.manage-content .col-md-8,
.manage-content .col-md-4 {
    flex: 1 1 auto;
    max-width: 100%;
}

.manage-content .row {
    --bs-gutter-x: 1rem;
}
.manage-card .card-body {
    padding: 24px !important; /* ipv p-4/p-lg-5 conflicts, dit maakt het consistent */
}
.manage-content {
    min-width: 0; /* voorkomt overflow/afsnijden */
}
    .manage-content .form-control,
    .manage-content .form-select {
        width: 100%;
        max-width: 100%;
    }

    /* Buttons: default = auto, alleen full-width als je het vraagt */
    .manage-content .btn {
        width: auto;
        max-width: 100%;
    }

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}

.brand-icon {
    display: block;
    height: 32px;
    width: 32px;
}

.brand-wordmark {
    display: block;
    height: 18px;
    width: auto;
}

.brand-sub {
    margin-left: .25rem;
    padding: .15rem .45rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    font-size: .75rem;
    line-height: 1;
    color: rgba(255,255,255,.75);
}
.brand-logo {
    height: auto; /* pas aan indien nodig */
    width: 50%;
    display: block;
}

.brand {
    font-family: 'Poppins', sans-serif;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #22d3ee);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}
