:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --primary: #2b6cb0;
    --primary-dark: #1f4f8b;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d1d5db;
    --shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 100%);
    color: var(--text);
}

.page-wrapper {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.brand h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.brand p {
    margin: 0;
    color: var(--muted);
}

.form-group {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    font-size: 1rem;
    color: var(--text);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.12);
}

.btn-primary {
    width: 100%;
    margin-top: 28px;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.helper-text {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f4f7fb;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    max-height: 100vh;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 20px;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
    overflow-y: auto;
    gap: 16px;
}

.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #2563eb;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}

.brand-name,
.brand-tag {
    display: block;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.brand-tag {
    color: #94a3b8;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-link {
    color: #f8fafc;
}

.main-area {
    margin-left: 280px;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    padding: 32px 40px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.topbar-info h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.4rem);
    color: #0f172a;
}

.topbar-subtitle {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
}

.topbar-user strong {
    color: #0f172a;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: #1d4ed8;
}

.dashboard-content {
    display: grid;
    gap: 24px;
    max-width: 100%;
    min-width: 0;
}

.app,
.main,
.main-content,
.content,
.container,
.dashboard,
.card,
.panel,
.form-card,
.report-card,
.report-cards,
.dashboard-panel,
.page-panel,
.indicator-card,
.shortcut-card,
.chart-card,
.settings-panel,
.cashier-card,
.cashier-summary,
.cashier-notes,
.cashier-card-item,
.fiscal-item-card,
.pdv-panel,
.stock-panel {
    max-width: 100%;
    min-width: 0;
}

.page-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
    max-width: 100%;
    min-width: 0;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    min-width: 0;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}

.panel-header > *,
.panel-header-row > *,
.panel-section-header > * {
    min-width: 0;
}

.panel-header > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-header > div:last-child a {
    white-space: nowrap;
}

.page-label {
    display: block;
    color: #64748b;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.search-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    max-width: 100%;
    min-width: 0;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    min-width: 0;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.data-table th {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow-wrap: normal;
}

.data-table tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.cashier-table-responsive {
    max-width: 100%;
}

.cashier-history-table th,
.cashier-history-table td {
    padding: 12px 14px;
    white-space: nowrap;
}

.empty-row {
    text-align: center;
    color: #64748b;
    padding: 32px 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    max-width: 100%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.status-active {
    background: #ecfdf5;
    color: #166534;
}

.status-inactive {
    background: #f8fafc;
    color: #475569;
}

.status-open {
    background: #ecfdf5;
    color: #166534;
}

.status-closed {
    background: #eff6ff;
    color: #1e40af;
}

.status-warning {
    background: #fffbeb;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.report-filter-panel {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.report-filter-panel label {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.report-filter-panel .btn-secondary {
    min-height: 52px;
}

.report-cards {
    margin-bottom: 24px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.report-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.report-section:first-of-type {
    border-top: none;
}

.report-cashier-table th,
.report-cashier-table td {
    padding: 12px 14px;
    white-space: nowrap;
}

.action-column {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.link-button {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.link-button:hover {
    text-decoration: underline;
}

.link-danger {
    color: #dc2626;
}

.tag-inactive {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.85rem;
}

.form-card {
    display: grid;
    gap: 24px;
    max-width: 100%;
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 100%;
}

.form-grid label,
.full-width {
    display: grid;
    gap: 10px;
    font-weight: 600;
    color: #0f172a;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.13);
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    max-width: 100%;
}

textarea {
    resize: vertical;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
    gap: 24px;
    max-width: 100%;
}

.settings-aside {
    display: grid;
    gap: 24px;
}

.settings-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.logo-preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    padding: 20px;
}

.empty-logo {
    display: grid;
    place-items: center;
    min-height: 240px;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    text-align: center;
    padding: 24px;
}

.required {
    color: #dc2626;
    margin-left: 4px;
}

.alert-success {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.actions-row,
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-row .btn-primary,
.actions-row .btn-secondary,
.form-actions .btn-primary,
.form-actions .btn-secondary,
.panel-header-row .btn-primary,
.panel-header-row .btn-secondary {
    width: auto;
    margin-top: 0;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.13);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

button,
.btn-primary,
.btn-secondary,
.btn-logout,
.mobile-menu-toggle,
.sidebar-link,
.logout-link,
.panel-header a,
.panel-header button,
.panel-header-row a,
.panel-header-row button,
.panel-section-header a,
.panel-section-header button,
.action-column a,
.action-column button,
.data-table th,
.data-table td[data-label="ID"],
.data-table td[data-label="SKU"],
.data-table td[data-label="Status"],
.data-table td[data-label="Categoria"],
.data-table td[data-label="Preço"],
.data-table td[data-label="Preço venda"],
.data-table td[data-label="Estoque"],
.data-table td[data-label="Estoque atual"],
.data-table td[data-label="Estoque mínimo"],
.data-table td[data-label="Reservado"],
.data-table td[data-label="Disponível"],
.data-table td[data-label="Total"],
.data-table td[data-label="Pago"],
.data-table td[data-label="Recebido"],
.data-table td[data-label="Saldo"],
.data-table td[data-label="Ação"],
.data-table td[data-label="Ações"] {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.btn-secondary:hover {
    background: #eef2f7;
}

.btn-primary.btn-disabled,
.btn-primary.btn-disabled:hover,
.btn-secondary.btn-disabled,
.btn-secondary.btn-disabled:hover,
.btn-disabled,
.btn-disabled:hover {
    background: #e5e7eb !important;
    color: #64748b !important;
    border: 1px solid rgba(100, 116, 139, 0.35) !important;
    cursor: not-allowed !important;
    opacity: 0.75;
    pointer-events: none;
    box-shadow: none;
    text-decoration: none;
}

.form-panel {
    display: grid;
    gap: 20px;
}

.form-panel label {
    display: grid;
    gap: 10px;
}

.cashier-card,
.cashier-summary,
.cashier-notes {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
}

.cashier-status {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.cashier-status-open {
    background: #ecfdf5;
    color: #166534;
}

.cashier-details {
    display: grid;
    gap: 10px;
    color: #334155;
}

.cashier-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cashier-summary-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.cashier-summary-total {
    font-size: 1.05rem;
    color: #0f172a;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
}

.checkbox-label input {
    width: auto;
}

.cashier-notes p {
    margin: 0;
    line-height: 1.6;
}

.dashboard-topcards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.indicator-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.indicator-title {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.indicator-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.indicator-meta {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.shortcut-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.shortcut-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.shortcut-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.dashboard-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.dashboard-visuals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.chart-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.chart-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chart-wrapper {
    flex: 1;
    min-height: 240px;
    position: relative;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-empty {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    background: #f8fafc;
    padding: 24px;
}

.cashier-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.cashier-card-item {
    background: #f8fafc;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.cashier-card-item span {
    color: #64748b;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cashier-card-item strong {
    color: #0f172a;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pdv-grid,
.stock-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    max-width: 100%;
    min-width: 0;
}

.pdv-panel,
.stock-panel {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
}

.panel-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.panel-section-header h3,
.panel-section-header p {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel-section-header h3 {
    color: #0f172a;
    font-size: 1.05rem;
}

.panel-section-header p {
    color: #64748b;
    line-height: 1.5;
}

.cart-area,
.cart-summary,
.cart-totals,
.cart-actions,
.empty-state {
    max-width: 100%;
    min-width: 0;
}

.cart-summary {
    display: grid;
    gap: 16px;
}

.cart-summary label,
#cash-fields,
#credit-fields {
    display: grid;
    gap: 10px;
}

.cart-totals {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.cart-total-row,
.cashier-summary-row {
    min-width: 0;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-total-row span,
.cart-total-row strong,
.cashier-summary-row span,
.cashier-summary-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.total-final {
    font-size: 1.08rem;
    color: #0f172a;
}

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 18px;
    background: #f8fafc;
    padding: 24px;
}

.hidden {
    display: none !important;
}

.select-filter {
    min-width: 180px;
}

h1,
h2,
h3,
p,
label,
.topbar-subtitle,
.topbar-user,
.page-label,
.helper-text,
.shortcut-card,
.dashboard-panel,
.page-panel,
.settings-panel,
.cashier-card,
.cashier-details,
.cashier-notes,
.panel-header,
.panel-header-row,
.panel-body,
.link-button,
.btn-primary,
.btn-secondary,
.btn-logout {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.fiscal-item-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    margin-top: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #f8fafc;
}

.fiscal-item-card:first-child {
    margin-top: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.panel-header p {
    margin: 0;
    color: #64748b;
}

.panel-body.empty-state {
    min-height: 190px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 20px;
    padding: 28px;
    background: #f8fafc;
}

.panel-body.empty-state strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: #0f172a;
}

.app-footer {
    margin-top: 40px;
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 1120px) {
    .dashboard-topcards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .mobile-menu-toggle {
        display: none;
    }

    .app-shell {
        display: block;
        width: 100%;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 8px;
        left: 16px;
        right: 16px;
        z-index: 1100;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        min-height: 46px;
        margin: 0;
        padding: 12px 16px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 14px;
        background: #0f172a;
        color: #ffffff;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1200;
        width: min(300px, 86vw);
        max-width: 86vw;
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        padding: 24px 16px;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1150;
        background: rgba(15, 23, 42, 0.42);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 76px 14px 24px;
    }

    .topbar,
    .topbar-info,
    .panel-header,
    .panel-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        gap: 14px;
    }

    .topbar-user {
        flex-wrap: wrap;
    }

    .btn-dashboard-local,
    .btn-logout,
    .btn-primary,
    .btn-secondary,
    .panel-header a,
    .panel-header button,
    .panel-section-header a,
    .panel-section-header button,
    .actions-row .btn-primary,
    .actions-row .btn-secondary,
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .search-panel .btn-primary,
    .search-panel .btn-secondary,
    .report-filter-panel .btn-primary,
    .report-filter-panel .btn-secondary,
    .cart-actions .btn-primary,
    .cart-actions .btn-secondary {
        width: 100%;
        margin-top: 0;
    }

    .page-panel,
    .dashboard-panel,
    .indicator-card,
    .shortcut-card,
    .chart-card,
    .settings-panel,
    .pdv-panel,
    .stock-panel,
    .cashier-card,
    .cashier-summary,
    .cashier-notes {
        border-radius: 18px;
        padding: 18px;
    }

    .dashboard-topcards,
    .dashboard-shortcuts,
    .dashboard-visuals,
    .cashier-card-grid,
    .form-grid,
    .report-grid,
    .settings-grid,
    .pdv-grid,
    .stock-grid {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .report-filter-panel,
    .actions-row,
    .form-actions,
    .action-column,
    .panel-section-header,
    .chart-card-header,
    .cart-total-row,
    .cashier-summary-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-input,
    .select-filter,
    .report-filter-panel label,
    .report-filter-panel .btn-secondary,
    .report-filter-panel .btn-primary {
        width: 100%;
        min-width: 0;
    }

    .data-table {
        min-width: 0;
    }

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

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive tbody {
        display: grid;
        gap: 14px;
    }

    .table-responsive tr {
        width: 100%;
        margin: 0;
        padding: 14px;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .table-responsive tr:hover {
        background: #ffffff;
    }

    .table-responsive td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 9px 0;
        border-bottom: 1px solid #eef2f7;
        text-align: right;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: none;
    }

    .table-responsive td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .table-responsive td::before {
        content: attr(data-label);
        flex: 0 0 116px;
        max-width: 46%;
        min-width: 100px;
        text-align: left;
        font-weight: 700;
        color: #64748b;
        white-space: nowrap;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .table-responsive td:empty::before,
    .table-responsive td.empty-row::before {
        content: none;
    }

    .table-responsive .empty-row {
        display: block;
        text-align: center;
        padding: 14px 0;
    }

    .table-responsive .action-column {
        align-items: flex-end;
        flex-direction: column;
        white-space: nowrap;
    }

    .table-responsive td input,
    .table-responsive td select,
    .table-responsive td button {
        max-width: 100%;
    }

    .table-responsive td input[type="number"],
    .table-responsive td input[type="date"] {
        width: min(170px, 100%);
    }

    .table-responsive .status-pill {
        justify-content: center;
        text-align: center;
    }

    .table-responsive .btn-primary,
    .table-responsive .btn-secondary {
        width: auto;
        min-width: 120px;
    }

    .topbar-info h1 {
        font-size: 1.45rem;
    }

    .panel-header h2,
    .panel-header-row h2 {
        font-size: 1.2rem;
    }

    .indicator-value {
        font-size: 1.45rem;
    }

    .dashboard-content {
        gap: 18px;
    }

    .report-section {
        margin-top: 18px;
        padding-top: 18px;
    }

    .cart-totals,
    .empty-state {
        padding: 14px;
    }

    .app-footer {
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    .dashboard-topcards,
    .dashboard-shortcuts {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 24px 16px;
    }

    .btn-logout {
        width: 100%;
    }

    .report-filter-panel {
        align-items: stretch;
    }

    .report-filter-panel label,
    .report-filter-panel .btn-secondary {
        width: 100%;
    }
}
