:root {
    --green-dark: #0d3b2b;
    --green-medium: #18513b;
    --green: #13795b;
    --green-light: #e7f5ee;
    --yellow: #f2b632;
    --background: #f3f7f5;
    --surface: #ffffff;
    --text: #17211c;
    --muted: #68756e;
    --border: #e1e8e4;
    --danger: #b53b35;
    --danger-light: #fdeceb;
    --warning: #b7670c;
    --warning-light: #fff4df;
    --success: #16744a;
    --success-light: #e7f5ed;
    --shadow: 0 12px 32px rgba(18, 61, 43, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
}

button,
input {
    font: inherit;
}

/* Estrutura principal */

.app {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 230px;
    padding: 25px 16px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0c3829 0%, #104a36 100%);
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    min-height: 66px;
    padding: 0 5px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 18px;
}

.brand-logo { display: block; width: 185px; height: auto; }

.brand-icon,
.presentation-logo,
.mobile-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--yellow);
    color: var(--green-dark);
    font-weight: 700;
}

/* Cadastro de produtos */

.management-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 15px;
    align-items: start;
}

.form-panel {
    position: sticky;
    top: 28px;
}

.field-group {
    margin-bottom: 17px;
}

.field-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
}

.field-group label small,
.field-help,
.panel-title small {
    color: var(--muted);
    font-weight: 400;
}

.field-group input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ccd7d1;
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: var(--surface);
}

.field-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 116, 74, 0.12);
}

.input-unit {
    display: grid;
    grid-template-columns: 1fr 44px;
}

.input-unit input {
    border-radius: 9px 0 0 9px;
}

.input-unit span {
    display: grid;
    place-items: center;
    border: 1px solid #ccd7d1;
    border-left: 0;
    border-radius: 0 9px 9px 0;
    color: var(--muted);
    background: var(--background);
    font-size: 12px;
}

.field-help {
    display: block;
    margin-top: 6px;
    font-size: 11px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 23px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
}

.number-cell {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.actions-cell form {
    display: inline;
}

.table-action {
    padding: 4px 6px;
    border: 0;
    color: var(--green);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.danger-text {
    color: var(--danger);
}

.inactive-row {
    opacity: 0.62;
}

/* Cargas */
.operation-form { max-width: 1050px; }
.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section h2 { margin: 0 0 16px; font-size: 16px; }
.form-grid { display: grid; gap: 0 15px; }
.form-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-column { grid-column: 1 / -1; }
.field-group textarea, .field-group select { width: 100%; padding: 11px 12px; border: 1px solid #ccd7d1; border-radius: 9px; outline: none; color: var(--text); background: var(--surface); font: inherit; }
.field-group select { height: 44px; }
.field-group textarea:focus, .field-group select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,116,74,.12); }
.status-rascunho { color: #5f6b65; background: #edf1ef; }
.status-em_conferencia { color: var(--warning); background: var(--warning-light); }
.status-finalizada { color: var(--success); background: var(--success-light); }
.status-cancelada { color: var(--danger); background: var(--danger-light); }
.back-link { display: inline-block; margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 600; text-decoration: none; }
.load-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin-bottom: 15px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--border); }
.load-summary > div { padding: 14px 16px; background: var(--surface); }
.load-summary small, .load-summary strong { display: block; }
.load-summary small { color: var(--muted); font-size: 11px; }
.load-summary strong { margin-top: 5px; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: minmax(300px,360px) minmax(0,1fr); gap: 15px; align-items: start; }
.table-note { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.start-operation { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--border); text-align: right; }
.next-step { margin-top: 18px; padding: 14px; border-radius: 10px; color: var(--green); background: var(--green-light); }
.next-step p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.conference-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 15px; }
.conference-summary article { padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.conference-summary small, .conference-summary strong { display: block; }
.conference-summary small { color: var(--muted); font-size: 11px; }
.conference-summary strong { margin-top: 8px; font-size: 21px; }
.pallet-form-panel, .pallet-list-panel, .comparison-panel { margin-bottom: 15px; }
.pallet-form-grid { display: grid; grid-template-columns: 90px minmax(210px,1.5fr) repeat(3,minmax(130px,1fr)); gap: 0 12px; }
.product-field, .observation-field { grid-column: span 2; }
.calculation-preview { display: grid; grid-template-columns: repeat(3,minmax(130px,1fr)) auto; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 11px; background: var(--background); }
.calculation-preview small, .calculation-preview strong { display: block; }
.calculation-preview small { color: var(--muted); font-size: 10px; }
.calculation-preview strong { margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.difference { color: var(--danger); font-weight: 700; background: var(--danger-light); }
.finish-operation { padding: 5px 0 20px; text-align: right; }
.field-group input[readonly] { color: var(--muted); background: var(--background); cursor: not-allowed; }
.document-actions { display: flex; justify-content: flex-end; margin: -3px 0 15px; }
.reopen-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.reopen-panel p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.reopen-panel form { display: flex; flex: 1; justify-content: flex-end; gap: 8px; }
.reopen-panel input { width: min(380px,100%); height: 44px; padding: 0 12px; border: 1px solid #ccd7d1; border-radius: 9px; }

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
}

.brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 12px;
}

.sidebar nav {
    display: grid;
    gap: 5px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: 0.15s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    color: #ffffff;
    background: var(--green-medium);
}

.sidebar nav a span {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.user-area {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 700;
}

.user-info {
    min-width: 0;
}

.user-info strong,
.user-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info strong {
    font-size: 12px;
}

.user-info small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.logout {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.logout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.content {
    grid-column: 2;
    min-width: 0;
    padding: 28px 30px 40px;
    background-image: radial-gradient(circle at 100% 0, rgba(19, 121, 91, .055), transparent 32%);
}

/* Cabeçalhos e botões */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 650;
}

.page-header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--green);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(19, 121, 91, .13);
}

.primary-button:hover {
    background: #105e3b;
}

.primary-button.compact {
    min-height: 42px;
}

/* Indicadores */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 15px;
}

.metric {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(18, 61, 43, 0.035);
}

.metric span,
.metric strong,
.metric small {
    display: block;
}

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

.metric strong {
    margin-top: 13px;
    font-size: 27px;
    font-weight: 650;
}

.metric small {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.metric.warning strong {
    color: var(--warning);
}

.metric strong em { font-size: 12px; font-style: normal; font-weight: 600; }
.dashboard-filter { display: flex; align-items: end; gap: 10px; margin: -10px 0 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.dashboard-filter div { display: grid; gap: 5px; }
.dashboard-filter label { color: var(--muted); font-size: 10px; font-weight: 600; }
.dashboard-filter input { height: 38px; padding: 0 10px; border: 1px solid #ccd7d1; border-radius: 8px; color: var(--text); background: #fff; font: inherit; }
.dashboard-filter button { height: 38px; padding: 0 14px; border: 0; border-radius: 8px; color: #fff; background: var(--green); font-weight: 600; cursor: pointer; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #f3f8f5; }
.load-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.attention-item a { color: inherit; text-decoration: none; }
.attention-item a:hover { color: var(--green); text-decoration: underline; }
.dashboard-analytics { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 15px; margin-top: 15px; }
.panel-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.product-ranking { display: grid; gap: 14px; margin-top: 16px; }
.ranking-item > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.ranking-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-item span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.ranking-track { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e7eeea; }
.ranking-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg,var(--green),#2f9b69); }
.status-overview { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 16px; }
.status-overview > div { position: relative; padding: 13px 12px 12px 28px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfb; }
.status-overview strong, .status-overview small { display: block; }
.status-overview strong { font-size: 20px; }
.status-overview small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.status-dot { position: absolute; top: 17px; left: 11px; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.status-finalizada { background: var(--success); }
.status-dot.status-em_conferencia { background: var(--warning); }
.status-dot.status-rascunho { background: #7b8781; }
.status-dot.status-cancelada { background: var(--danger); }
.compact-empty { min-height: 120px; }

/* Relatórios */
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border: 1px solid var(--green); border-radius: 9px; color: var(--green); background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.secondary-button:hover { color: #fff; background: var(--green); }
.report-filters { display: grid; grid-template-columns: repeat(4,minmax(145px,1fr)); gap: 2px 12px; margin-bottom: 14px; padding: 15px 17px; }
.report-filters .field-group { margin: 0; }
.report-filters label { margin-top: 0; }
.report-filter-actions { display: flex; align-items: end; justify-content: flex-end; gap: 12px; }
.report-filter-actions a { height: 40px; display: inline-flex; align-items: center; color: var(--muted); font-size: 11px; text-decoration: none; }
.report-filter-actions button { height: 40px; padding: 0 15px; border: 0; border-radius: 8px; color: #fff; background: var(--green); font-weight: 700; cursor: pointer; }
.report-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.report-metrics article { padding: 13px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.report-metrics span, .report-metrics strong { display: block; }
.report-metrics span { color: var(--muted); font-size: 10px; }
.report-metrics strong { margin-top: 6px; font-size: 18px; }
.report-metrics strong em { font-size: 10px; font-style: normal; }
.report-metrics .has-warning strong { color: var(--warning); }
.report-results .panel-title > span { color: var(--muted); font-size: 11px; }
.report-results td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.report-results .num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.divergence-label { color: var(--danger) !important; font-weight: 700; white-space: nowrap; }
.report-results .actions-cell { min-width: 115px; }
.report-results .actions-cell .table-action + .table-action { margin-left: 8px; }

/* Auditoria */
.audit-protection { padding: 8px 11px; border-radius: 999px; color: var(--green); background: var(--green-light); font-size: 10px; font-weight: 700; }
.audit-filters { display: grid; grid-template-columns: repeat(5,minmax(130px,1fr)) auto; gap: 2px 10px; margin-bottom: 14px; padding: 15px 17px; }
.audit-filters .field-group { margin: 0; }
.audit-filters label { margin-top: 0; }
.audit-filter-actions { display: flex; align-items: end; gap: 9px; }
.audit-filter-actions a { height: 40px; display: inline-flex; align-items: center; color: var(--muted); font-size: 11px; text-decoration: none; }
.audit-filter-actions button { height: 40px; padding: 0 13px; border: 0; border-radius: 8px; color: #fff; background: var(--green); font-weight: 700; cursor: pointer; }
.audit-results .panel-title > span { color: var(--muted); font-size: 11px; }
.audit-list { position: relative; display: grid; }
.audit-event { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 9px; padding: 12px 0; border-top: 1px solid var(--border); }
.audit-event:first-child { border-top: 0; }
.audit-marker { width: 9px; height: 9px; margin: 5px 0 0 3px; border: 2px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px #b7d7c7; }
.audit-event-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.audit-event-title strong { font-size: 13px; }
.audit-event-title > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.audit-main p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.audit-details { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.audit-details > span { padding: 4px 7px; border-radius: 6px; color: #46564d; background: #f0f4f2; font-size: 9px; }
.load-history { margin-top: 15px; }
.history-timeline { display: grid; }
.history-timeline article { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); }
.history-timeline article:first-child { border-top: 0; }
.history-dot { width: 8px; height: 8px; margin: 5px 0 0 3px; border-radius: 50%; background: var(--green); }
.history-timeline strong, .history-timeline small { display: block; }
.history-timeline strong { font-size: 12px; }
.history-timeline small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.history-timeline p { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 0; }
.history-timeline p span { padding: 3px 6px; border-radius: 5px; color: var(--muted); background: #f2f5f3; font-size: 9px; }

/* Usuários e perfis */
.user-management { display: grid; grid-template-columns: 1fr; gap: 15px; align-items: start; }
.user-management.with-form { grid-template-columns: minmax(290px,350px) minmax(0,1fr); }
.user-form-panel { position: sticky; top: 28px; }
.current-user-label { display: inline-flex; margin-left: 6px; padding: 2px 5px; border-radius: 5px; color: var(--green); background: var(--green-light); font-size: 8px; font-weight: 700; }
.profile-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.profile-conferente { color: #245b86; background: #e6f1fa; }
.profile-gerente { color: #8b5a09; background: #fff2d9; }
.profile-diretor { color: #70469a; background: #f2eafd; }
.profile-administrador { color: var(--green); background: var(--green-light); }
.users-panel .actions-cell { min-width: 110px; }
.users-panel button[disabled] { opacity: .35; cursor: not-allowed; }
.access-profiles { margin-top: 15px; }
.access-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.access-grid article { padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: #fbfcfb; }
.access-grid article > strong { display: block; margin-top: 10px; font-size: 12px; }
.access-grid ul { margin: 9px 0 0; padding-left: 17px; color: var(--muted); font-size: 10px; line-height: 1.65; }

/* Painéis e tabelas */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 15px;
}

.panel {
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(18, 61, 43, 0.035);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 17px;
}

.panel-title h2 {
    margin: 0;
    font-size: 16px;
}

.panel-title a {
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    padding: 0 10px 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 13px 10px;
    border-top: 1px solid var(--border);
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status.active {
    color: var(--success);
    background: var(--success-light);
}

.status.inactive {
    color: var(--danger);
    background: var(--danger-light);
}

.empty-state {
    min-height: 170px;
    display: grid;
    place-content: center;
    text-align: center;
}

.empty-state strong {
    font-size: 14px;
}

.empty-state p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.attention-item {
    margin-bottom: 10px;
    padding: 13px;
    border-radius: 10px;
    color: var(--danger);
    background: var(--danger-light);
}

.attention-item strong {
    font-size: 13px;
}

.attention-item p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* Mensagens */

.alert {
    margin-bottom: 15px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.alert.success {
    color: var(--success);
    background: var(--success-light);
}

.alert.warning {
    color: var(--warning);
    background: var(--warning-light);
}

.alert.danger {
    color: var(--danger);
    background: var(--danger-light);
}

/* Login */

.login-page {
    display: grid;
    grid-template-columns: minmax(500px, 1.15fr) minmax(430px, 0.85fr);
    min-height: 100vh;
    background: var(--surface);
}

.login-presentation {
    min-height: 100vh;
    background-color: #dcebea;
}

.login-presentation.login-visual {
    background-image:
        linear-gradient(
            90deg,
            rgba(10, 42, 65, 0.05),
            rgba(10, 42, 65, 0)
        ),
        url("../img/login_lira.png");
    background-position: 42% center;
    background-repeat: no-repeat;
    background-size: cover;
}

.presentation-content {
    width: 100%;
    max-width: 470px;
}

.presentation-logo {
    width: 54px;
    height: 54px;
    margin-bottom: 25px;
    border-radius: 15px;
    font-size: 18px;
}

.presentation-content h1 {
    margin: 0;
    font-size: 34px;
}

.presentation-content > p {
    max-width: 430px;
    margin: 12px 0 38px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.presentation-feature {
    display: grid;
    grid-template-columns: 31px 1fr;
    gap: 12px;
    margin-top: 22px;
}

.presentation-feature > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(242, 182, 50, 0.18);
    color: var(--yellow);
}

.presentation-feature strong,
.presentation-feature small {
    display: block;
}

.presentation-feature strong {
    font-size: 14px;
}

.presentation-feature small {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.45;
}

.login-form-area {
    display: grid;
    place-items: center;
    padding: 40px;
    background:
        radial-gradient(circle at 100% 0, rgba(242,182,50,.13), transparent 28%),
        linear-gradient(145deg, #ffffff 0%, #f7faf8 100%);
}

.login-box {
    width: 100%;
    max-width: 410px;
}

.login-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 42px; }
.login-brand img { display: block; width: 205px; height: auto; }
.login-brand span { padding: 6px 9px; border-radius: 999px; color: var(--green); background: var(--green-light); font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }

.login-box h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: 28px;
}

.login-box > p {
    margin: 8px 0 28px;
    color: var(--muted);
    font-size: 14px;
}

.login-box label {
    display: block;
    margin: 17px 0 7px;
    font-size: 13px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    height: 47px;
    padding: 0 13px;
    border: 1px solid #ccd7d1;
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: #ffffff;
}

.login-box input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 116, 74, 0.12);
}

.login-box .primary-button {
    width: 100%;
    margin-top: 24px;
}

.login-footer {
    display: block;
    margin-top: 20px;
    color: var(--muted);
    text-align: center;
}

/* Responsividade */

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-analytics {
        grid-template-columns: 1fr;
    }

    .report-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .report-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .audit-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .user-management.with-form { grid-template-columns: 1fr; }
    .user-form-panel { position: static; }
    .access-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

    .management-grid {
        grid-template-columns: 1fr;
    }

    .form-panel {
        position: static;
    }

    .form-grid.three-columns, .detail-grid { grid-template-columns: 1fr; }

    .load-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .pallet-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .product-field, .observation-field { grid-column: span 1; }
    .conference-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .calculation-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .calculation-preview .primary-button { grid-column: 1 / -1; }
    .reopen-panel, .reopen-panel form { align-items: stretch; flex-direction: column; }
}

@media (max-width: 760px) {
    .app {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        padding: 12px;
    }

    .brand,
    .user-area {
        display: none;
    }

    .sidebar nav {
        display: flex;
        overflow-x: auto;
    }

    .sidebar nav a {
        flex: 0 0 auto;
    }

    .content {
        padding: 20px 15px 30px;
    }

    .login-page {
        display: block;
        min-height: 100vh;
    }

    .login-presentation {
        display: none;
    }

    .login-form-area {
        min-height: 100vh;
        padding: 25px;
    }

    .login-brand { margin-bottom: 32px; }
}

@media (max-width: 480px) {
    .page-header {
        align-items: flex-start;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filters, .report-metrics { grid-template-columns: 1fr; }
    .audit-filters { grid-template-columns: 1fr; }
    .audit-filter-actions { justify-content: stretch; }
    .audit-filter-actions button { flex: 1; }
    .access-grid { grid-template-columns: 1fr; }
    .report-filter-actions { justify-content: stretch; }
    .report-filter-actions button { flex: 1; }
    .report-export { width: 100%; }

    .dashboard-filter button {
        margin-top: 3px;
    }

    .ranking-item > div:first-child {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .page-header h1 {
        font-size: 23px;
    }

    .form-grid.two-columns, .load-summary, .pallet-form-grid, .conference-summary, .calculation-preview { grid-template-columns: 1fr; }
}
