.form-section-card { border-radius: 1rem; }
.form-required::after { content: " *"; color: #dc3545; }
.table-grid input { min-width: 140px; }
.agreement-body { max-height: 60vh; overflow: auto; }
/* One logical field row */
.builder-field-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Grid of inputs inside the row */
.builder-field-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

/* Delete button stays aligned */
.builder-delete-btn {
    flex-shrink: 0;
    height: 38px;
    margin-top: 2px;
}

/* Responsive behavior */
@media (max-width: 992px) {
    .builder-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   Light Dashboard Theme
   ========================= */

:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #e6edf6;
    --text: #1f2a44;
    --muted: #6b7a90;
    --blue-700: #0b4fbf;
    --blue-600: #0d63d6;
    --blue-500: #1e7ae6;
    --shadow-sm: 0 2px 10px rgba(16, 24, 40, .06);
    --shadow: 0 12px 35px rgba(16, 24, 40, .10);
    --radius: 12px;
}

html, body {
    height: 100%;
}

body {
    background: radial-gradient(1200px 600px at 20% 0%, rgba(13,99,214,.14), transparent 55%), radial-gradient(1200px 700px at 85% 100%, rgba(30,122,230,.10), transparent 55%), var(--bg);
    color: var(--text);
}

/* ===== Layout helpers ===== */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 1030;
    }
}

/* ===== Sidebar ===== */
.sidebar {
    background: linear-gradient(180deg, var(--blue-700), #083b8f);
    color: rgba(255,255,255,.92);
    padding: 18px 14px;
    box-shadow: var(--shadow);
}

    .sidebar .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 10px 16px;
        border-bottom: 1px solid rgba(255,255,255,.14);
        margin-bottom: 12px;
    }

        .sidebar .brand .logo {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            background: rgba(255,255,255,.18);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }

    .sidebar a {
        color: rgba(255,255,255,.86);
        text-decoration: none;
    }

        .sidebar a:hover {
            color: #fff;
        }

    .sidebar .nav-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
        margin: 4px 6px;
        opacity: .92;
    }

        .sidebar .nav-link.active,
        .sidebar .nav-link:hover {
            background: rgba(255,255,255,.14);
            opacity: 1;
        }

/* ===== Topbar ===== */
.topbar {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

    .topbar .inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
        gap: 12px;
    }

.page-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
}

/* ===== Main content ===== */
.main {
    padding: 18px;
}

.card, .panel, .form-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Headline area similar to screenshot */
.form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0;
}

.form-meta {
    color: var(--muted);
    font-size: 12px;
}

.form-name {
    font-size: 18px;
    font-weight: 800;
    margin-top: 6px;
}

/* ===== Inputs ===== */
.form-label, label {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
}

.form-control,
.form-select,
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"],
textarea, select {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: .6rem .75rem;
    color: var(--text);
}

    .form-control:focus,
    .form-select:focus,
    textarea:focus {
        border-color: rgba(13,99,214,.45) !important;
        box-shadow: 0 0 0 .25rem rgba(13,99,214,.12) !important;
        outline: none;
    }

/* ===== Buttons ===== */
.btn {
    border-radius: 10px;
    font-weight: 700;
    padding: .6rem 1rem;
}

.btn-primary {
    background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
    border: 1px solid rgba(11,79,191,.25);
    box-shadow: 0 10px 22px rgba(13,99,214,.18);
}

    .btn-primary:hover {
        filter: brightness(1.05);
    }

.btn-outline-primary {
    border-color: rgba(13,99,214,.35);
}

/* ===== Steps / left sub-nav (like “General / Comprehensive / Services…”) ===== */
.steps {
    border-right: 1px solid var(--border);
    padding: 14px 0;
}

    .steps .step {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        margin: 4px 10px;
        border-radius: 10px;
        color: var(--muted);
        cursor: pointer;
    }

    .steps .dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        border: 2px solid rgba(13,99,214,.25);
        background: #fff;
    }

    .steps .step.active {
        background: rgba(13,99,214,.08);
        color: var(--text);
    }

        .steps .step.active .dot {
            border-color: rgba(13,99,214,.55);
            background: rgba(13,99,214,.85);
        }

/* ===== DataGrid table ===== */
.table {
    color: var(--text);
}

    .table thead th {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        border-bottom: 1px solid var(--border);
    }

    .table td, .table th {
        border-color: var(--border) !important;
    }

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--surface-2);
}

/* ===== Modal ===== */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.modal-header, .modal-footer {
    border-color: var(--border);
}

/* ===== Small utility ===== */
.small-muted {
    color: var(--muted);
    font-size: 12px;
}
/* Sidebar branding: logo on top, text below */
.brand.brand-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1rem;
}

/* Fixed-height logo area so it never pushes text sideways */
.brand-logo-wrap {
    width: 100%;
    height: 64px; /* adjust to taste */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Logo scales down to fit container */
.brand-logo-img {
    max-width: 100%;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Fallback circle when no logo */
.brand-logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: #1f2a37;
    color: #fff;
}

/* Text centered, wraps nicely */
.brand-text {
    width: 100%;
    text-align: center;
}

.brand-name {
    font-weight: 800;
    line-height: 1.1;
}

.brand-sub {
    font-size: 12px;
    opacity: .8;
    line-height: 1.2;
}
