/* Shared AME mini-app visual language. */
.ame-suite {
    --ink: #172f3d;
    --muted: #738596;
    --green: #087d8b;
    --line: #d7e3e9;
    --bg: #fff;
    --orange: #ff8920;
    --shadow: none;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
}
.ame-suite :focus-visible { outline-color: #098b9a; }
.suite-header { display: flex; align-items: center; gap: 32px; padding: 0 max(32px, calc((100vw - 1440px) / 2)); min-height: 94px; border-bottom: 1px solid var(--line); background: white; }
.suite-header .brand { flex-shrink: 0; }
.suite-header .ame-logo { width: 118px; height: auto; }
.suite-header nav { display: flex; align-self: stretch; gap: 22px; }
.suite-header nav a { display: flex; align-items: center; gap: 10px; border-bottom: 3px solid transparent; padding: 24px 6px 21px; color: var(--green); font-weight: 650; font-size: 14px; white-space: nowrap; }
.suite-header nav a.active { border-bottom-color: #00a1ad; }
.suite-header nav a:hover { background: #f3fafb; }
.suite-header nav .icon { width: 20px; height: 20px; }
.suite-header .sidebar-bottom { margin-left: auto; padding: 0; border: 0; color: var(--ink); }
.suite-header .sidebar-bottom strong { font-size: 13px; font-weight: 650; }
.suite-header .sidebar-bottom small { color: var(--muted); font-size: 11px; }
.suite-header .avatar { background: var(--green); color: #fff; width: 40px; height: 40px; border: 0; }
.suite-header .logout .icon { filter: none; opacity: .8; }
.suite-header .logout:hover { background: #eef7f8; }
.ame-suite .shell { margin: 0; }
.ame-suite .shell main { max-width: 1440px; padding: 42px 32px; }
.ame-suite h1 { font-size: 30px; font-weight: 700; letter-spacing: -.8px; }
.ame-suite h2 { font-size: 21px; font-weight: 650; }
.ame-suite .eyebrow { color: #138797; font-size: 10px; letter-spacing: 1.5px; }
.ame-suite .title-dot { color: var(--green); }
.ame-suite .page-heading p, .ame-suite .section-heading p { font-size: 13px; }
.ame-suite .panel, .ame-suite .stats article { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; background: white; }
.ame-suite .stats { grid-template-columns: 1fr 1fr 1.3fr; gap: 18px; }
.ame-suite .stats article { padding: 25px; }
.ame-suite .stats strong { font-weight: 700; font-size: 38px; margin: 24px 0; }
.ame-suite .stats .period { font-size: 25px; }
.ame-suite .stat-top { color: var(--muted); text-transform: uppercase; font-size: 10px; font-weight: 650; letter-spacing: .7px; }
.ame-suite .stat-icon { background: #f3f9fa; }
.ame-suite .period-card .stat-note, .ame-suite .period-card .stat-top { color: var(--muted); }
.ame-suite .button { background: var(--green); border-color: var(--green); border-radius: 7px; font-size: 13px; min-height: 44px; box-shadow: none; }
.ame-suite .button:hover { background: #056b78; }
.ame-suite .button.secondary { background: #f4fafb; color: var(--green); border-color: var(--line); }
.ame-suite input, .ame-suite select { border-color: #cbdce4; border-radius: 7px; box-shadow: none; font-size: 13px; min-height: 44px; }
.ame-suite .filters { flex-wrap: wrap; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.ame-suite .filters > label { min-width: 0; }
.ame-suite .filters input, .ame-suite .filters select { min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
    .ame-suite .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .ame-suite .filters > label, .ame-suite .filters > label:not(.search-label) { min-width: 0; }
    .ame-suite .filters .source-label, .ame-suite .filters .search-label { grid-column: 1 / -1; }
    .ame-suite .filters input, .ame-suite .filters select { width: 100%; font-size: 16px; }
    .ame-suite .filters input[type="month"] { min-inline-size: 0; max-inline-size: 100%; }
    .ame-suite .filters input[type="month"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
    .ame-suite .filters .button { width: 100%; }
    .ame-suite .filters .reset { justify-self: start; align-self: center; padding: 12px; }
}
@media (max-width: 480px) {
    .ame-suite .filters > label { grid-column: 1 / -1; }
}
.ame-suite .chart-panel .chart-picker select { box-shadow: none; border-color: var(--line); }
.ame-suite .section-heading { padding: 25px; }
.ame-suite th { background: #f5f9fa; color: var(--muted); }
.ame-suite footer { background: white; color: var(--muted); }
.ame-suite .guest-shell { background: white; }
.ame-suite .guest-shell main { max-width: none; padding: 0; }
.ame-suite .guest-shell > footer { display: none; }
.ame-suite .login-grid { min-height: 100vh; grid-template-columns: 1fr 1fr; border: 0; border-radius: 0; box-shadow: none; }
.ame-suite .login-intro { background: #f3fafb; padding: 56px 8.5%; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; isolation: auto; }
.ame-suite .login-intro::before { display: none; }
.ame-suite .login-intro .brand { margin: 0; }
.ame-suite .login-intro .ame-logo { width: 166px; height: auto; }
.ame-suite .login-story { margin: auto 0; padding: 80px 0; }
.ame-suite .login-intro h1 { font-size: clamp(32px, 3.2vw, 52px); line-height: 1.12; font-weight: 750; letter-spacing: -1.5px; margin-top: 20px; }
.ame-suite .login-intro .eyebrow { color: #138797; }
.ame-suite .login-intro p { color: #617b8b; max-width: 600px; font-size: 15px; margin-top: 22px; }
.ame-suite .login-location { margin: 0; padding: 0; color: var(--muted); font-size: 12px; }
.ame-suite .login-card { padding: 60px 19.5%; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ame-suite .login-card h2 { font-size: 30px; letter-spacing: -.6px; margin: 28px 0 10px; }
.ame-suite .login-card .muted { font-size: 15px; }
.ame-suite .login-card .button { background: #ff8920; border-color: #ff8920; min-height: 48px; margin-top: 30px; white-space: normal; }
.ame-suite .login-card .button:hover { background: #e9760e; }
.ame-suite .login-card .login-note { font-size: 12px !important; margin-top: 18px; color: var(--muted); }
.ame-suite .notice { margin: 20px 32px; }
@media (max-width: 1050px) {
    .suite-header { flex-wrap: wrap; gap: 0 24px; padding: 18px 24px 0; }
    .suite-header nav { order: 3; width: 100%; overflow-x: auto; }
    .suite-header nav a { padding-block: 18px 15px; }
    .ame-suite .login-card { padding: 50px 10%; }
}
@media (max-width: 760px) {
    .ame-suite .shell main { padding: 28px 18px; }
    .suite-header { padding-inline: 18px; }
    .suite-header .ame-logo { width: 96px; }
    .suite-header nav { gap: 16px; }
    .suite-header nav a { font-size: 12px; gap: 7px; }
    .suite-header .account-name { max-width: 160px; }
    .ame-suite .stats { grid-template-columns: 1fr 1fr; }
    .ame-suite .stats article { padding: 20px; }
    .ame-suite .stats strong { font-size: 30px; }
    .ame-suite .stats .period { font-size: 23px; }
    .ame-suite .login-grid { grid-template-columns: 1fr; }
    .ame-suite .login-intro { padding: 32px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
    .ame-suite .login-intro .ame-logo { width: 125px; }
    .ame-suite .login-story { padding: 48px 0; }
    .ame-suite .login-intro h1 { font-size: 36px; }
    .ame-suite .login-card { padding: 40px 28px 56px; }
    .ame-suite .login-card h2 { margin-top: 18px; }
}
.ame-suite .login-card .button.full { justify-content: center; gap: 10px; }

/* Quiet elevation and staggered entrances for the procurement workspace. */
.ame-suite .shell { background: #f8fbfc; min-height: calc(100vh - 94px); }
.ame-suite .shell .panel,
.ame-suite .shell .stats article,
.ame-suite .shell .filters {
    border-color: #dfe8ed;
    box-shadow: 0 2px 4px #17384703, 0 10px 28px #17384705;
}
.ame-suite .stats article { border-top: 2px solid #acd5da; }
.ame-suite .stats article:nth-child(2) { border-top-color: #bdd7e9; }
.ame-suite .stats article:nth-child(3) { border-top-color: #efd3b8; }
.ame-suite .stat-icon { width: 34px; height: 34px; border: 1px solid #e1edef; border-radius: 10px; }
.ame-suite .filters:focus-within { border-color: #95c5cd; box-shadow: 0 4px 22px #087d8b0a; }
@media (prefers-reduced-motion: no-preference) {
    .ame-suite .stats article,
    .ame-suite .panel,
    .ame-suite .filters {
        transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
    }
    @media (hover: hover) {
        .ame-suite .stats article:hover { transform: translateY(-4px); border-color: #a8cdd3; box-shadow: 0 6px 14px #17384706, 0 18px 36px #1738470c; }
        .ame-suite .panel:hover { border-color: #c8dce3; box-shadow: 0 6px 24px #17384709; }
    }
}

.chart-legends { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.chart-legends .chart-legend { white-space: nowrap; }
.comparison-controls { padding: 0 25px 12px; }
.filter-feedback { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-height: 18px; margin: -14px 0 12px; font-size: 12px; color: var(--muted); }
.filter-feedback .is-error { color: #a33f32; }
.filter-feedback a { color: #087d8b; text-decoration: underline; }
.filter-feedback [hidden] { display: none; }
#dashboard-results { transition: opacity .18s ease; }
#dashboard-results[aria-busy="true"] { opacity: .5; }
.filters[aria-busy="true"] [data-apply-filters]::before { content: ''; width: 12px; height: 12px; border: 2px solid #087d8b35; border-top-color: #087d8b; border-radius: 50%; animation: filter-spin .7s linear infinite; }
@keyframes filter-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    #dashboard-results { transition: none; }
    .filters[aria-busy="true"] [data-apply-filters]::before { animation: none; }
}
.comparison-controls[hidden], .comparison-readout[hidden] { display: none; }
.chart-panel [hidden] { display: none !important; }
.comparison-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.material-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; padding: 4px 25px 25px; }
.material-trend-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; min-width: 0; }
.material-trend-card:focus-within { border-color: #95c5cd; box-shadow: 0 4px 16px #1738470d; }
@media (hover: hover) and (pointer: fine) {
    .material-trend-card:hover { border-color: #95c5cd; box-shadow: 0 6px 16px #17384708, 0 18px 32px #17384712; }
}
@media (prefers-reduced-motion: no-preference) {
    .material-trend-card { transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, border-color .25s ease; }
    @media (hover: hover) and (pointer: fine) {
        .material-trend-card:hover { transform: translateY(-4px); }
    }
}
.material-trend-card h3 { margin: 0 0 20px; font-size: 14px; line-height: 1.4; color: var(--ink); }
.material-trend-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.material-trend-summary strong { font-size: 24px; font-weight: 650; letter-spacing: -.5px; color: var(--ink); }
.material-trend-change { padding: 5px 8px; border-radius: 6px; background: #f1f4f6; color: #687e89; font-size: 12px; font-weight: 600; }
.material-trend-change[data-trend="negative"] { background: #fff0ef; color: #bf3434; }
.material-trend-change[data-trend="positive"] { background: #edf6f7; color: #087d8b; }
.material-trend-date, .material-trend-range { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.material-trend-range { margin-top: 18px; }
.material-trend-card svg { display: block; width: 100%; height: 110px; margin-top: 10px; }
.material-trend-plot { position: relative; padding-top: 54px; margin-top: 8px; }
.material-trend-plot svg { margin-top: 0; touch-action: pan-y; }
.material-trend-plot svg[tabindex] { cursor: crosshair; border-radius: 5px; }
.material-trend-plot svg:focus-visible { outline: 2px solid #087d8b; outline-offset: 3px; }
.material-point-tooltip { position: absolute; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; padding: 7px 9px; background: #fff; border: 1px solid #c4dde2; border-radius: 7px; box-shadow: 0 3px 10px #17384714; pointer-events: none; overflow-wrap: anywhere; }
.material-point-tooltip span { font-size: 10px; color: #687e89; }
.material-point-tooltip strong { font-size: 12px; color: #173847; }
.material-trend-period { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); margin-top: 7px; }
.material-trend-period span:last-child { text-align: right; }
.material-trend-details { display: block; width: 100%; text-align: left; color: #087d8b; border: 0; border-top: 1px solid #edf2f4; background: none; padding: 14px 0 0; margin-top: 16px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.material-trend-details:hover { text-decoration: underline; }
.material-legend button:disabled { cursor: not-allowed; opacity: .35; }
.chart-mode { display: inline-flex; padding: 4px; gap: 4px; background: #f1f7f9; border: 1px solid var(--line); border-radius: 9px; }
.chart-mode button { border: 0; border-radius: 6px; padding: 9px 14px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.chart-mode button[aria-pressed="true"] { background: white; color: var(--green); box-shadow: 0 2px 6px #17384712; font-weight: 650; }
.comparison-controls > p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0; }
.material-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.material-legend button { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; color: var(--ink); cursor: pointer; font: inherit; font-size: 11px; text-align: left; }
.material-legend button[aria-pressed="false"] { opacity: .5; background: #f4f7f8; }
.material-legend button[aria-pressed="true"] { border-color: #8ebdc5; background: #f0f8fa; }
.material-legend i { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; border-radius: 50%; color: white; font-size: 10px; font-style: normal; }
.material-legend small { color: var(--muted); font-size: 10px; }
.comparison-readout { margin: 0 25px 22px; padding: 18px; background: #f7fafb; border: 1px solid var(--line); border-radius: 9px; }
.comparison-readout > strong { display: block; color: var(--ink); font-size: 12px; margin-bottom: 14px; }
.comparison-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px 25px; }
.comparison-values > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 11px; }
.comparison-values span { border-left: 3px solid; padding-left: 8px; }
.comparison-values b { white-space: nowrap; font-weight: 600; text-align: right; }
.comparison-values b small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.comparison-values b small[data-trend="negative"] { color: #bf3434; }
.comparison-values b small[data-trend="positive"] { color: #087d8b; }
@media (max-width: 480px) {
    .comparison-controls { padding-inline: 16px; }
    .comparison-readout { margin-inline: 16px; padding: 12px; }
    .comparison-values { grid-template-columns: 1fr; }
    .material-overview { grid-template-columns: 1fr; padding-inline: 16px; }
}
.chart-panel .chart-legend-missing i { background: transparent; border-top: 2px dashed #4a9fd8; border-radius: 0; height: 0; width: 24px; opacity: .65; }
@media (max-width: 760px) {
    .ame-suite .chart-meta { flex-wrap: wrap; }
    .chart-legends { justify-content: flex-start; }
}
