:root {
    --ink: #202733;
    --muted: #6f7b89;
    --navy: #202b38;
    --navy-light: #2c3b4b;
    --yellow: #f7d928;
    --yellow-dark: #dabd12;
    --red: #d93a32;
    --red-dark: #b92823;
    --green: #2aaa77;
    --border: #e2e7ec;
    --background: #f4f6f8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

a {
    color: var(--red);
}

a:hover,
a:focus {
    color: var(--red-dark);
}

.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: none;
    vertical-align: middle;
}

.btn {
    border-radius: 7px;
    font-weight: 600;
}

.btn-primary {
    border-color: var(--red);
    background: var(--red);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.form-control {
    border-color: #d7dee5;
    border-radius: 7px;
    box-shadow: none;
}

.form-control:focus {
    border-color: #e2bf15;
    box-shadow: 0 0 0 3px rgba(247, 217, 40, .18);
}

.auth-page {
    min-height: 100vh;
    background: #fff;
}

.auth-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr);
}

.auth-presentation {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 70px;
    color: #fff;
    background: var(--navy);
}

.auth-presentation:before,
.auth-presentation:after {
    position: absolute;
    border-radius: 28px;
    background: var(--yellow);
    content: "";
    transform: rotate(-8deg);
}

.auth-presentation:before {
    right: -100px;
    bottom: -170px;
    width: 420px;
    height: 420px;
    opacity: .12;
}

.auth-presentation:after {
    top: -90px;
    right: 80px;
    width: 170px;
    height: 170px;
    opacity: .08;
}

.auth-presentation-content {
    position: relative;
    width: 100%;
    max-width: 660px;
    z-index: 1;
}

.poster-label,
.eyebrow {
    color: #b28e00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.auth-presentation .poster-label {
    color: var(--yellow);
}

.auth-presentation h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 4.6vw, 66px);
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.02;
}

.auth-presentation p {
    max-width: 570px;
    margin: 0;
    color: #c5d0db;
    font-size: 17px;
    line-height: 1.65;
}

.auth-poster-preview {
    display: grid;
    width: 340px;
    min-height: 210px;
    padding: 26px 30px;
    margin-top: 42px;
    color: #171717;
    background: var(--yellow);
    box-shadow: 15px 15px 0 rgba(0, 0, 0, .22);
    transform: rotate(-2deg);
}

.auth-poster-preview small {
    color: var(--red);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .08em;
}

.auth-poster-preview strong {
    font-size: 29px;
    font-weight: 900;
}

.auth-poster-preview span {
    justify-self: end;
    font-size: 65px;
    font-weight: 900;
    letter-spacing: -4px;
    line-height: .9;
}

.auth-poster-preview sup {
    font-size: 15px;
    letter-spacing: 0;
}

.auth-poster-preview em {
    font-size: 32px;
    font-style: normal;
    letter-spacing: -2px;
}

.auth-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 55px;
}

.brand-lockup > span:last-child {
    display: flex;
    flex-direction: column;
}

.brand-lockup strong {
    font-size: 18px;
}

.brand-lockup small {
    color: var(--muted);
    font-size: 11px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: none;
    place-items: center;
    border-radius: 9px 15px 9px 15px;
    color: #171717;
    background: var(--yellow);
    font-size: 22px;
    font-weight: 900;
    box-shadow: inset -5px -5px 0 rgba(0, 0, 0, .08);
    transform: rotate(-3deg);
}

.auth-card h2 {
    margin-bottom: 7px;
    font-size: 29px;
    font-weight: 750;
}

.auth-card .text-muted {
    margin-bottom: 30px;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card label {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 6px 8px;
    border: 0;
    color: var(--red);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    transform: translateY(-50%);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 250px;
    height: 100vh;
    flex: none;
    flex-direction: column;
    color: #cfd9e2;
    background: var(--navy);
    z-index: 1041;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 17px 21px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: #fff;
    text-decoration: none;
}

.sidebar-brand-text strong,
.sidebar-brand-text small,
.sidebar-user-text strong,
.sidebar-user-text small {
    display: block;
}

.sidebar-brand-text strong {
    font-size: 19px;
}

.sidebar-brand-text small,
.sidebar-user-text small {
    color: #93a4b5;
    font-size: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.user-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: none;
    place-items: center;
    border-radius: 50%;
    color: var(--yellow);
    background: rgba(247, 217, 40, .12);
    font-weight: 800;
}

.sidebar-user-text {
    min-width: 0;
}

.sidebar-user-text strong {
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px;
}

.nav-title {
    display: block;
    padding: 14px 12px 6px;
    color: #73879a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    padding: 10px 13px;
    margin: 2px 0;
    border-radius: 7px;
    color: #c3cfda;
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
}

.sidebar nav a .icon {
    color: #91a4b5;
}

.sidebar nav a:hover,
.sidebar nav a:focus {
    color: #fff;
    background: var(--navy-light);
}

.sidebar nav a.active {
    color: #fff;
    background: #344455;
    box-shadow: inset 3px 0 0 var(--yellow);
}

.sidebar nav a.active .icon {
    color: var(--yellow);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #8fa1b1;
    font-size: 11px;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(42, 170, 119, .14);
}

.app-main {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 64px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: #4f5f70;
    background: #fff;
}

.topbar-path {
    overflow: hidden;
    color: #627182;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-path em {
    padding: 0 8px;
    color: #c0c7cf;
    font-style: normal;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    color: #688075;
    font-size: 11px;
    white-space: nowrap;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.page-heading h1 {
    margin: 5px 0 4px;
    font-size: 25px;
    font-weight: 750;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.page-actions {
    flex: none;
}

.content {
    width: 100%;
    max-width: none;
    flex: 1;
    padding: 28px 32px;
    margin: 0;
}

.app-footer {
    padding: 4px 32px 22px;
    color: #8995a2;
    font-size: 11px;
}

.metric-grid {
    display: grid;
    margin-bottom: 24px;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel-card,
.module-notice {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(31, 45, 59, .035);
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.metric-card:after {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--yellow);
    content: "";
}

.metric-card .icon {
    width: 24px;
    height: 24px;
    color: var(--red);
}

.metric-card strong {
    display: block;
    margin: 16px 0 3px;
    font-size: 30px;
}

.metric-card span {
    color: var(--muted);
    font-size: 12px;
}

.panel-card {
    overflow: hidden;
    margin-bottom: 22px;
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 21px;
    border-bottom: 1px solid var(--border);
}

.panel-card-header strong {
    display: block;
    font-size: 15px;
}

.panel-card-header small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.panel-card-body {
    padding: 22px;
}

.quick-actions {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
}

.quick-action:hover,
.quick-action:focus {
    border-color: #e6ca2c;
    color: var(--ink);
    background: #fffdf2;
    text-decoration: none;
}

.quick-action .icon {
    width: 25px;
    height: 25px;
    color: var(--red);
}

.quick-action strong,
.quick-action small {
    display: block;
}

.quick-action small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.module-notice {
    padding: 34px;
    text-align: center;
}

.module-notice .icon {
    width: 46px;
    height: 46px;
    margin-bottom: 13px;
    color: var(--red);
}

.module-notice h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.module-notice p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.65;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.status-active {
    color: #18744e;
    background: #e6f7ef;
}

.status-inactive {
    color: #8a4550;
    background: #f8e9ec;
}

.table > thead > tr > th {
    border-bottom-width: 1px;
    color: #596777;
    font-size: 11px;
    text-transform: uppercase;
}

.table > tbody > tr > td {
    vertical-align: middle;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 18px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.filter-bar,
.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-bar .form-control {
    width: auto;
    min-width: 190px;
}

.filter-bar input.form-control {
    min-width: 290px;
    flex: 1;
}

.inline-form {
    display: inline-block;
    margin: 1px 0;
}

.actions-cell {
    min-width: 350px;
    white-space: nowrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
}

.action-btn:hover, .action-btn:focus { text-decoration: none; }
.action-btn:focus-visible { outline: 2px solid #263d55; outline-offset: 2px; }
.action-btn .icon { width: 15px; height: 15px; }
.action-view { color: #245d80; background: #edf5fa; border-color: #d5e7f1; }
.action-view:hover, .action-view:focus { color: #174968; background: #dcecf5; }
.action-edit { color: #40546a; background: #f0f3f6; border-color: #dde4eb; }
.action-edit:hover, .action-edit:focus { color: #293d50; background: #e1e8ef; }
.action-archive { color: #806416; background: #fbf7e9; border-color: #eee4c3; }
.action-archive:hover, .action-archive:focus { color: #684e0b; background: #f5edcf; }
.action-delete { color: #a52c2c; background: #fcf0f0; border-color: #f1d7d7; }
.action-delete:hover, .action-delete:focus { color: #842020; background: #f7dfdf; }

.price-cell {
    font-weight: 750;
    white-space: nowrap;
}

.empty-state {
    padding: 34px !important;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 16px;
}

.list-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--yellow);
    border-radius: 10px;
    background: #fff;
}

.list-summary h2 {
    margin: 5px 0;
    font-size: 21px;
}

.list-summary p {
    margin: 0;
    color: var(--muted);
}

.list-summary-meta {
    display: flex;
    gap: 24px;
}

.list-summary-meta span,
.list-summary-meta strong {
    display: block;
    text-align: center;
}

.list-summary-meta span {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.list-summary-meta strong {
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 15px;
    text-transform: none;
}

.status-rascunho {
    color: #685b15;
    background: #fff7c7;
}

.status-revisao {
    color: #255f85;
    background: #e4f2fb;
}

.status-finalizada {
    color: #18744e;
    background: #e6f7ef;
}

.status-arquivada {
    color: #68727d;
    background: #edf0f3;
}

.menu-backdrop {
    display: none;
}

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-presentation {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: -265px;
        transition: left .2s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .menu-toggle {
        display: grid;
    }

    .menu-backdrop {
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(18, 27, 36, .55);
        z-index: 1040;
    }

    .menu-open .menu-backdrop {
        display: block;
    }
}

@media (max-width: 767px) {
    .auth-form-area {
        padding: 30px 22px;
    }

    .brand-lockup {
        margin-bottom: 38px;
    }

    .topbar {
        padding: 0 18px;
    }

    .topbar-status {
        display: none;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px 20px;
    }

    .content {
        padding: 20px;
    }

    .metric-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .app-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .filter-bar,
    .filter-bar .form-control,
    .filter-bar input.form-control,
    .filter-bar .btn {
        width: 100%;
        min-width: 0;
    }

    .list-summary,
    .list-summary-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .list-summary-meta {
        width: 100%;
        gap: 10px;
    }

    .list-summary-meta span,
    .list-summary-meta strong {
        text-align: left;
    }
}

/* Área de trabalho fluida e leitura confortável nas telas administrativas. */
.app-main .page-heading p{font-size:14px;line-height:1.5}
.app-main .content > .alert{font-size:14px;line-height:1.6}
.app-main .content .panel-card .table{font-size:14px;line-height:1.5}
.app-main .content .panel-card .table > thead > tr > th{font-size:12px;padding:12px 10px;white-space:nowrap}
.app-main .content .panel-card .table > tbody > tr > td{padding:12px 10px}
.app-main .content .panel-card .table small{font-size:13px;line-height:1.5}
.app-main .content .panel-card .action-btn{font-size:13px;min-height:34px;padding:7px 10px}
.app-main .content .panel-card .form-control{font-size:14px;min-height:38px}
.app-main .content .panel-card .btn{font-size:14px;min-height:38px}
.app-main .content .panel-card-header small{font-size:13px}
