/* ==========================================================================
   Client theme: Ocoee
   --------------------------------------------------------------------------
   Brand source of truth: DefaultOcoeeNew.aspx / citizens-portal-ocoee.css
   - Primary purple: #5F2C8D
   - Dark sections / footer: #2E1B51
   - Typography: DM Sans
   - Light sticky header + purple utility toolbar

   Load order (Master):
     1) style.css
     2) client.css
     3) app-modern.css
     4) themes/ocoee.css  (this file)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap");

:root {
    --app-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-font-mono: Consolas, "Lucida Console", "Courier New", monospace;

    /* Homepage-aligned chrome */
    --app-header-bg: #ffffff;
    --app-header-bg-subtle: #f8f8f8;
    --app-header-fg: #333333;
    --app-header-muted: #666666;
    --app-header-border: #e8e8e8;
    --app-toolbar-bg: #5f2c8d;
    --app-toolbar-fg: #ffffff;
    --app-toolbar-hover: rgba(255, 255, 255, 0.14);

    --app-accent: #5f2c8d;
    --app-accent-hover: #4a2170;
    --app-accent-subtle: #f3edf8;
    --app-link: #5f2c8d;
    --app-link-hover: #4a2170;

    --app-bg: #f5f3f8;
    --app-surface: #ffffff;
    --app-surface-muted: #f8f8f8;
    --app-border: #e0e0e0;
    --app-border-strong: #d0d0d0;

    --app-text: #333333;
    --app-text-muted: #666666;
    --app-text-inverse: #ffffff;

    --app-focus: #5f2c8d;
    --app-focus-ring: 0 0 0 3px rgba(95, 44, 141, 0.35);

    --app-radius: 6px;
    --app-radius-lg: 8px;
    --app-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --app-shadow-md: 0 4px 16px rgba(46, 27, 81, 0.12);

    --app-sidebar-width: 220px;
    --app-header-height: 64px;

    --app-footer-bg: #2e1b51;
    --app-footer-fg: #ffffff;
    --app-footer-muted: rgba(255, 255, 255, 0.72);

    /* Grid / form header tints */
    --app-grid-header: var(--app-accent);
    --app-grid-footer: #f0ecf5;
    --app-form-header: #f0ecf5;
    --app-label-bg: #f8f5fc;

    /* Main page image-button style (PNG generators match these) */
    --app-main-btn-top: #2ea046;
    --app-main-btn-bottom: #1c6428;
    --app-main-btn-border: #14461c;
}

/* --------------------------------------------------------------------------
   Light header + purple toolbar (homepage chrome on interior shell)
   -------------------------------------------------------------------------- */

.app-shell .app-header {
    box-shadow: var(--app-shadow-sm);
}

.app-shell .app-header__primary,
.app-shell div#topArea.app-header__primary {
    background: var(--app-header-bg);
    color: var(--app-header-fg);
    border-bottom: 1px solid var(--app-header-border);
    min-height: var(--app-header-height);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    float: none;
    height: auto;
}

.app-shell .app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    float: none;
    min-width: 0;
}

.app-shell .app-brand a,
.app-shell .app-brand a:link,
.app-shell .app-brand a:visited {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--app-header-fg);
}

.app-shell .app-header__primary #imgClientLogo,
.app-shell .app-header__primary .app-brand img {
    height: 48px;
    width: auto;
    max-height: 48px;
    display: block;
    border: 0;
}

.app-shell .app-brand__titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-shell .app-brand__title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--app-header-fg);
}

.app-shell .app-brand__subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--app-header-muted);
}

.app-shell .app-header__primary .userInfo,
.app-shell div#topArea .userInfo {
    float: none;
    margin: 0;
    padding: 0;
    color: var(--app-header-muted);
    font-size: 0.85rem;
    text-align: right;
    line-height: 1.45;
}

.app-shell .app-header__primary .userInfo a,
.app-shell .app-header__primary .userInfo a:link,
.app-shell .app-header__primary .userInfo a:visited,
.app-shell div#topArea .userInfo a {
    color: var(--app-accent);
    font-weight: 500;
}

.app-shell .app-header__primary .userInfo a:hover,
.app-shell div#topArea .userInfo a:hover {
    color: var(--app-accent-hover);
    text-decoration: underline;
}

.app-shell .app-header__toolbar,
.app-shell div#iconGrid.app-header__toolbar {
    background: var(--app-toolbar-bg);
    color: var(--app-toolbar-fg);
    float: none;
    height: auto;
    min-height: 44px;
    padding: 0.35rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.app-shell .app-header__toolbar .iconText,
.app-shell div#iconGrid .iconText {
    color: var(--app-toolbar-fg);
    border-radius: var(--app-radius);
    padding: 0.45rem 0.85rem;
}

.app-shell .app-header__toolbar .iconText:hover,
.app-shell .app-header__toolbar .iconActive,
.app-shell div#iconGrid .iconText:hover,
.app-shell div#iconGrid .iconActive {
    background: var(--app-toolbar-hover);
    color: var(--app-toolbar-fg);
}

.app-shell .app-header__toolbar .iconText span.count,
.app-shell div#iconGrid .iconText span.count {
    color: var(--app-toolbar-fg);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   Sidebar / content accents
   -------------------------------------------------------------------------- */

.app-shell ul.panelSelector.app-sidebar,
.app-shell ul.panelSelector {
    border-right-color: var(--app-border);
}

.app-shell ul.panelSelector li a.selected {
    color: var(--app-accent);
    background: var(--app-accent-subtle);
    border-left-color: var(--app-accent);
}

/* --------------------------------------------------------------------------
   Footer – dark purple band like homepage
   -------------------------------------------------------------------------- */

.app-shell .app-footer,
.app-shell div#bottomArea.app-footer {
    background: var(--app-footer-bg);
    color: var(--app-footer-fg);
    border-top: none;
    padding: 0;
    font-size: 0.875rem;
}

.app-shell .app-footer__main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
}

.app-shell .app-footer__brand {
    font-weight: 700;
    font-size: 1rem;
}

.app-shell .app-footer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    color: var(--app-footer-muted);
}

.app-shell .app-footer a,
.app-shell div#bottomArea a {
    color: #ffffff;
    text-decoration: none;
}

.app-shell .app-footer a:hover,
.app-shell div#bottomArea a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.app-shell .app-footer__bottom {
    padding: 0.85rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--app-footer-muted);
    font-size: 0.8125rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.app-shell .app-footer__bottom .app-footer__powered {
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   Ocoee data-grid / table brand colors
   -------------------------------------------------------------------------- */

.app-shell .data-grid tr.headerstyle,
.app-shell .data-grid tr.headerstyle th,
.app-shell .data-grid tr.headerstyle td,
.app-shell .dgcommon tr.headerstyle,
.app-shell .dgcommon tr.headerstyle th,
.app-shell .dgcommon tr.headerstyle td {
    background: var(--app-grid-header);
    color: var(--app-text-inverse);
}

.app-shell .data-grid tr.footerstyle,
.app-shell .dgcommon tr.footerstyle {
    background: var(--app-grid-footer);
}

.app-shell .frmcommon th {
    background: var(--app-form-header);
    color: var(--app-text);
}

.app-shell .tblsummary th {
    background: var(--app-grid-header);
    color: var(--app-text-inverse);
}

.app-shell .tblsummary td.labels {
    background: var(--app-label-bg);
}

/* --------------------------------------------------------------------------
   User Settings – section cards & headers
   -------------------------------------------------------------------------- */

.user-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 920px;
}

.user-settings > .frmcommon,
.user-settings > div > .frmcommon,
.user-settings > table.frmcommon {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: var(--app-radius-lg);
    overflow: hidden;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.user-settings .frmcommon th {
    background: var(--app-accent) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    padding: 0.7rem 1rem !important;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.user-settings .frmcommon th a,
.user-settings .frmcommon th a:link,
.user-settings .frmcommon th a:visited {
    color: #f3e8ff !important;
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.35rem;
}

.user-settings .frmcommon th a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.user-settings .frmcommon td {
    padding: 0.55rem 1rem !important;
    border-bottom: 1px solid #f1f5f9;
}

.user-settings .frmcommon tr:last-child td {
    border-bottom: none;
}

.user-settings .frmcommon td.labels {
    width: 38%;
    font-weight: 600;
    color: var(--app-text-muted);
    font-size: 0.875rem;
}

.user-settings > table:not(.frmcommon) {
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Action / Links bars – Ocoee accent treatment
   -------------------------------------------------------------------------- */

.app-actions-bar {
    border-left-color: var(--app-accent);
}

.app-actions-bar a,
.app-actions-bar a:link,
.app-actions-bar a:visited {
    color: var(--app-accent);
    border-color: #e4d4f0;
}

.app-actions-bar a:hover {
    background: var(--app-accent-subtle);
    border-color: var(--app-accent);
    color: var(--app-accent-hover);
}

@media (max-width: 768px) {
    .app-shell .app-header__primary,
    .app-shell div#topArea.app-header__primary {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-shell .app-header__primary .userInfo,
    .app-shell div#topArea .userInfo {
        text-align: left;
        width: 100%;
    }

    .app-shell .app-footer__bottom .app-footer__powered {
        margin-left: 0;
    }
}
