:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #312e81;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-soft: #eef2ff;
    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    border-right: 1px solid var(--sidebar-border);
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #fff;
}

.brand-tagline {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.875rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.85;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    padding: 1rem 0.75rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid var(--sidebar-border);
}

.sidebar-footer-card i {
    font-size: 1.25rem;
    color: #818cf8;
}

.footer-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e2e8f0;
}

.footer-subtitle {
    font-size: 0.75rem;
    color: #64748b;
}

.main-panel {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.75rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.page-heading {
    min-width: 0;
}

.page-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.page-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.topbar-badge .bi-circle-fill {
    font-size: 0.5rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--page-bg);
}

.sidebar-toggle {
    display: none;
}

.content-area {
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
}

.content-footer {
    padding: 1rem 1.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1035;
}

/* Cards */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.app-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
}

.app-card-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-card-body {
    padding: 1.25rem;
}

.app-card-body-flush {
    padding: 0;
}

/* Page actions bar */
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Buttons — .btn.btn-primary beats Bootstrap .btn { color: #212529 } which otherwise leaves black text on Azure. */
.btn.btn-primary {
    color: #fff;
    background-color: var(--accent);
    background-image: none;
    border-color: var(--accent);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
.btn.btn-primary:disabled,
.btn.btn-primary.disabled {
    color: #fff;
    background-color: var(--accent-hover);
    background-image: none;
    border-color: var(--accent-hover);
}

.btn-outline-secondary {
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

/* Tables */
.app-table {
    margin: 0;
}

.app-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
}

.app-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.app-table tbody tr:last-child td {
    border-bottom: none;
}

.app-table tbody tr:hover {
    background: #f8fafc;
}

.app-table code {
    font-size: 0.8125rem;
    background: #f1f5f9;
    color: #4338ca;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.empty-state p {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

.status-muted,
.status-default {
    background: #f1f5f9;
    color: #475569;
}

/* Alerts */
.alert-app {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.alert-app.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-app.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* Forms */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--accent);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-control {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    padding: 0.55rem 0.875rem;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Compact form & wizard */
.form-wizard-card .form-wizard-body {
    padding: 1rem 1.25rem 1.125rem;
}

.form-wizard-header {
    padding: 0.75rem 1.25rem;
}

.form-compact .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.form-compact .form-control-sm,
.form-compact .input-group-sm .form-control,
.form-compact .input-group-sm .input-group-text {
    font-size: 0.8125rem;
    padding: 0.35rem 0.625rem;
    min-height: calc(1.5em + 0.5rem + 2px);
}

.form-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.stepper-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: #fff;
    transition: all 0.2s ease;
}

.stepper-label {
    font-size: 0.8125rem;
    font-weight: 600;
}

.stepper-line {
    width: 48px;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.stepper-item.active {
    color: var(--accent);
}

.stepper-item.active .stepper-number {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.stepper-item.completed {
    color: var(--text-secondary);
}

.stepper-item.completed .stepper-number {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.step-panel {
    display: none !important;
    min-height: 140px;
}

.step-panel.active {
    display: block !important;
}

.form-wizard-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.brand-banner {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-height: 180px;
}

.brand-banner img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.branding-upload-form {
    margin-bottom: 0.75rem;
}

.branding-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.branding-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.branding-section:first-child {
    padding-top: 0;
}

.branding-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

.branding-section-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.branding-assets-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.branding-asset-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.branding-asset-card .form-label {
    margin-bottom: 0;
    font-weight: 600;
}

.branding-theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(200px, 260px);
    gap: 1.25rem;
    align-items: start;
}

.branding-theme-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.branding-theme-field .form-label {
    margin-bottom: 0;
    font-weight: 600;
}

.branding-theme-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.branding-section-login {
    padding-bottom: 0;
    border-bottom: none;
}

.branding-login-option {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.125rem;
}

.branding-login-option .form-check {
    margin-bottom: 0.35rem;
}

.branding-login-option .form-check-label {
    font-weight: 600;
}

.branding-form-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.25rem;
}

.branding-form-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.branding-upload-grid {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
}

.branding-upload-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.branding-upload-field .form-label {
    margin-bottom: 0;
}

.branding-upload-field-banner {
    max-width: 420px;
}

.branding-upload-actions {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}

.branding-upload-actions .btn {
    white-space: nowrap;
}

.company-logo-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 0.35rem;
}

.branding-preview {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.branding-preview-logo {
    width: 120px;
    height: 120px;
}

.branding-preview-banner {
    width: 100%;
    height: 140px;
    max-width: none;
}

.branding-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.branding-preview-empty i {
    font-size: 1.25rem;
}

.branding-preview-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 0.35rem;
}

.branding-preview-banner .branding-preview-img {
    object-fit: cover;
}

.branding-preview.has-image {
    border-style: solid;
    border-color: var(--accent);
    background: #fff;
}

.theme-colors-row {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(180px, 240px);
    gap: 1rem;
    align-items: start;
}

.theme-color-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.theme-color-input input[type="color"] {
    width: 42px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: none;
}

.theme-preview-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0;
    background: #f8fafc;
    flex: 1;
    overflow: hidden;
}

.theme-preview-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.theme-preview-shell {
    display: grid;
    grid-template-columns: 88px 1fr;
    min-height: 168px;
}

.theme-preview-sidebar {
    background: linear-gradient(
        180deg,
        var(--preview-sidebar-start, #1f2937) 0%,
        var(--preview-sidebar-end, #2f2a33) 100%
    );
    color: #f8fafc;
    padding: 0.65rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.theme-preview-nav {
    font-size: 0.68rem;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    color: #cbd5e1;
}

.theme-preview-nav.is-active {
    background: var(--preview-primary-soft, rgba(75, 107, 138, 0.18));
    color: #fff;
    box-shadow: inset 2px 0 0 var(--preview-primary, #4b6b8a);
}

.theme-preview-main {
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: #f8fafc;
}

.theme-preview-tabs {
    display: flex;
    gap: 0.65rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.35rem;
    margin-bottom: 0.15rem;
    font-size: 0.7rem;
    color: #64748b;
}

.theme-preview-tabs .is-active {
    color: var(--preview-primary, #4b6b8a);
    font-weight: 650;
    border-bottom: 2px solid var(--preview-primary, #4b6b8a);
    margin-bottom: -0.4rem;
    padding-bottom: 0.35rem;
}

.theme-preview-button {
    background: var(--preview-primary, #4b6b8a);
    color: #fff;
    text-align: center;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    width: fit-content;
}

.theme-preview-list-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.72rem;
    color: #334155;
}

.theme-preview-list-item.is-selected {
    background: var(--preview-primary-soft, rgba(75, 107, 138, 0.08));
    border-color: var(--preview-primary-border, rgba(75, 107, 138, 0.35));
}

.theme-preview-chips {
    display: flex;
    gap: 0.35rem;
}

.theme-preview-chip {
    font-size: 0.65rem;
    font-weight: 650;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    border: 1px solid transparent;
}

.theme-preview-chip.is-accent {
    color: var(--preview-accent, #b24a5a);
    background: color-mix(in srgb, var(--preview-accent, #b24a5a) 12%, white);
    border-color: color-mix(in srgb, var(--preview-accent, #b24a5a) 35%, white);
}

.branding-subsection-title {
    margin: 1.25rem 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text-primary);
}

.theme-mode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.theme-mode-label {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 650;
}

.theme-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
    margin: 0.75rem 0 1rem;
}

.theme-palette-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.theme-palette-card.is-selected {
    border-color: var(--preview-primary, #44546a);
    box-shadow: 0 0 0 1px var(--preview-primary, #44546a);
}

.theme-palette-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.theme-palette-card p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.theme-palette-selected-badge {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 650;
    color: #067647;
    white-space: nowrap;
}

.theme-palette-card.is-selected .theme-palette-selected-badge {
    display: inline-flex;
}

.theme-palette-swatches {
    display: flex;
    gap: 0.35rem;
}

.theme-palette-swatches span {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.theme-palette-mini {
    display: grid;
    grid-template-columns: 28px 1fr;
    min-height: 52px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.theme-palette-mini-sidebar {
    background: #1f2937;
}

.theme-palette-mini-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem 0.45rem;
}

.theme-palette-mini-tab {
    font-size: 0.65rem;
    font-weight: 650;
    border-bottom: 2px solid transparent;
    width: fit-content;
}

.theme-palette-mini-btn {
    color: #fff;
    font-size: 0.62rem;
    font-weight: 650;
    border-radius: 5px;
    padding: 0.15rem 0.4rem;
    width: fit-content;
}

.theme-palette-mini-row {
    height: 0.55rem;
    border-radius: 4px;
}

.theme-contrast-warning {
    font-size: 0.8125rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.75rem;
}

.branding-theme-grid-custom {
    grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(220px, 1.2fr);
}

@media (max-width: 1100px) {
    .branding-theme-grid-custom {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .branding-theme-grid-custom {
        grid-template-columns: 1fr;
    }
}

.theme-preview-input {
    border: 1px solid var(--preview-primary, #4b6b8a);
    box-shadow: 0 0 0 3px var(--preview-primary-soft, rgba(75, 107, 138, 0.08));
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    background: #fff;
    color: #111827;
    width: 100%;
}

/* Detail lists */
.detail-list dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-list dd {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.detail-list dd:last-child {
    margin-bottom: 0;
}

/* Admin list items */
.admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.admin-list-item:last-child {
    border-bottom: none;
}

.admin-list-item .admin-info strong {
    display: block;
    font-weight: 600;
}

.admin-list-item .admin-info span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.admin-list-badges {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Stat cards on details */
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .main-panel {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .content-area {
        padding: 1.25rem 1rem 1.5rem;
    }

    .topbar {
        padding: 0.875rem 1rem;
    }

    .branding-upload-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .branding-assets-grid {
        grid-template-columns: 1fr;
    }

    .branding-theme-grid {
        grid-template-columns: 1fr;
    }

    .branding-upload-field-banner,
    .branding-upload-field-banner .branding-preview-banner {
        max-width: none;
    }

    .branding-upload-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.125rem;
    }

    .topbar-badge {
        display: none;
    }

    .stepper-label {
        display: none;
    }

    .stepper-line {
        width: 24px;
    }
}

.usage-stat {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-muted, #f8f9fa);
}

.usage-stat.usage-warning {
    border-color: #ffc107;
    background: #fff8e1;
}

.usage-stat.usage-danger {
    border-color: #dc3545;
    background: #fdecea;
}

.usage-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.usage-value {
    font-size: 1.25rem;
    font-weight: 600;
}
