/* CRM colors follow the CRMBama website; structural styles remain in each view. */
.crm-theme {
    color-scheme: light;
    --crm-bg: #fcfefd;
    --crm-text: #133d40;
    --crm-heading: #163f43;
    --crm-muted: #537274;
    --crm-surface: #fff;
    --crm-surface-soft: #ecf8f4;
    --crm-sidebar: #ecf8f4;
    --crm-border: #c6ded9;
    --crm-primary: #08a99f;
    --crm-primary-hover: #078f87;
    --crm-link: #087d76;
    --crm-on-primary: #062f31;
    --crm-focus: #08a99f44;
    --crm-glow: #08a99f12;
    --crm-shadow: #133d4010;
    --crm-success: #157347;
    --crm-success-soft: #e8f6ee;
    --crm-danger: #ad3348;
    --crm-danger-soft: #fff0f2;
    --crm-warning: #826000;
    --crm-warning-soft: #fff5d6;
}
.crm-theme.theme-dark {
    color-scheme: dark;
    --crm-bg: #0b2428;
    --crm-text: #e5f5f0;
    --crm-heading: #f2fbf7;
    --crm-muted: #a4c4be;
    --crm-surface: #12363a;
    --crm-surface-soft: #194247;
    --crm-sidebar: #0e2d32;
    --crm-border: #35605f;
    --crm-primary: #32c7b7;
    --crm-primary-hover: #5ad5c8;
    --crm-link: #71dfce;
    --crm-on-primary: #062f31;
    --crm-focus: #32c7b744;
    --crm-glow: #32c7b712;
    --crm-shadow: #00000020;
    --crm-success: #7edbb0;
    --crm-success-soft: #173f32;
    --crm-danger: #ffb2be;
    --crm-danger-soft: #472b35;
    --crm-warning: #f3d577;
    --crm-warning-soft: #403b26;
}
body.crm-theme { background: var(--crm-bg); color: var(--crm-text); }
.crm-theme :is(h1,h2,h3,h4,.brand) { color: var(--crm-heading); }
.crm-theme a { color: var(--crm-link); }
.crm-theme :is(.btn:not(.secondary):not(.group-btn),.ticket-btn:not(.muted),.change-password,.quick a:not(.alt)) { color: var(--crm-on-primary); }
.crm-theme :is(button:not([class]),[class="btn"]:not([style]),.ticket-btn:not(.muted),.submit,.change-password,.quick a:not(.alt),.service-menu summary):hover { background: var(--crm-primary-hover); color: var(--crm-on-primary); }
.crm-theme .content { background: radial-gradient(ellipse at 100% 0,var(--crm-glow),transparent 55%); }
.crm-theme .side { background: var(--crm-sidebar); border-left: 1px solid var(--crm-border); }
.crm-theme :is(.panel,.card,.top,.kpi,.dash-panel) { background: var(--crm-surface); border-color: var(--crm-border); color: var(--crm-text); }
.crm-theme.theme-light :is(.panel,.kpi,.dash-panel) { background: var(--crm-surface); }
.crm-theme.theme-light .side { background: var(--crm-sidebar); }
.crm-theme.theme-light .panel :is(input,select,textarea,select option) { background: var(--crm-surface); }
.crm-theme :is(input,select,textarea) { background: var(--crm-surface); color: var(--crm-text); border-color: var(--crm-border); accent-color: var(--crm-primary); }
.crm-theme :is(input,select,textarea):focus { outline-color: var(--crm-primary); border-color: var(--crm-primary); }
.crm-theme :is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--crm-primary); outline-offset: 3px; }
.crm-theme :is(input,textarea)::placeholder { color: var(--crm-muted); opacity: 1; }
.crm-theme :is(.panel select option,select option) { background: var(--crm-surface); color: var(--crm-text); }
.crm-theme .nav :is(a,summary) { color: var(--crm-text); }
.crm-theme .nav :is(a,summary):hover,.crm-theme .nav details[open]>summary { background: var(--crm-surface-soft); color: var(--crm-link); }
.crm-theme .nav details[open]>summary { box-shadow: inset -3px 0 var(--crm-primary); }
.crm-theme :is(.field label,.field input,.field select,.field textarea,.check-row,.choice-card-title,.credit-badge strong,.group-form legend,.group-form label,.table th) { color: var(--crm-text); }
.crm-theme :is(.logout,.theme-toggle,.quick a.alt) { background: var(--crm-surface-soft); color: var(--crm-link); border-color: var(--crm-border); }
.crm-theme .back { color: var(--crm-link); }
.crm-theme .app-version { color: var(--crm-muted); opacity: 1; }
.crm-theme :is(.success,.online) { color: var(--crm-success); }
.crm-theme :is(.error,.offline) { color: var(--crm-danger); }
.crm-theme :is(.error,.form-error) { background: var(--crm-danger-soft); }
.crm-theme .status[role=status] { color: var(--crm-success); background: var(--crm-success-soft); }

/* Keep the management screens compact without changing browser zoom or icon sizes. */
body.crm-theme { font-size: 13px; line-height: 1.65; }
.crm-theme :is(button,input,select,textarea) { font-size: 13px; line-height: 1.6; }
.crm-theme :is(.btn,.submit,.kill,.logout,.change-password) { font-size: 13px; line-height: 1.6; }
.crm-theme h1 { font-size: 22px; line-height: 1.5; }
.crm-theme .head h1 { font-size: 18px; }
.crm-theme .hero h1 { font-size: 20px; }
.crm-theme .panel h2 { font-size: 16px; }
.crm-theme :is(.panel h3,.form-section-title,.group-form legend) { font-size: 14px; }
.crm-theme .panel h4 { font-size: 13px; }
.crm-theme :is(.field label,.check-row,.choice-card-title) { font-size: 13px; }
.crm-theme .nav :is(a,summary) { font-size: 12px; }
.crm-theme :is(.table,.customers-table,.service-table,table) :is(th,td) { font-size: 12px; line-height: 1.65; }
.crm-theme .kpi strong { font-size: 20px; }
.crm-theme .kpi small { font-size: 12px; }
.crm-theme .status b { font-size: 18px; }
.crm-theme:is(.modern,.legacy) .card h1 { font-size: 24px; }
.crm-theme:is(.modern,.legacy) :is(p,.links) { font-size: 13px; }
@media (max-width:700px) {
    .crm-theme .head h1 { font-size: 16px; }
    .crm-theme .kpi strong { font-size: 18px; }
    .crm-theme .nav summary { font-size: 0; }
    /* Prevent automatic focus zoom in mobile browsers while keeping labels compact. */
    .crm-theme :is(input,select,textarea) { font-size: 16px; }
}

.crm-theme .content { display: flex; flex-direction: column; }
.crm-theme .content > .panel { flex-shrink: 0; margin-bottom: 20px; }
.crm-app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--crm-border); color: var(--crm-muted); font-size: 11px; line-height: 1.8; }
.crm-footer-contact { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.crm-app-footer .app-version { margin: 0; font-size: 11px; white-space: nowrap; }
body.crm-theme:is(.modern,.legacy) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.crm-theme:is(.modern,.legacy) > .card { margin-block: auto; }
.crm-theme:is(.modern,.legacy) > .crm-app-footer { width: min(100%,600px); margin-top: 0; justify-content: center; text-align: center; }
body.crm-theme.crm-standalone { display: flex; flex-direction: column; min-height: 100dvh; }
.crm-standalone > main:not(.portal) { width: 100%; box-sizing: border-box; }
.crm-standalone > .crm-app-footer { width: min(100%,1000px); box-sizing: border-box; margin: auto auto 0; padding: 14px 20px; }
.crm-standalone > .portal ~ .crm-app-footer { max-width: 680px; }
@media (max-width:700px) {
    .crm-app-footer { justify-content: center; text-align: center; }
    .crm-footer-contact { justify-content: center; }
}

.crm-site-brand { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; white-space: nowrap; }
.crm-site-mark { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; background: #0da89e; color: #fff; font: 26px/1 "Segoe UI Symbol",Tahoma,sans-serif; }
.crm-site-wordmark { color: var(--crm-heading); font-size: 14px; font-weight: 800; }
.crm-site-dot { color: #11aaa0; }
@media (max-width:700px) {
    .crm-theme .side .brand { display: flex; justify-content: center; padding: 10px 0; }
    .crm-theme .side .crm-site-wordmark { display: none; }
}
