:root {
    --aq-ink: #263746;
    --aq-muted: #6a7884;
    --aq-border: #dce4e9;
    --aq-surface: #fff;
    --aq-background: #f4f7f8;
    --aq-accent: #a9543b;
    --aq-accent-dark: #88412e;
    --aq-nav: #1f3445;
}

html { min-width: 320px; }
body.aq-body {
    margin: 0;
    background: var(--aq-background);
    color: var(--aq-ink);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.aq-app {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}
.aq-sidebar {
    background: var(--aq-nav);
    color: #e8eef1;
    padding: 24px 14px;
}
.aq-brand {
    display: flex;
    gap: 11px;
    align-items: center;
    padding: 4px 10px 26px;
    color: #fff;
    text-decoration: none;
}
.aq-brand:hover { color: #fff; }
.aq-brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 10px;
    background: var(--aq-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .03em;
}
.aq-brand-globe {
    background-color: transparent;
    background-image: url("../../site/_images/araken-domarco-final.svg");
    background-repeat: no-repeat;
    background-size: 310px auto;
    background-position: 0 center;
}
.aq-brand strong, .aq-brand small { display: block; }
.aq-brand strong { font-size: 14px; line-height: 1.15; }
.aq-brand small { color: #adbbc4; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.aq-navigation { display: grid; gap: 5px; }
.aq-menu-toggle { display: none; }
.aq-navigation a, .aq-nav-group summary {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #d9e2e8;
    text-decoration: none;
    font-size: 13px;
}
.aq-navigation a:hover, .aq-nav-group summary:hover { background: #30495c; color: #fff; }
.aq-navigation a.is-active { background: #405b70; color: #fff; font-weight: 650; }
.aq-nav-group summary { cursor: pointer; font-weight: 650; }
.aq-nav-group summary::marker { color: #a8b9c3; }
.aq-nav-links { padding: 1px 0 7px 14px; }
.aq-nav-links a { padding: 6px 12px; }
.aq-main { min-width: 0; display: flex; flex-direction: column; }
.aq-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 96px;
    padding: 19px 32px;
    border-bottom: 1px solid var(--aq-border);
    background: var(--aq-surface);
}
.aq-logo { display: block; width: clamp(230px, 24vw, 360px); height: auto; max-height: 70px; object-fit: contain; flex: none; }
.aq-eyebrow { color: var(--aq-accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.aq-topbar h1 { margin: 3px 0 0; color: var(--aq-ink); font-size: clamp(20px, 2vw, 27px); font-weight: 650; }
.aq-user { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; color: var(--aq-muted); font-size: 13px; }
.aq-user span + span { color: var(--aq-ink); font-weight: 650; }
.aq-user a { color: var(--aq-accent-dark); font-weight: 650; text-decoration: none; }
.aq-user a:hover { text-decoration: underline; }
.aq-content { width: 100%; flex: 1; padding: 28px 32px; overflow-x: auto; }
.aq-content fieldset {
    min-width: 0;
    margin: 0 0 22px;
    padding: 21px;
    border: 1px solid var(--aq-border);
    border-radius: 12px;
    background: var(--aq-surface);
    box-shadow: 0 2px 10px rgba(25, 52, 68, .035);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
.aq-content td, .aq-content b, .aq-content legend { font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important; }
.aq-content legend {
    float: none;
    width: auto;
    margin: 0 0 5px;
    padding: 0 7px;
    color: var(--aq-ink);
    font-size: 16px;
    font-weight: 650;
}
.aq-content form { margin: 0 0 18px; }
.aq-content .aq-list-form { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.aq-content table { max-width: 100%; color: var(--aq-ink); }
.aq-content table[border="1"] {
    border: 0 !important;
    border-collapse: collapse !important;
    background: #fff;
}
.aq-content table[border="1"] > tbody > tr > td {
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #e9eef1;
    vertical-align: middle;
}
.aq-content td[bgcolor="#C0C0C0"], .aq-content td[bgcolor="#c0c0c0"] {
    background: #eaf0f3 !important;
    color: var(--aq-ink) !important;
    font-weight: 650;
}
.aq-content font { color: inherit !important; font-family: inherit !important; font-size: inherit !important; }
.aq-content p { margin: 0; }
.aq-content input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.aq-content select, .aq-content textarea {
    max-width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #cdd9df;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: var(--aq-ink);
    font: inherit !important;
}
.aq-content textarea { min-height: 110px; }
.aq-content input:focus, .aq-content select:focus, .aq-content textarea:focus {
    border-color: var(--aq-accent);
    box-shadow: 0 0 0 3px rgba(169, 84, 59, .12);
}
.aq-content input[type="submit"], .aq-content input[type="button"], .aq-content input[type="reset"], .aq-content button {
    min-height: 35px;
    margin: 3px 5px 3px 0;
    padding: 5px 12px;
    border: 1px solid #cbd8df;
    border-radius: 7px;
    background: #fff;
    color: var(--aq-ink);
    font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif !important;
    cursor: pointer;
}
.aq-content input[type="submit"]:hover, .aq-content input[type="button"]:hover,
.aq-content input[type="reset"]:hover, .aq-content button:hover { background: #edf2f4; }
.aq-content input[value="Salvar"], .aq-content input[value="Entrar"], .aq-content input[value="Procurar"],
.aq-content input[value="  Novo  "] {
    border-color: var(--aq-accent);
    background: var(--aq-accent);
    color: #fff;
}
.aq-content input[value="Salvar"]:hover, .aq-content input[value="Entrar"]:hover,
.aq-content input[value="Procurar"]:hover, .aq-content input[value="  Novo  "]:hover { background: var(--aq-accent-dark); }
.aq-content input[value="Excluir"] { border-color: #e8b9b4; color: #a33131; }
.aq-content a { color: #315f77; text-decoration: none; }
.aq-content a:hover { color: var(--aq-accent-dark); text-decoration: underline; }
.aq-dashboard { margin-bottom: 32px; }
.aq-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}
.aq-section-kicker {
    color: var(--aq-accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.aq-section-heading h2 { margin: 2px 0 0; font-size: 22px; font-weight: 650; }
.aq-section-action { font-size: 13px; font-weight: 650; }
.aq-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.aq-stat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 134px;
    padding: 20px 22px;
    border: 1px solid var(--aq-border);
    border-radius: 12px;
    background: var(--aq-surface);
    box-shadow: 0 2px 10px rgba(25, 52, 68, .035);
    text-decoration: none !important;
}
.aq-content a.aq-stat-card { color: var(--aq-ink); }
.aq-content a.aq-stat-card:hover { border-color: #b9cbd2; color: var(--aq-ink); box-shadow: 0 5px 18px rgba(25, 52, 68, .08); }
.aq-stat-label { color: var(--aq-muted); font-size: 13px; font-weight: 600; }
.aq-stat-value { color: var(--aq-ink); font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1; }
.aq-notice-list { display: grid; gap: 12px; }
.aq-notice-card, .aq-empty-notices {
    padding: 18px 22px;
    border: 1px solid var(--aq-border);
    border-radius: 12px;
    background: var(--aq-surface);
    box-shadow: 0 2px 10px rgba(25, 52, 68, .035);
}
.aq-notice-card { border-left: 3px solid var(--aq-accent); }
.aq-notice-meta { margin-bottom: 7px; color: var(--aq-accent-dark); font-size: 12px; font-weight: 700; }
.aq-content .aq-notice-card p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.aq-empty-notices { color: var(--aq-muted); }
.aq-footer {
    padding: 16px 32px;
    border-top: 1px solid #d8e3e1;
    background: #eef4f2;
}
.aq-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    max-width: 1600px;
    margin: auto;
}
.aq-footer-product img {
    display: block;
    width: 220px;
    height: 66px;
    object-fit: cover;
    object-position: center;
}
.aq-footer-signature { display: flex; align-items: center; gap: 12px; }
.aq-footer-signature span {
    color: #58736d;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.aq-footer-signature img {
    display: block;
    width: 154px;
    height: 99px;
    object-fit: contain;
}
.aq-login .aq-app { display: block; }
.aq-login .aq-main { max-width: 520px; min-height: 100vh; margin: 0 auto; justify-content: center; }
.aq-login .aq-topbar { align-items: flex-start; flex-direction: column; gap: 2px; border: 0; border-radius: 12px 12px 0 0; }
.aq-login .aq-logo { width: 340px; max-width: 100%; }
.aq-login .aq-content { flex: none; padding: 0 20px 20px; background: #fff; border-radius: 0 0 12px 12px; }
.aq-login .aq-footer { margin-top: 18px; border-radius: 10px; }
.aq-login .aq-footer-product img { width: 165px; height: 55px; }
.aq-login .aq-footer-signature { align-items: flex-end; flex-direction: column; gap: 0; }
.aq-login .aq-footer-signature img { width: 125px; height: 80px; }
@media (max-width: 850px) {
    .aq-app { display: block; }
    .aq-sidebar { padding: 14px; }
    .aq-brand { padding-bottom: 8px; }
    .aq-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #536b7b;
        border-radius: 8px;
        background: #30495c;
        color: #fff;
        font: 650 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
        cursor: pointer;
    }
    .aq-menu-toggle span { font-size: 17px; line-height: 1; }
    .aq-navigation { display: block; max-height: min(65vh, 420px); overflow-y: auto; margin-top: 8px; }
    .aq-menu-ready .aq-navigation { display: none; }
    .aq-menu-ready .aq-navigation.is-open { display: block; }
    .aq-nav-group[open] .aq-nav-links {
        position: static;
        max-height: none;
        padding: 0 0 7px 14px;
        background: transparent;
    }
    .aq-topbar { padding: 18px 20px; }
    .aq-content { padding: 20px; }
    .aq-footer { padding: 12px 20px; }
    .aq-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
    .aq-logo { max-width: 100%; }
    .aq-topbar { align-items: flex-start; flex-direction: column; }
    .aq-content fieldset { padding: 13px; }
    .aq-content table[border="1"] > tbody > tr > td { padding: 7px; }
    .aq-content .aq-list-form > table { min-width: 560px; }
    .aq-content form[name="FrmEdicao"] { overflow-x: auto; }
    .aq-content form[name="FrmEdicao"] > table,
    .aq-content form[name="FrmEdicao"] > table > tbody,
    .aq-content form[name="FrmEdicao"] > table > tbody > tr {
        display: block;
        width: 100% !important;
    }
    .aq-content form[name="FrmEdicao"] > table > tbody > tr { padding: 5px 0; border-bottom: 1px solid #e9eef1; }
    .aq-content form[name="FrmEdicao"] > table > tbody > tr > td {
        display: block;
        width: 100% !important;
        padding: 4px 5px;
        border-bottom: 0;
    }
    .aq-content form[name="FrmEdicao"] input[type="text"],
    .aq-content form[name="FrmEdicao"] input[type="password"],
    .aq-content form[name="FrmEdicao"] select,
    .aq-content form[name="FrmEdicao"] textarea { width: 100%; }
    .aq-footer-inner { flex-direction: column; gap: 8px; }
    .aq-footer-signature { flex-direction: column; gap: 0; }
    .aq-login .aq-footer-signature { align-items: center; }
    .aq-stat-grid { gap: 10px; }
    .aq-stat-card { min-height: 110px; padding: 16px; }
    .aq-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}
