/* ==========================================================================
   SAGE Citizen Portal Ã¢â‚¬â€œ Government SaaS UI Modernization
   WCAG 2.2 AA-oriented. WebForms-safe: styling only, no control changes.
   ========================================================================== */

/* Theme tokens: brand colors live in ui/style/themes/<client>.css (e.g. ocoee.css).
   Neutral fallbacks below keep the UI usable if a theme file is missing. */
:root {
    --app-font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --app-font-mono: Consolas, "Lucida Console", "Courier New", monospace;

    --app-header-bg: #1e2a3b;
    --app-header-bg-subtle: #253447;
    --app-header-fg: #ffffff;
    --app-header-muted: rgba(255, 255, 255, 0.78);
    --app-header-border: transparent;
    --app-toolbar-bg: #2d3f56;
    --app-toolbar-fg: #ffffff;
    --app-toolbar-hover: rgba(255, 255, 255, 0.12);
    --app-accent: #334155;
    --app-accent-hover: #1e293b;
    --app-accent-subtle: #f1f5f9;
    --app-link: #334155;
    --app-link-hover: #1e293b;
    --app-footer-bg: #ffffff;
    --app-footer-fg: #4b5563;
    --app-footer-muted: #6b7280;

    --app-bg: #eef1f5;
    --app-surface: #ffffff;
    --app-surface-muted: #f8f9fb;
    --app-border: #d1d5db;
    --app-border-strong: #9ca3af;

    --app-text: #1f2937;
    --app-text-muted: #4b5563;
    --app-text-inverse: #ffffff;

    --app-focus: #2563eb;
    --app-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.45);

    --app-radius: 6px;
    --app-radius-lg: 8px;
    --app-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --app-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);

    --app-sidebar-width: 220px;
    --app-header-height: 56px;

    --app-grid-header: var(--app-accent);
    --app-grid-footer: var(--app-accent-subtle);
    --app-form-header: var(--app-accent-subtle);
    --app-label-bg: var(--app-surface-muted);
}

/* --------------------------------------------------------------------------
   Base / shell
   -------------------------------------------------------------------------- */

html {
    font-size: 100%;
}

body.app-shell {
    margin: 0;
    font-family: var(--app-font);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--app-text);
    background: var(--app-bg);
    min-width: 320px;
}

.app-shell *:focus-visible {
    outline: 2px solid var(--app-focus);
    outline-offset: 2px;
}

.app-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: var(--app-accent);
    color: var(--app-text-inverse);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--app-radius) 0;
}

.app-skip-link:focus {
    left: 0;
}

/* --------------------------------------------------------------------------
   app-header
   -------------------------------------------------------------------------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--app-shadow-sm);
}

.app-header__primary,
div#topArea.app-header__primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: auto;
    min-height: var(--app-header-height);
    padding: 0.5rem 1.25rem;
    background: var(--app-header-bg);
    color: var(--app-header-fg, var(--app-text-inverse));
    border-bottom: 1px solid var(--app-header-border, transparent);
    float: none;
}

.app-header__primary > div:first-child,
.app-header__primary .app-brand {
    float: none;
    flex-shrink: 0;
}

.app-header__primary #imgClientLogo,
.app-header__primary img {
    height: 40px;
    width: auto;
    max-height: 44px;
    border: 0;
    vertical-align: middle;
}

.app-header__primary .userInfo,
div#topArea div.userInfo {
    float: none;
    font-size: 0.8125rem;
    color: var(--app-header-muted, rgba(255, 255, 255, 0.9));
    text-align: right;
    line-height: 1.6;
}

.app-header__primary .userInfo a,
div#topArea a {
    color: var(--app-header-fg, rgba(255, 255, 255, 0.95));
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.app-header__primary .userInfo a:hover,
div#topArea a:hover {
    color: var(--app-header-fg, var(--app-text-inverse));
    background: var(--app-toolbar-hover, rgba(255, 255, 255, 0.1));
    text-decoration: none;
}

.app-header__toolbar,
div#iconGrid.app-header__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    height: auto;
    min-height: 40px;
    padding: 0.4rem 1.25rem;
    background: var(--app-toolbar-bg);
    color: var(--app-toolbar-fg, var(--app-text-inverse));
    float: none;
}

.app-header__toolbar .icon,
div#iconGrid div.icon {
    float: none;
    margin-right: 0;
    position: relative;
}

.app-header__toolbar .iconText,
div#iconGrid div.iconText {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--app-radius);
    color: var(--app-toolbar-fg, var(--app-text-inverse));
    font-size: 0.8125rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.app-header__toolbar .iconText:hover,
div#iconGrid div:hover.iconText,
.app-header__toolbar .iconActive,
div#iconGrid div.iconActive {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

.app-header__toolbar .iconText span.count,
div#iconGrid div.iconText span.count {
    color: var(--app-text-inverse);
    background: #b91c1c;
    border: none;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-family: var(--app-font);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 1.1rem;
    text-align: center;
    line-height: 1.4;
}

.app-header__toolbar .flyout,
div#iconGrid .flyout {
    top: calc(100% + 4px);
    border-radius: var(--app-radius-lg);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-md);
    width: min(360px, 92vw);
}

.app-header__toolbar .flyout ul li.unread,
div#iconGrid .flyout ul li.unread {
    background: var(--app-accent-subtle);
}

.app-header__toolbar .flyout ul li:hover,
div#iconGrid .flyout ul li:hover {
    background: #e8eef5;
    border-color: var(--app-link);
}

.app-header__toolbar .flyout a.footer,
div#iconGrid .flyout a.footer {
    color: var(--app-accent);
}

/* Test mode banner */
#pnlTestModeWarning,
.cp-test-mode-warning {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    text-align: center;
    background: #991b1b;
    color: #fff;
    border-bottom: 2px solid #dc2626;
}

/* --------------------------------------------------------------------------
   app-layout / main content
   -------------------------------------------------------------------------- */

.app-layout__content,
div#mainArea.app-layout__content {
    clear: both;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
    min-height: 420px;
    font-size: 1rem;
    max-width: 1440px;
    background: transparent;
}

.app-shell #mainArea:has(> ul.panelSelector) {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    max-width: none;
}

/* --------------------------------------------------------------------------
   app-sidebar (left module navigation)
   -------------------------------------------------------------------------- */

ul.panelSelector.app-sidebar,
ul.panelSelector {
    float: left;
    flex: 0 0 var(--app-sidebar-width);
    width: var(--app-sidebar-width);
    margin: 0;
    padding: 1rem 0;
    list-style: none;
    background: var(--app-surface);
    border-right: 1px solid var(--app-border);
    min-height: calc(100vh - 120px);
    box-sizing: border-box;
}

ul.panelSelector.app-sidebar li a,
ul.panelSelector li a {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.25rem;
    margin: 0 0.5rem 0.15rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    color: var(--app-text);
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0 var(--app-radius) var(--app-radius) 0;
    background: none;
    background-image: none !important;
    outline: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

ul.panelSelector li a:visited {
    color: var(--app-text);
}

ul.panelSelector li a:hover {
    color: var(--app-accent);
    background: var(--app-surface-muted);
    background-image: none !important;
}

ul.panelSelector li a.selected {
    color: var(--app-accent);
    background: var(--app-accent-subtle);
    border-left-color: var(--app-accent);
    font-weight: 600;
    background-image: none !important;
}

ul.panelSelector li:first-child a {
    border-top: none;
}

/* --------------------------------------------------------------------------
   app-layout__main (content panel beside sidebar)
   -------------------------------------------------------------------------- */

.app-layout__main,
div.panelContainer.app-layout__main,
div.panelContainer {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    padding: 1.25rem 1.5rem 2rem;
    border-left: none;
    min-height: 420px;
    background: var(--app-bg);
}

div.panel {
    display: none;
}

div.panel[style*="display: block"],
div.panel[style*="display:block"] {
    display: block !important;
}

/* --------------------------------------------------------------------------
   app-card / app-section (detail pages)
   -------------------------------------------------------------------------- */

.app-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.app-permit-summary {
    border-left: 4px solid var(--app-accent);
}

.app-permit-summary .app-permit-id {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.25rem;
}

.app-permit-summary .app-permit-meta {
    font-size: 0.9375rem;
    color: var(--app-text-muted);
    margin-bottom: 0.75rem;
}

.app-section {
    margin-bottom: 1.25rem;
}

.app-section__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-text-muted);
    margin: 0 0 0.5rem 0;
}

.app-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    padding: 0.65rem 0.85rem;
    margin: 0.35rem 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--app-accent);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    font-size: 0.875rem;
    color: var(--app-text-muted);
    box-sizing: border-box;
}

.app-actions-bar a,
.app-actions-bar a:link,
.app-actions-bar a:visited {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--app-accent);
    text-decoration: none;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e4d4f0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-actions-bar a:hover {
    background: var(--app-accent-subtle);
    border-color: var(--app-accent);
    color: var(--app-accent-hover);
    text-decoration: none;
}

/* Override legacy gray inline bars if any remain */
.app-shell div[style*="background-color:#F0F0F0"][style*="#888"],
.app-shell div[style*="background-color: #F0F0F0"][style*="#888"],
.app-shell [style*="background-color:#F0F0F0"][style*="border:1px solid #888"],
.app-shell [style*="background-color: #F0F0F0"][style*="border: 1px solid #888"] {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid var(--app-accent) !important;
    border-radius: 8px !important;
    padding: 0.65rem 0.85rem !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    color: #475569;
}


/* Detail field tables inside cards */
.app-card table,
#summary table,
.panelContainer > .app-card table {
    width: 100%;
    border-collapse: collapse;
}

.app-card table td,
#summary table td {
    padding: 0.5rem 0.75rem 0.5rem 0;
    vertical-align: top;
    border-bottom: 1px solid var(--app-border);
}

.app-card table td:first-child,
#summary table td:first-child {
    width: 38%;
    font-weight: 600;
    color: var(--app-text-muted);
    font-size: 0.875rem;
}

.app-card table tr:last-child td {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   status-badge
   -------------------------------------------------------------------------- */

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    border: 1px solid transparent;
}

.status-badge--neutral {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.status-badge--success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.status-badge--warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.status-badge--danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Alerts Ã¢â‚¬â€œ do not rely on color alone (include weight/border) */
.app-alert {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    border-radius: var(--app-radius);
    border-left: 4px solid;
    font-size: 0.875rem;
    font-weight: 500;
}

.app-alert--warning,
#pnlHasAmountDue > div {
    background: #fffbeb !important;
    border-color: #d97706 !important;
    color: #78350f !important;
    border: 1px solid #fcd34d !important;
    border-left-width: 4px !important;
    padding: 0.75rem 1rem !important;
    border-radius: var(--app-radius) !important;
}

/* --------------------------------------------------------------------------
   app-button
   -------------------------------------------------------------------------- */

.app-button,
.app-shell input[type="submit"],
.app-shell input[type="button"],
.app-shell button,
.app-shell .btncommon,
.app-shell .btnnext {
    font-family: var(--app-font);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--app-radius);
    border: 1px solid var(--app-accent);
    background: var(--app-accent);
    color: var(--app-text-inverse);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.app-button:hover,
.app-shell input[type="submit"]:hover,
.app-shell input[type="button"]:hover,
.app-shell .btncommon:hover,
.app-shell .btnnext:hover {
    background: var(--app-accent-hover);
    border-color: var(--app-accent-hover);
}

.app-button--secondary,
.app-shell input.app-button--secondary,
.app-shell button.app-button--secondary {
    background: var(--app-surface);
    color: var(--app-accent);
    border-color: var(--app-border-strong);
}

.app-button--secondary:hover,
.app-shell input.app-button--secondary:hover,
.app-shell button.app-button--secondary:hover {
    background: var(--app-surface-muted);
}

/* --------------------------------------------------------------------------
   Typography & general content
   -------------------------------------------------------------------------- */

.app-layout__content h1,
.app-layout__main h1,
div#mainArea h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--app-text);
    margin: 0 0 1rem 0;
}

.app-layout__content h2,
.app-layout__main h2,
div#mainArea h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.app-layout__content a,
.app-layout__main a,
div#mainArea a {
    color: var(--app-link);
}

.app-layout__content a:hover,
.app-layout__main a:hover,
div#mainArea a:hover {
    color: var(--app-link-hover);
}

.app-shell input[type="text"],
.app-shell input[type="password"],
.app-shell input[type="email"],
.app-shell select,
.app-shell textarea {
    font-family: var(--app-font);
    font-size: 0.9375rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--app-text);
    max-width: 100%;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
    border-color: var(--app-focus);
    box-shadow: var(--app-focus-ring);
    outline: none;
}

/* Shared alerts from CommonControls */
.failure,
.errorDisplay {
    border-left: 4px solid #b91c1c;
    border-radius: var(--app-radius);
    padding: 0.75rem 1rem;
}

.notice,
.warningDisplay {
    border-left: 4px solid #d97706;
    border-radius: var(--app-radius);
    padding: 0.75rem 1rem;
}

.success {
    border-left: 4px solid #15803d;
    border-radius: var(--app-radius);
    padding: 0.75rem 1rem;
}


/* --------------------------------------------------------------------------
   ASP.NET validators – always red (RequiredField, Regex, Compare, etc.)
   -------------------------------------------------------------------------- */

.app-shell .requiredfieldvalidator,
.app-shell span.requiredfieldvalidator,
.app-shell .validator,
.app-shell .validatorError,
.app-shell .field-validation-error,
.app-shell .ValidationSummary,
.app-shell table.ValidationSummary,
.app-shell div.ValidationSummary,
.app-shell ul.ValidationSummary,
.app-shell .failure,
.app-shell .failure-text,
.app-shell .errorDisplay,
.app-shell .errorDisplay li,
.app-shell label.error,
.app-shell span.error,
.app-shell .search-error {
    color: #dc2626 !important;
}

.app-shell span[id*="RequiredField"],
.app-shell span[id*="requiredField"],
.app-shell span[id*="rfv"],
.app-shell span[id*="Rfv"],
.app-shell span[id*="RFV"],
.app-shell span[id*="RegularExpression"],
.app-shell span[id*="regularExpression"],
.app-shell span[id*="rgv"],
.app-shell span[id*="Rgv"],
.app-shell span[id*="rev"]:not([id*="Review"]):not([id*="review"]),
.app-shell span[id*="Rev"]:not([id*="Review"]):not([id*="review"]),
.app-shell span[id*="CompareValidator"],
.app-shell span[id*="compareValidator"],
.app-shell span[id*="RangeValidator"],
.app-shell span[id*="rangeValidator"],
.app-shell span[id*="CustomValidator"],
.app-shell span[id*="customValidator"],
.app-shell span[id*="ValidationSummary"],
.app-shell div[id*="ValidationSummary"],
.app-shell table[id*="ValidationSummary"] {
    color: #dc2626 !important;
}

.app-shell span[style*="color:Red"],
.app-shell span[style*="color:red"],
.app-shell span[style*="color: Red"],
.app-shell span[style*="color: red"],
.app-shell span[style*="color:#FF0000"],
.app-shell span[style*="color:#ff0000"],
.app-shell span[style*="color:#f00"],
.app-shell span[style*="color:#F00"],
.app-shell label[style*="color:Red"],
.app-shell label[style*="color:red"],
.app-shell font[color="Red"],
.app-shell font[color="red"] {
    color: #dc2626 !important;
}
div.contentSection {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    padding: 1rem;
}

div.quickLinks {
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 0.75rem 1rem;
}

div.block1,
div.block2,
div.block3 {
    border-radius: var(--app-radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Wizard steps (NavBreadcrumb rptSteps / #WizardSteps)
   -------------------------------------------------------------------------- */

div#WizardSteps.app-wizard-steps,
div#WizardSteps {
    clear: both;
    margin: 0 0 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-left: 4px solid var(--app-accent);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
}

div#WizardSteps ul {
    counter-reset: wizard-step;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.15rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
}

div#WizardSteps ul li {
    counter-increment: wizard-step;
    position: relative;
    float: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 !important;
    padding: 0.4rem 0.7rem 0.4rem 0.45rem !important;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--app-text-muted);
    background: transparent;
    cursor: default;
    white-space: nowrap;
}

div#WizardSteps ul li::before {
    content: counter(wizard-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--app-text-muted);
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    box-sizing: border-box;
}

div#WizardSteps ul li:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 0.85rem;
    height: 2px;
    margin-left: 0.35rem;
    background: var(--app-border);
    border-radius: 1px;
    flex: 0 0 auto;
}

div#WizardSteps ul li:hover {
    border-color: transparent !important;
    background: transparent !important;
    margin: 0 !important;
    cursor: default;
}

div#WizardSteps ul li a,
div#WizardSteps ul li span,
div#WizardSteps ul li label {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

div#WizardSteps ul li a:hover {
    text-decoration: underline;
    color: var(--app-accent);
}

div#WizardSteps ul li.complete {
    color: var(--app-text);
    background: #f3edf8;
    border-color: #e4d4f0;
}

div#WizardSteps ul li.complete::before {
    content: "\2713";
    color: #ffffff;
    background: var(--app-accent);
    border-color: var(--app-accent);
    font-size: 0.7rem;
}

div#WizardSteps ul li.complete a {
    color: var(--app-accent);
    font-weight: 600;
}

div#WizardSteps ul li.complete:not(:last-child)::after {
    background: var(--app-accent);
    opacity: 0.45;
}

div#WizardSteps ul li.current {
    color: var(--app-text);
    background: var(--app-accent-subtle);
    border: 1px solid var(--app-accent) !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(95, 44, 141, 0.12);
}

div#WizardSteps ul li.current::before {
    color: #ffffff;
    background: var(--app-accent);
    border-color: var(--app-accent);
}

div#WizardSteps ul li.current a {
    color: var(--app-text);
    font-weight: 700;
    pointer-events: none;
    text-decoration: none;
}

div#WizardSteps ul li.incomplete {
    color: #94a3b8;
    background: transparent;
}

div#WizardSteps ul li.incomplete::before {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
}

div#WizardSteps ul li.incomplete a {
    color: #94a3b8;
    pointer-events: none;
}

.app-wizard-steps__rule {
    height: 0;
    margin: 0 0 1rem;
    border: 0;
    border-bottom: 1px solid var(--app-border);
}

@media (max-width: 768px) {
    div#WizardSteps ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    div#WizardSteps ul li {
        width: 100%;
        box-sizing: border-box;
        border-radius: var(--app-radius);
        white-space: normal;
    }

    div#WizardSteps ul li:not(:last-child)::after {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Wizard mode panel + ProgressBar (green, matches NavBreadcrumb card style)
   -------------------------------------------------------------------------- */

div.wizardModePanelContainer {
    width: 100%;
    min-width: 0 !important;
    height: auto !important;
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-left: 4px solid #16a34a;
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    line-height: 1.4;
    box-sizing: border-box;
}

div.wizardModePanel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin: 0;
}

div.wizardModePanel div.ColumnOne {
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    flex: 0 1 auto;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #166534;
}

div.wizardModePanel div.ColumnTwo {
    float: none !important;
    width: auto !important;
    flex: 1 1 220px;
    max-width: 360px;
    min-width: 160px;
}

div.wizardModePanel div.ColumnThree {
    float: none !important;
    flex: 0 1 auto;
    margin-left: auto;
    white-space: nowrap;
    text-align: right;
}

/* ProgressBar1 – modern track with green fill */
div.ProgressBar {
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100% !important;
    max-width: 100%;
    height: 1.5rem !important;
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 999px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(22, 101, 52, 0.08);
}

div.ProgressBar div.ProgressBar_innerDiv {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    height: 100% !important;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: width 0.25s ease;
}

div.ProgressBar div.ProgressBar_innerText {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    float: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #14532d;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    filter: none !important;
    pointer-events: none;
}

div.ProgressBar div.ProgressBar_innerText span,
div.ProgressBar div.ProgressBar_innerText label {
    color: inherit;
    font-weight: inherit;
}

@media (max-width: 768px) {
    div.wizardModePanel {
        flex-direction: column;
        align-items: stretch;
    }

    div.wizardModePanel div.ColumnTwo {
        max-width: none;
    }

    div.wizardModePanel div.ColumnThree {
        margin-left: 0;
        text-align: left;
        white-space: normal;
    }
}


/* Revisions (permit detail) */
span.progress > div {
    display: inline !important;
}

div.revision {
    border-left: 3px solid var(--app-border-strong);
    margin: 0.5rem 0 0 0;
    padding-left: 0.75rem;
}

div.revision .groupHeader {
    font-weight: 700;
    color: var(--app-text);
    background: var(--app-surface-muted);
    border-top: 1px solid var(--app-border);
    padding: 0.5rem 0.75rem;
}

div.revision .groupheader2 {
    padding: 0.5rem 0.75rem;
}

div.revision .details {
    margin-left: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--app-border);
}

div.revision .status {
    font-weight: 700;
    color: var(--app-text);
}

/* --------------------------------------------------------------------------
   app-footer
   -------------------------------------------------------------------------- */

.app-footer,
div#bottomArea.app-footer {
    clear: both;
    margin: 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    color: var(--app-footer-fg, var(--app-text-muted));
    background: var(--app-footer-bg, var(--app-surface));
    border-top: 1px solid var(--app-border);
}

.app-footer a,
div#bottomArea a {
    color: var(--app-link);
    text-decoration: none;
}

.app-footer a:hover,
div#bottomArea a:hover {
    text-decoration: underline;
    color: var(--app-link-hover);
}

/* Modals */
div.jsmodal_dialog {
    border-radius: var(--app-radius-lg);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-md);
    padding: 1.25rem;
    max-width: 92vw;
}

div.jsmodal_dialog .jsmodal_header {
    font-family: var(--app-font);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--app-border);
}

/* --------------------------------------------------------------------------
   data-grid refinements (grids already themed in client.css Ã¢â‚¬â€œ light touch)
   -------------------------------------------------------------------------- */

.data-grid.dgcommon,
table.data-grid {
    font-family: var(--app-font);
}

.data-grid.dgcommon th,
.data-grid.dgcommon td,
.dgcommon th,
.dgcommon td {
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Search pages (PermitSearch, BusinessLicenseSearch, etc.)
   -------------------------------------------------------------------------- */

.search-page {
    padding: 1.5rem 0 2rem;
}

.search-card {
    max-width: 960px;
    margin: 0 auto;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--app-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.search-helper {
    font-size: 0.9375rem;
    color: var(--app-text-muted);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-text);
    line-height: 1.35;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.date-range__sep {
    color: var(--app-text-muted);
    font-weight: 600;
    user-select: none;
}

.search-card input[type="text"],
.search-card input[type="password"],
.search-card input[type="email"],
.search-card input[type="number"],
.search-card select,
.search-card textarea,
.search-card .form-input,
.search-card .form-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: var(--app-font);
    font-size: 0.9375rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    color: var(--app-text);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-card input[type="text"]:hover,
.search-card input[type="password"]:hover,
.search-card input[type="email"]:hover,
.search-card input[type="number"]:hover,
.search-card select:hover,
.search-card textarea:hover {
    border-color: var(--app-border-strong);
}

.search-card input[type="text"]:focus,
.search-card input[type="password"]:focus,
.search-card input[type="email"]:focus,
.search-card input[type="number"]:focus,
.search-card select:focus,
.search-card textarea:focus {
    outline: none;
    border-color: var(--app-focus);
    box-shadow: var(--app-focus-ring);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--app-border);
}

.search-card .btn-primary {
    min-width: 8rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
}

.search-results {
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding-top: 0.5rem;
}

.search-results__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    color: var(--app-text);
}

.search-results__export {
    margin-left: auto;
}

.search-results--empty {
    max-width: 960px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.25rem;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    color: var(--app-text-muted);
    font-style: italic;
}

.panelContainer .search-page,
.app-layout__main .search-page {
    padding-top: 0;
}

.form-actions--split {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.form-actions__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.form-field .form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-top: 0.15rem;
}

.form-field .form-options table {
    border: none;
    width: auto;
}

.form-field .form-options td {
    border: none;
    padding: 0 0.75rem 0 0;
}

.form-field .form-options label {
    font-weight: 400;
    font-size: 0.875rem;
}

.search-criteria-grid table.dgcommon {
    width: 100%;
    border: none !important;
    background: transparent !important;
}

.search-criteria-grid table.dgcommon td {
    border: none !important;
    background: transparent !important;
    vertical-align: top;
}

.search-criteria-grid table.dgcommon tr {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 0.35rem 1rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

.search-criteria-grid table.dgcommon td.labels {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-text);
    padding: 0.5rem 0 0;
}

.search-criteria-grid table.dgcommon td.controls {
    padding: 0;
}

.search-criteria-grid .date-range {
    max-width: 420px;
}

.search-card .search-tools {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.search-card .search-tools a {
    color: var(--app-link);
}

.search-card .search-saved-panel {
    margin-bottom: 1rem;
}

.search-card .search-extra-options {
    margin: 0.75rem 0 1rem;
    font-size: 0.875rem;
}

.search-card .search-extra-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.search-card .error,
.search-card .search-error {
    display: block;
    margin-top: 0.75rem;
    color: #b91c1c;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .search-page {
        padding: 1rem 0 1.5rem;
    }

    .search-card {
        padding: 1.25rem;
        border-radius: var(--app-radius-lg);
    }

    .search-form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .search-card .btn-primary {
        width: 100%;
    }

    .search-criteria-grid table.dgcommon tr {
        grid-template-columns: 1fr;
    }

    .form-actions--split {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions__group {
        width: 100%;
        justify-content: stretch;
    }

    .form-actions__group .btncommon,
    .form-actions__group input[type="submit"],
    .form-actions__group input[type="button"] {
        flex: 1 1 auto;
    }
}

@media (max-width: 900px) {
    .app-shell #mainArea:has(> ul.panelSelector) {
        flex-direction: column;
    }

    ul.panelSelector.app-sidebar,
    ul.panelSelector {
        float: none;
        flex: none;
        width: 100%;
        min-height: 0;
        border-right: none;
        border-bottom: 1px solid var(--app-border);
        padding: 0.5rem 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    ul.panelSelector li a {
        margin: 0 0.25rem;
        border-left: none;
        border-radius: var(--app-radius);
    }

    ul.panelSelector li a.selected {
        border-left: none;
        border: 1px solid var(--app-accent);
    }

    div.panelContainer {
        padding: 1rem;
    }

    .app-header__primary {
        flex-wrap: wrap;
        padding: 0.5rem 1rem;
    }

    .app-header__primary .userInfo {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .app-layout__content,
    div#mainArea.app-layout__content {
        padding: 0.75rem;
    }

    .app-card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Find Property â€“ address / parcel search layout
   -------------------------------------------------------------------------- */

.find-property-search {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

.find-property-fields {
    width: 100%;
    box-sizing: border-box;
}

.find-property-address,
.find-property-parcel {
    width: 48% !important;
    margin: 10px !important;
    box-sizing: border-box !important;
}

.find-property-success,
.find-property-success.success {
    width: 100% !important;
    max-width: 100% !important;
    clear: both;
    display: block;
    box-sizing: border-box;
}


/* AutoSuggestBox text inputs only (not Find buttons) */
.find-property-address input[type="text"],
.find-property-parcel input[type="text"] {
    width: 95% !important;
    max-width: 95% !important;
    box-sizing: border-box;
}

.find-property-address input[type="submit"],
.find-property-address input[type="button"],
.find-property-parcel input[type="submit"],
.find-property-parcel input[type="button"] {
    width: auto !important;
    max-width: none !important;
}
@media (max-width: 768px) {
    .find-property-address,
    .find-property-parcel {
        float: none !important;
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
}
/* --------------------------------------------------------------------------
   Homepage-style action buttons (DefaultOcoeeNew .btn / .btn-outline)
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--app-font);
    border-radius: var(--app-radius, 6px);
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

a.btn:link,
a.btn:visited {
    text-decoration: none !important;
}

.btn-outline {
    background: var(--app-surface, #ffffff);
    color: var(--app-accent, #5f2c8d) !important;
    border: 2px solid var(--app-accent, #5f2c8d);
}

.btn-outline:hover {
    background: var(--app-surface-muted, #f8f8f8);
    color: var(--app-accent-hover, #4a2170) !important;
    border-color: var(--app-accent-hover, #4a2170);
}

.btn-primary {
    background: var(--app-accent, #5f2c8d);
    color: var(--app-text-inverse, #ffffff) !important;
    border: 2px solid var(--app-accent, #5f2c8d);
}

.btn-primary:hover {
    background: var(--app-accent-hover, #4a2170);
    border-color: var(--app-accent-hover, #4a2170);
    color: var(--app-text-inverse, #ffffff) !important;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.main-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0.5rem 0 0.25rem 0;
}

.main-action-buttons .btn {
    min-width: 10rem;
}
