:root {
    --brand-coral: #ff8b6a;
    --brand-coral-light: #ffb399;
    --brand-coral-lighter: #ffdacc;
    --brand-coral-dark: #ff6b42;

    --brand-black: #000000;
    --brand-gray-900: #1a1a1a;
    --brand-gray-800: #333333;
    --brand-gray-600: #6b6b6b;
    --brand-gray-400: #9b9b9b;
    --brand-gray-200: #e5e5e5;
    --brand-gray-100: #f5f5f5;
    --brand-gray-50: #fafafa;
    --accent: #fff5f2;
    --input-background: #f9f9f9;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --sidebar-width: 256px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--brand-gray-50);
    color: var(--brand-gray-900);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
}

a {
    color: inherit;
}

.app-mobile-header {
    display: none;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--brand-gray-200);
    display: flex;
    flex-direction: column;
    z-index: 600;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--brand-gray-200);
}

.sidebar-brand img {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
}

.sidebar-brand-text {
    display: none;
}

.sidebar-close {
    margin-left: auto;
    display: none;
    border: 1px solid var(--brand-gray-200);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--brand-gray-800);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brand-gray-800);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-link:hover {
    background: #fff5f2;
}

.sidebar-link.is-active {
    background: var(--brand-coral);
    color: #ffffff;
}

.sidebar-link-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-gray-800);
    flex: 0 0 22px;
}

.sidebar-link-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-link.is-active .sidebar-link-icon {
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 12px 16px;
    border-top: 1px solid var(--brand-gray-200);
}

.sidebar-meta {
    color: var(--brand-gray-600);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.sidebar-footer .logout-form {
    margin: 0;
}

.sidebar-footer button {
    width: 100%;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--brand-gray-800);
    font-size: 13px;
    font-weight: 500;
    min-height: 36px;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.sidebar-footer button:hover {
    background: #fff5f2;
    border-color: #efc5b8;
}

.sidebar-overlay {
    display: none;
}

.app-sidebar ~ .page-content {
    margin-left: var(--sidebar-width);
}

.page-content {
    padding: 24px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-heading-main {
    min-width: 0;
}

.page-content h1 {
    margin: 0;
    color: var(--brand-gray-900);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.35;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--brand-gray-600);
    font-size: 14px;
    line-height: 1.4;
}

.page-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

[data-filtros] .btn-consultar,
[data-filtros] input[type="submit"],
.page-heading-actions .btn-primary,
.page-heading-actions [data-acao="incluir"] {
    min-height: 40px;
    border: 1px solid var(--brand-coral);
    border-radius: var(--radius-md);
    background: var(--brand-coral);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
}

[data-filtros] .btn-consultar:hover,
[data-filtros] input[type="submit"]:hover,
.page-heading-actions .btn-primary:hover,
.page-heading-actions [data-acao="incluir"]:hover {
    background: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
}

[data-filtros] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.filter-grid {
    width: 100%;
}

.filter-main-row,
.filter-aux-row {
    display: grid;
    gap: 12px;
    align-items: center;
}

.filter-main-row {
    grid-template-columns: 1fr auto;
}

.filter-main-row .filter-full {
    grid-column: 1 / -1;
}

.filter-aux-row.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-aux-row.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-control {
    position: relative;
}

.filter-control .filter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-gray-400);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.filter-control input[type="text"] {
    padding-left: 36px;
}

.filter-label {
    display: block;
    color: var(--brand-gray-600);
    font-size: 12px;
    margin: 0 0 4px;
}

.filter-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-gray-600);
    font-size: 13px;
}

.filter-counter svg {
    width: 16px;
    height: 16px;
}

.page-filter-meta {
    margin-top: 10px;
    color: var(--brand-gray-600);
    font-size: 13px;
    line-height: 1.4;
}

.page-filter-meta:empty {
    display: none;
}

.page-panel {
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.page-filters-panel {
    margin-bottom: 12px;
}

.page-table-panel {
    padding: 0;
    overflow: hidden;
}

.page-table-panel hr {
    display: none;
}

[data-filtros] input[type="text"],
[data-filtros] input[type="date"],
[data-filtros] input[type="number"],
[data-filtros] select,
[data-filtros] input[type="submit"],
[data-filtros] button {
    width: 100%;
}

[data-filtros] .filter-main-row input[type="submit"],
[data-filtros] .filter-main-row button[data-acao="consultar"] {
    width: auto;
}

[data-filtros] input[type="submit"],
[data-filtros] button[data-acao="consultar"] {
    min-width: 110px;
}

.page-content input[type="text"],
.page-content input[type="date"],
.page-content input[type="number"],
.page-content input[type="email"],
.page-content input[type="password"],
.page-content select,
.page-content textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: var(--input-background);
    color: var(--brand-gray-900);
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.page-content textarea {
    min-height: 88px;
    resize: vertical;
}

.page-content input:focus,
.page-content select:focus,
.page-content textarea:focus {
    outline: none;
    border-color: var(--brand-coral-light);
    box-shadow: 0 0 0 3px rgba(255, 139, 106, 0.2);
}

/* Garante espaço para o placeholder/texto não sobrepor o ícone de busca. */
.page-content .filter-control input[type="text"] {
    padding-left: 36px;
}

.page-content input[type="submit"],
.page-content button {
    min-height: 40px;
    border: 1px solid var(--brand-coral);
    border-radius: var(--radius-md);
    background: var(--brand-coral);
    color: #ffffff;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    transition: background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.page-content input[type="submit"]:hover,
.page-content button:hover {
    background: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
    transform: translateY(-1px);
}

.page-content button:disabled,
.page-content input[type="submit"]:disabled {
    background: #f3c3b3;
    border-color: #f3c3b3;
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.page-actions button {
    background: #ffffff;
    border-color: var(--brand-gray-200);
    color: var(--brand-gray-800);
}

.page-actions button[data-acao="incluir"] {
    background: var(--brand-coral);
    border-color: var(--brand-coral);
    color: #ffffff;
}

.page-actions button:hover {
    border-color: #efc5b8;
    background: #fff5f2;
    color: var(--brand-gray-900);
}

.page-actions button[data-acao="incluir"]:hover {
    background: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
    color: #ffffff;
}

.page-actions button:disabled {
    background: #f5f5f5;
    border-color: var(--brand-gray-200);
    color: var(--brand-gray-400);
}

.page-actions .action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--brand-coral);
    border-radius: var(--radius-md);
    background: var(--brand-coral);
    color: #ffffff;
    font-weight: 600;
    padding: 8px 14px;
    text-decoration: none;
    transition: background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.page-actions .action-link:hover {
    background: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
    transform: translateY(-1px);
}

.page-actions.page-actions-secondary {
    margin-top: -4px;
}

.page-actions.page-actions-secondary button {
    border-color: var(--brand-gray-200);
    background: #ffffff;
    color: var(--brand-gray-800);
}

.page-actions.page-actions-secondary button:hover {
    background: var(--accent);
    border-color: #efc5b8;
}

.ui-state {
    margin: 10px 0 14px;
}

.ui-state-item {
    display: none;
    padding: 12px 14px;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--brand-gray-800);
}

.page-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: none;
}

.page-content thead th {
    background: #ffffff;
    color: var(--brand-gray-600);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 500;
    text-align: left;
    border-bottom: 1px solid var(--brand-gray-200);
    padding: 12px 14px;
}

.page-content tbody td {
    border-bottom: 1px solid var(--brand-gray-100);
    padding: 12px 14px;
    color: var(--brand-gray-900);
    font-size: 14px;
    text-align: left;
}

.page-content tbody tr:last-child td {
    border-bottom: 0;
}

.page-content tbody tr:hover {
    background: var(--brand-gray-50);
}

.table-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.table-row-actions button {
    background: transparent !important;
    border: 0 !important;
    min-height: auto !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transform: none !important;
}

.table-row-actions button[data-row-action="edit"] {
    color: var(--brand-coral);
}

.table-row-actions button[data-row-action="edit"]:hover {
    color: var(--brand-coral-dark);
}

.table-row-actions button[data-row-action="delete"] {
    color: #dc2626;
}

.table-row-actions button[data-row-action="delete"]:hover {
    color: #b91c1c;
}

.table-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.table-badge.success {
    background: #d9f7e4;
    color: #097343;
}

.table-badge.warning {
    background: #fff1cc;
    color: #a46900;
}

.table-badge.neutral {
    background: #f3f4f6;
    color: #4b5563;
}

.table-badge.info {
    background: #e6efff;
    color: #1d4ed8;
}

.lookup-input-group {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 8px;
    align-items: center;
}

.lookup-input-group .btnLookupBusca {
    width: 42px;
    min-height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 0;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lookup-input-group .btnLookupBusca svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.lookup-picker-modal .modal-header {
    cursor: default;
}

.lookup-picker-content {
    padding: 0 20px 20px;
}

.lookup-picker-body {
    padding-top: 24px;
}

.lookup-picker-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.lookup-picker-search {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px 8px 36px;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: var(--input-background);
    color: var(--brand-gray-900);
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.lookup-picker-search:focus {
    outline: none;
    border-color: var(--brand-coral-light);
    box-shadow: 0 0 0 3px rgba(255, 139, 106, 0.2);
}

.lookup-picker-meta {
    margin: 0;
    color: var(--brand-gray-600);
    font-size: 13px;
    line-height: 1.4;
}

.lookup-picker-list {
    margin-top: 10px;
    max-height: 52vh;
    overflow-y: auto;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.lookup-picker-item {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--brand-gray-200);
    background: #ffffff;
    color: var(--brand-gray-900);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    transition: background-color 180ms ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lookup-picker-item:last-child {
    border-bottom: 0;
}

.lookup-picker-item:hover,
.lookup-picker-item:focus {
    background: var(--accent);
    outline: none;
}

.lookup-picker-item-title {
    color: var(--brand-gray-900);
    font-size: 14px;
    font-weight: 500;
}

.lookup-picker-item-meta {
    color: var(--brand-gray-600);
    font-size: 12px;
}

.lookup-picker-message {
    padding: 14px;
    margin: 0;
    color: var(--brand-gray-600);
    font-size: 14px;
}

.lookup-picker-message-error {
    color: var(--error);
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 16, 25, 0.42);
    backdrop-filter: blur(1px);
}

.modal-content {
    background: #ffffff;
    padding: 0 20px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid #f0dfd9;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(var(--modal-width, 860px), calc(100vw - 20px));
    box-shadow: var(--shadow-lg);
}

.modal-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    margin: -20px -20px 0;
    padding: 14px 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--brand-gray-200);
    cursor: move;
}

.modal-header h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.4;
}

.modal-header .close {
    cursor: pointer;
    font-size: 26px;
    color: var(--brand-gray-600);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
}

.modal-content form > *:first-child {
    margin-top: 4px;
}

.modal-content form > input[type="hidden"]:first-child + * {
    margin-top: 8px;
}

.form-grid-2,
.form-grid-3 {
    display: grid;
    gap: 12px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-col-span-2 {
    grid-column: span 2;
}

.modal-content label {
    color: var(--brand-gray-800);
    font-size: 15px;
    font-weight: 500;
}

.modal-content button[type="submit"] {
    align-self: flex-end;
    min-width: 120px;
    margin-top: 6px;
}

.lookup-modal .modal-content {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lookup-modal .modal-header {
    margin: 0;
}

.lookup-modal-frame {
    height: min(76vh, 760px);
    flex: 1 1 auto;
    background: #ffffff;
}

.lookup-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.lookup-modal-footer {
    position: sticky;
    bottom: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--brand-gray-200);
    background: #ffffff;
    display: flex;
    justify-content: flex-start;
    z-index: 2;
}

.modal-footer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-footer-actions .btn-secondary {
    border: 1px solid var(--brand-gray-200);
    background: #ffffff;
    color: var(--brand-gray-800);
}

.modal-footer-actions .btn-secondary:hover {
    background: var(--brand-gray-50);
    border-color: #d1d5db;
}

.modal-footer-actions .btn-primary {
    border: 1px solid var(--brand-coral);
    background: var(--brand-coral);
    color: #ffffff;
}

.modal-footer-actions .btn-primary:hover {
    background: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
}

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

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.kpi-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.kpi-head h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--brand-gray-600);
    font-weight: 400;
}

.kpi-icon {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon.coral {
    background: #ff8b6a;
    color: #ffffff;
}

.kpi-icon.black {
    background: #000000;
    color: #ffffff;
}

.kpi-icon svg {
    width: 28px;
    height: 28px;
}

.kpi-card p {
    margin: 12px 0 0;
    color: var(--brand-gray-900);
    font-size: 40px;
    line-height: 1.2;
    font-weight: 500;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.dashboard-panel {
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dashboard-panel-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
}

.dashboard-panel-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    color: var(--brand-coral);
}

.dashboard-panel-icon svg {
    width: 24px;
    height: 24px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-actions a {
    text-decoration: none;
    display: block;
    border: 1px solid var(--brand-gray-200);
    background: #ffffff;
    color: var(--brand-gray-900);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: background-color 220ms ease, border-color 220ms ease;
}

.quick-actions a strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 4px;
    font-weight: 500;
}

.quick-actions a span {
    display: block;
    color: var(--brand-gray-600);
    font-size: 12px;
    line-height: 1.4;
}

.quick-actions a:hover {
    background: #fff3ee;
    border-color: #efc5b8;
}

.recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--brand-gray-200);
}

.recent-item:last-child {
    border-bottom: 0;
}

.recent-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recent-main strong {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--brand-gray-900);
}

.recent-main span {
    color: var(--brand-gray-600);
    font-size: 12px;
}

.recent-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
}

.recent-side strong {
    font-size: 15px;
    font-weight: 500;
}

.status-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.status-pago {
    background: #d9f7e4;
    color: #097343;
}

.status-pendente {
    background: #fff1cc;
    color: #a46900;
}

.status-cancelado {
    background: #f3f4f6;
    color: #4b5563;
}

.recent-empty {
    padding: 16px 0;
    color: var(--brand-gray-600);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.summary-card {
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 12px 14px;
}

.summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.summary-title {
    color: var(--brand-gray-600);
    font-size: 12px;
    line-height: 1.35;
}

.summary-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 10px;
}

.summary-coral {
    background: var(--brand-coral);
}

.summary-dark {
    background: var(--brand-black);
}

.summary-card strong {
    display: block;
    margin-top: 6px;
    color: var(--brand-gray-900);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
}

.collaborators-panel {
    margin-top: 14px;
}

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

.highlight-card {
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.highlight-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.highlight-card-head strong {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 500;
}

.highlight-meta {
    color: var(--brand-gray-600);
    font-size: 12px;
    line-height: 1.35;
}

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

@media (max-width: 1023px) {
    .page-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .page-heading-actions {
        justify-content: flex-start;
    }

    .filter-main-row,
    .filter-aux-row.cols-2,
    .filter-aux-row.cols-3 {
        grid-template-columns: 1fr;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .form-col-span-2 {
        grid-column: auto;
    }

    .kpi-head h3 {
        font-size: 14px;
    }

    .kpi-card p {
        font-size: 32px;
    }

    .dashboard-panel-head h2 {
        font-size: 18px;
    }

    .quick-actions a strong {
        font-size: 15px;
    }

    .recent-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .recent-side {
        align-items: flex-start;
    }

    .app-mobile-header {
        position: fixed;
        inset: 0 0 auto 0;
        height: 60px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 14px;
        background: #ffffff;
        border-bottom: 1px solid var(--brand-gray-200);
        z-index: 650;
    }

    .app-mobile-title {
        font-size: 17px;
        font-weight: 700;
        color: var(--brand-gray-900);
    }

    .sidebar-toggle {
        width: 42px;
        min-height: 42px;
        border: 1px solid var(--brand-gray-200);
        border-radius: var(--radius-md);
        background: #ffffff;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 0 10px;
        cursor: pointer;
    }

    .sidebar-toggle span {
        display: block;
        height: 2px;
        border-radius: 1px;
        background: var(--brand-gray-900);
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 240ms ease;
        box-shadow: var(--shadow-lg);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 590;
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
        display: block;
    }

    .app-sidebar ~ .page-content {
        margin-left: 0;
    }

    .page-content {
        padding: 78px 14px 16px;
    }

    [data-filtros] input[type="text"],
    [data-filtros] input[type="date"],
    [data-filtros] input[type="number"],
    [data-filtros] select,
    [data-filtros] input[type="submit"],
    [data-filtros] button {
        width: 100%;
    }

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

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

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

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

    .page-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
