:root {
    color-scheme: light;
    --color-background: #f5f7fb;
    --color-surface: rgba(255, 255, 255, 0.84);
    --color-surface-solid: #ffffff;
    --color-text: #10253f;
    --color-muted: #5d6b7a;
    --color-border: rgba(16, 37, 63, 0.12);
    --color-danger: #b42318;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-family, 'Aptos', sans-serif);
    background: var(--color-background);
    color: var(--color-text);
}

a:not(.btn) {
    color: inherit;
}

code {
    padding: 0.15rem 0.35rem;
    border-radius: 0.35rem;
    background: rgba(16, 37, 63, 0.06);
    color: #c02d76;
}

#app {
    min-height: 100vh;
}

.app-shell {
    --composer-page-bg: linear-gradient(180deg, #fbfcfe 0%, var(--color-background) 100%);
    --composer-section-bg: rgba(255, 255, 255, 0.92);
    --composer-muted-section-bg: rgba(245, 247, 251, 0.9);
    --composer-hero-bg: linear-gradient(135deg, rgba(15, 76, 129, 0.14), rgba(255, 255, 255, 0.92));
    --composer-hero-panel-bg: rgba(255, 255, 255, 0.72);
    --composer-cta-bg: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    --composer-cta-foreground: #ffffff;
    --composer-cta-muted: rgba(255, 255, 255, 0.78);
    --composer-card-bg: #ffffff;
    --composer-border: var(--color-border);
    --composer-shadow: 0 1rem 2.5rem rgba(16, 37, 63, 0.08);
    --composer-section-radius: var(--radius);
    --bs-primary: var(--color-primary);
    --bs-primary-rgb: 15, 76, 129;
    min-height: 100vh;
    background: var(--composer-page-bg);
    color: var(--color-text);
}

.app-shell.theme-professional {
    --color-background: #f3f6fa;
    --color-surface-solid: #ffffff;
    --color-text: #152334;
    --color-muted: #657181;
    --color-border: rgba(21, 35, 52, 0.16);
    --composer-page-bg: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
    --composer-section-bg: #ffffff;
    --composer-muted-section-bg: #f3f6fa;
    --composer-hero-bg: linear-gradient(135deg, #eaf2fb 0%, #ffffff 70%);
    --composer-hero-panel-bg: rgba(255, 255, 255, 0.84);
    --composer-cta-bg: linear-gradient(135deg, #10253f, #1f5f99);
    --composer-cta-foreground: #ffffff;
    --composer-cta-muted: rgba(255, 255, 255, 0.78);
    --composer-card-bg: #ffffff;
    --composer-border: rgba(21, 35, 52, 0.16);
    --composer-section-radius: 0.75rem;
    --bs-primary: #1f5f99;
    --bs-primary-rgb: 31, 95, 153;
}

.app-shell.theme-warm {
    --color-background: #f7efe4;
    --color-surface-solid: #fffaf2;
    --color-text: #2c1b12;
    --color-muted: #765f4b;
    --color-border: rgba(103, 68, 42, 0.2);
    --composer-page-bg: linear-gradient(180deg, #fffaf2 0%, #f2e4d0 100%);
    --composer-section-bg: rgba(255, 250, 242, 0.96);
    --composer-muted-section-bg: #f7ead8;
    --composer-hero-bg: linear-gradient(135deg, #f8e4c2 0%, #fffaf2 74%);
    --composer-hero-panel-bg: rgba(255, 250, 242, 0.84);
    --composer-cta-bg: linear-gradient(135deg, #4b2b18, #9a5b2a);
    --composer-cta-foreground: #ffffff;
    --composer-cta-muted: rgba(255, 255, 255, 0.78);
    --composer-card-bg: #fffaf2;
    --composer-border: rgba(103, 68, 42, 0.18);
    --composer-shadow: 0 1rem 2.5rem rgba(75, 43, 24, 0.12);
    --composer-section-radius: 1.5rem;
    --bs-primary: #8a4f24;
    --bs-primary-rgb: 138, 79, 36;
}

.app-shell.theme-modern {
    color-scheme: dark;
    --color-background: #080b12;
    --color-surface-solid: #111827;
    --color-text: #f8fafc;
    --color-muted: #b8c2d6;
    --color-border: rgba(255, 255, 255, 0.14);
    --composer-page-bg: radial-gradient(circle at 14% 10%, rgba(78, 127, 255, 0.28), transparent 28%),
        linear-gradient(180deg, #070a12 0%, #101827 100%);
    --composer-section-bg: rgba(17, 24, 39, 0.78);
    --composer-muted-section-bg: rgba(7, 10, 18, 0.78);
    --composer-hero-bg: linear-gradient(135deg, rgba(22, 31, 49, 0.96), rgba(55, 74, 126, 0.76));
    --composer-hero-panel-bg: rgba(8, 11, 18, 0.44);
    --composer-cta-bg: linear-gradient(135deg, #e8eefc, #8fb3ff);
    --composer-cta-foreground: #101827;
    --composer-cta-muted: rgba(16, 24, 39, 0.72);
    --composer-card-bg: #111827;
    --composer-border: rgba(255, 255, 255, 0.14);
    --composer-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.38);
    --composer-section-radius: 1.25rem;
    --bs-primary: #8fb3ff;
    --bs-primary-rgb: 143, 179, 255;
}

.app-shell .btn {
    text-decoration: none;
    font-weight: 700;
}

.app-shell .btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--color-secondary);
    --bs-btn-hover-border-color: var(--color-secondary);
}

.app-shell .btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
}

.app-shell .card {
    background: var(--composer-card-bg);
    border-color: var(--composer-border);
    color: var(--color-text);
}

.app-shell .text-muted {
    color: var(--color-muted) !important;
}

.has-section-appearance {
    background: var(--composer-section-bg);
    color: var(--color-text);
}

.section-tone-default {
    background: var(--composer-section-bg);
}

.section-tone-muted {
    background: var(--composer-muted-section-bg);
}

.section-tone-accent,
.section-tone-inverse {
    --color-text: #ffffff;
    --color-muted: rgba(255, 255, 255, 0.76);
    --composer-card-bg: rgba(255, 255, 255, 0.1);
    --composer-border: rgba(255, 255, 255, 0.2);
    --composer-section-eyebrow: rgba(255, 255, 255, 0.82);
    --composer-cta-foreground: #ffffff;
    --composer-cta-muted: rgba(255, 255, 255, 0.78);
    color: #ffffff;
}

.section-tone-accent {
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 72%, var(--color-secondary)));
}

.section-tone-inverse {
    background: linear-gradient(135deg, var(--color-secondary), #0b1220);
}

.section-tone-accent .card,
.section-tone-inverse .card {
    color: #ffffff;
}

.section-tone-accent .btn-outline-primary,
.section-tone-inverse .btn-outline-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.72);
    --bs-btn-hover-bg: #ffffff;
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-hover-color: var(--color-secondary);
}

.section-density-compact {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

.section-density-comfortable {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.section-density-spacious {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.section-layout-list .stat-card {
    align-items: center;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 0.35rem;
}

.section-eyebrow {
    margin: 0;
    color: var(--composer-section-eyebrow, var(--color-primary));
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-header {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.section-header p {
    max-width: 48rem;
    margin: 0;
}

.theme-modern .btn-light {
    --bs-btn-color: #101827;
    --bs-btn-bg: #f8fafc;
    --bs-btn-border-color: #f8fafc;
}

.theme-modern .cta-content {
    color: var(--composer-cta-foreground);
}

.theme-modern .cta-content p {
    color: var(--composer-cta-muted);
}

h1:focus {
    outline: none;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.45);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.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;
}
