/* public/css/style.css */
:root {
    /* Brand System: corporate, trustworthy, sober */
    --primary: #0f4c81;
    --primary-hover: #0c3f6b;
    --secondary: #163a5f;
    --accent: #1f9d9a;
    --success: #1f8f5f;
    --danger: #c43d3d;
    --warning: #b7791f;
    
    /* Surface / Backgrounds */
    --bg-body: #eef2f7;
    --bg-surface: #ffffff;
    --bg-sidebar: #0b1e33;
    --bg-elevated: #f8fafc;
    
    /* Text */
    --text-main: #172b42;
    --text-muted: #5f7188;
    --text-sidebar-muted: #9fb0c6;
    --text-white: #ffffff;

    /* Typography */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    
    /* Shapes & Shadows */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    --shadow-sm: 0px 4px 10px rgba(15, 23, 42, 0.08);
    --shadow-md: 0px 12px 28px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0px 16px 40px -18px rgba(15, 23, 42, 0.25);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6, .page-title, .sidebar-header h2 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

body {
    background: radial-gradient(circle at 12% 8%, #ffffff 0%, var(--bg-body) 45%, #e5eaf1 100%);
    color: var(--text-main);
    line-height: 1.45;
    overflow: hidden; /* App-like feel */
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0b1e33 0%, #0d2743 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
}

.logo-icon {
    font-size: 32px;
    color: var(--primary);
    margin-right: 12px;
}

.logo-icon.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-header .highlight {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-sidebar-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 600;
}

.nav-item .material-icons {
    margin-right: 16px;
    font-size: 20px;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary) 0%, #0b3c66 100%);
    box-shadow: 0px 6px 18px rgba(8, 45, 78, 0.45);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.09);
    background: rgba(7, 18, 33, 0.55);
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #1f6d9a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
}

.user-role {
    font-size: 12px;
    color: var(--text-sidebar-muted);
    margin-top: 3px;
}

/* Main Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    height: 90px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logout-btn {
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    box-shadow: var(--shadow-sm);
    width: 300px;
}

.search-box .material-icons {
    color: #a3aed1;
    font-size: 20px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding-left: 10px;
    width: 100%;
    font-size: 14px;
    color: var(--text-main);
}

.icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #1d4ed8 100%);
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.25);
    transition: var(--transition);
}

.icon-btn .material-icons {
    color: inherit;
    font-size: 20px;
}

.icon-btn:hover {
    color: #ffffff;
    filter: saturate(1.07);
    transform: translateY(-2px);
}

.icon-btn:active {
    transform: translateY(0);
}

/* Variantes automáticas por color inline existente en vistas */
.icon-btn[style*="--danger"],
.icon-btn[style*="#b91c1c"],
.icon-btn[style*="#dc2626"],
.icon-btn.cart-action-remove {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(220, 38, 38, 0.34);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.icon-btn[style*="--success"],
.icon-btn[style*="#16a34a"],
.icon-btn[style*="#15803d"] {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: rgba(22, 163, 74, 0.34);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.25);
}

.icon-btn[style*="#d97706"],
.icon-btn[style*="#b45309"],
.icon-btn.cart-action-discount {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(217, 119, 6, 0.34);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

.icon-btn[style*="--primary"],
.icon-btn[style*="#1d4ed8"],
.icon-btn[style*="#2563eb"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(29, 78, 216, 0.34);
    color: #ffffff !important;
}

/* Normaliza botones historicamente pequenos para mejor visibilidad */
.icon-btn[style*="width:24px"],
.icon-btn[style*="height:24px"] {
    width: 36px !important;
    height: 36px !important;
}

.icon-btn[style*="width:30px"],
.icon-btn[style*="height:30px"] {
    width: 38px !important;
    height: 38px !important;
}

.actions-cell {
    white-space: nowrap;
}

.cart-actions-inline {
    flex-shrink: 0;
}

.important-action-btn {
    box-shadow: 0 0 0 1px rgba(67, 97, 238, 0.14), var(--shadow-sm);
}

.cart-action-discount {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.cart-action-discount:hover {
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
}

.cart-action-remove {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.cart-action-remove:hover {
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.content-area {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

/* UI Components */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0b3f69 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(12, 63, 107, 0.32);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #1f8f5f 0%, #19724c 100%);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #d4dde8;
    background: #ffffff;
    color: var(--text-main);
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}

/* Custom Table Design */
.table-responsive {
    overflow-x: auto;
}

.accounts-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.accounts-overview-panel {
    min-width: 0;
    max-height: 360px;
    overflow: auto;
    border: 1px solid #d7e0ea;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.accounts-overview-panel .custom-table {
    margin: 0;
}

.accounts-overview-panel thead tr:first-child th {
    background: #eaf0f7;
    color: var(--secondary);
    font-size: 0.9rem;
}

.modal-content.quote-preview-modal {
    width: min(96vw, 980px);
    max-width: 980px;
    max-height: 94vh;
    overflow: auto;
}

.quote-preview-modal .quote-sheet {
    margin: 0 auto;
    padding: 28px;
    color: var(--text-main);
    background: var(--bg-surface);
}

.quote-sheet__header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--primary);
}

.quote-sheet__brand {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.quote-sheet__brand img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.quote-sheet h1 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--secondary);
}

.quote-sheet p {
    margin: 3px 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.quote-sheet__identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.quote-sheet__identity span,
.quote-sheet__customer span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.quote-sheet__identity strong {
    font-size: 18px;
}

.quote-sheet__identity small {
    color: var(--text-muted);
}

.quote-sheet__customer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: #f3f6fa;
}

.quote-sheet__customer div {
    min-width: 0;
}

.quote-sheet__customer span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.quote-sheet__customer strong {
    overflow-wrap: anywhere;
    font-size: 13px;
}

.quote-sheet__table-wrap {
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: var(--radius-sm);
}

.quote-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.quote-sheet th {
    padding: 9px;
    background: #eaf0f7;
    color: var(--secondary);
    text-align: left;
}

.quote-sheet td {
    padding: 9px;
    border-top: 1px solid #e2e8f0;
}

.quote-sheet td small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
}

.quote-sheet .numeric {
    text-align: right;
    white-space: nowrap;
}

.quote-sheet .empty {
    color: var(--text-muted);
    text-align: center;
}

.quote-sheet__summary {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
    margin-top: 18px;
}

.quote-sheet__terms {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.quote-sheet__terms > strong {
    color: var(--secondary);
    font-size: 12px;
}

.quote-sheet dl {
    margin: 0;
}

.quote-sheet dl div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.quote-sheet dt,
.quote-sheet dd {
    margin: 0;
}

.quote-sheet .quote-sheet__total {
    border-bottom: 0;
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
}

.quote-sheet footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #d7e0ea;
    color: var(--text-muted);
    font-size: 10px;
}

.quote-print-actions {
    justify-content: center;
    gap: 10px;
    margin: 18px 0 6px;
    flex-wrap: wrap;
}

.settings-usage-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #b9d8d7;
    border-radius: var(--radius-sm);
    background: #edf8f7;
    color: #134e4a;
}

.settings-usage-note .material-icons {
    margin-top: 1px;
    color: #0f766e;
}

.settings-usage-note strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.settings-usage-note p,
.settings-section__header p {
    margin: 0;
    color: #46657a;
    font-size: 0.78rem;
    line-height: 1.4;
}

.settings-section {
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.settings-section__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    background: #f3f6fa;
}

.settings-section__header > .material-icons {
    color: var(--primary);
    font-size: 21px;
}

.settings-section__header h4 {
    margin: 0 0 2px;
    color: var(--secondary);
    font-size: 0.95rem;
}

.settings-section__body {
    padding: 16px 16px 2px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.settings-section__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.settings-section__divider::before,
.settings-section__divider::after {
    height: 1px;
    flex: 1;
    background: #d7e0ea;
    content: '';
}

@media (max-width: 980px) {
    .accounts-overview-grid {
        grid-template-columns: 1fr;
    }

    .quote-sheet__customer,
    .quote-sheet__summary {
        grid-template-columns: 1fr;
    }

    .quote-sheet__header,
    .quote-sheet footer {
        flex-direction: column;
    }

    .quote-sheet__identity {
        text-align: left;
    }
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    text-align: left;
    padding: 16px;
    color: #4a5f78;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e1e8f0;
}

.custom-table td {
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #e9eef5;
    vertical-align: middle;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr:hover {
    background: #f4f8fc;
}

.badge {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: rgba(46, 204, 113, 0.1); color: var(--success); }
.badge-warning { background: rgba(243, 156, 18, 0.1); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.1); color: var(--danger); }

/* Keyboard accessibility */
:where(button, .btn, .nav-item, .form-control, input, select, textarea):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.18);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 3s;
    font-weight: 500;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid #f59e0b; color: #92400e; }
.toast.warning .material-icons { color: #f59e0b; }

.quick-price-fab {
    position: fixed;
    top: 22px;
    right: 150px;
    z-index: 950;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 18px 35px rgba(15, 118, 110, 0.32);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-price-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(15, 118, 110, 0.4);
}

.quick-price-fab .material-icons {
    font-size: 20px;
}

.quick-price-fab-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.quick-price-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.quick-price-modal {
    width: min(1100px, 100%);
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.quick-price-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.quick-price-header h3 {
    margin: 0;
    font-size: 20px;
}

.quick-price-header p {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.quick-price-body {
    padding: 14px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 280px;
}

.quick-price-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-price-search-row .material-icons {
    color: #64748b;
}

.quick-price-search-row .form-control {
    margin: 0;
}

.quick-price-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #475569;
}

.quick-price-results {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 180px;
}

.quick-price-table {
    margin: 0;
}

.quick-price-empty {
    padding: 18px;
    text-align: center;
    color: #64748b;
}

@keyframes slideIn { to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* Responsive Grid/Flex Utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .sidebar { position: fixed; transform: translateX(-100%); height: 100vh; }
    .sidebar.open { transform: translateX(0); }
    .mobile-toggle { display: block; }
    .header-logout-btn { padding: 8px 10px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .content-area { padding: 20px; }
    .header-right .search-box { display: none; }
    .header-logout-btn span:not(.material-icons) { display: none; }
    .header-logout-btn { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

    .quick-price-fab {
        right: 16px;
        top: auto;
        bottom: 16px;
        padding: 11px 13px;
    }

    .quick-price-fab-label {
        display: none;
    }

    .quick-price-modal {
        width: 100%;
        max-height: 94vh;
    }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(17, 28, 68, 0.4);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-surface);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; border-bottom: 1px solid #edf2f7; padding-bottom: 15px;
}

.modal-title { font-size: 20px; font-weight: 700; }
.modal-close {
    background: none; border: none; font-size: 24px; color: var(--text-muted);
    cursor: pointer; transition: var(--transition);
}
.modal-close:hover { color: var(--danger); }

.modal-content.modal-lg {
    width: 94%;
    max-width: 780px;
}

.modal-content.modal-wide {
    width: 96%;
    max-width: 960px;
}

.modal-content.modal-xl {
    width: 96%;
    max-width: 1320px;
    max-height: 94vh;
}

.modal-content.purchase-detail-modal {
    width: 94%;
    max-width: 980px;
    max-height: 92vh;
    padding: 0;
    overflow: hidden;
}

.purchase-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.purchase-detail-subtitle {
    margin-top: 4px;
    color: #7b8ab8;
    font-size: 13px;
}

.purchase-status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.purchase-status-chip.is-completed {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.purchase-status-chip.is-reversed {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.purchase-detail-body {
    padding: 18px 24px 16px;
}

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

.purchase-meta-card {
    border: 1px solid #e6ecf7;
    border-radius: 12px;
    background: #fbfdff;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.purchase-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a98c6;
}

.purchase-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.purchase-note-box {
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid #e6ecf7;
    background: #f8fafc;
    padding: 10px 12px;
}

.purchase-note-title {
    font-size: 12px;
    color: #7b8ab8;
    margin-bottom: 4px;
    font-weight: 700;
}

.purchase-note-text {
    color: var(--text-main);
    font-size: 14px;
}

.purchase-detail-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #6070a3;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.purchase-detail-table-wrap {
    border: 1px solid #e6ecf7;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.purchase-detail-table th,
.purchase-detail-table td {
    padding: 11px 12px;
}

.purchase-warning-box {
    margin-top: 4px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    padding: 10px 12px;
}

.purchase-warning-title {
    color: #b91c1c;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.purchase-warning-text {
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.4;
}

.purchase-total-row {
    margin-top: 8px;
    border-top: 1px solid #e6ecf7;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.purchase-total-label {
    font-size: 13px;
    color: #6476aa;
    font-weight: 700;
}

.purchase-total-hint {
    font-size: 12px;
    color: #9aa7cb;
    margin-top: 2px;
}

.purchase-total-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    line-height: 1;
}

.purchase-detail-footer {
    padding: 14px 24px 20px;
    border-top: 1px solid #edf2f7;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #fff;
}

@media (max-width: 900px) {
    .modal-content.purchase-detail-modal {
        width: 96%;
        max-width: none;
    }

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

@media (max-width: 600px) {
    .purchase-detail-header,
    .purchase-detail-body,
    .purchase-detail-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .purchase-meta-grid {
        grid-template-columns: 1fr;
    }

    .purchase-total-value {
        font-size: 24px;
    }
}

.reports-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    min-height: calc(100vh - 180px);
}

.reports-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reports-workspace {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 640px;
}

.reports-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.reports-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reports-filters {
    padding: 18px 24px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfdff;
}

.reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.report-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.report-card.active {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.report-card .material-icons {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
}

.reports-result {
    flex: 1;
    padding: 24px;
    overflow: auto;
}

.report-preview-sheet {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
}

.report-header-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .reports-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1366px) {
    .btn {
        min-height: 40px;
        padding: 10px 18px;
    }

    .data-table td .icon-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }

    .data-table td .icon-btn .material-icons {
        font-size: 19px !important;
    }

    .important-action-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .important-action-btn .material-icons {
        font-size: 21px !important;
    }

    .cart-actions-inline .icon-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .cart-actions-inline .icon-btn .material-icons {
        font-size: 18px !important;
    }
}

@media (max-width: 768px) {
    .actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .data-table td .icon-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .data-table td .icon-btn .material-icons {
        font-size: 21px !important;
    }

    .btn {
        min-height: 42px;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #modalContent, #modalContent * {
        visibility: visible;
    }
    
    #modalContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    /* Hide some elements during print */
    .no-print, .modal-close {
        display: none !important;
    }
}

/* ─── Auth overlay ─────────────────────────────────────────── */
.auth-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    z-index: 1000;
    padding: 1.5rem;
    overflow: hidden;
}

/* Decorative blobs */
.auth-wrap::before,
.auth-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.auth-wrap::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(67,97,238,0.12) 0%, transparent 70%);
    top: -150px;
    left: -150px;
}
.auth-wrap::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(76,201,240,0.1) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.8);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .material-icons {
    font-size: 3.5rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(67,97,238,0.3));
}

.auth-logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(67,97,238,0.25));
}

.auth-logo h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0 0 0.3rem;
}

.auth-logo h2 span { color: var(--primary); }

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.auth-error {
    background: rgba(231,76,60,0.08);
    border: 1px solid rgba(231,76,60,0.25);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 1rem;
    display: none;
}
.auth-error.visible { display: block; }

.auth-db-shortcut-row {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-db-shortcut-btn {
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

.auth-db-shortcut-btn:hover {
    text-decoration: underline;
}

.auth-db-shortcut-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.admin-only { display: none; }

/* ─── Utility classes used in admin views ──────────────────── */

.form-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid #e0e5f2;
    background: #f8f9fa;
    color: var(--text-main);
    font-size: 14px;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}
.form-input::placeholder { color: var(--text-muted); }

.btn-secondary {
    background: #eaf0f6;
    color: #1f324a;
    border: 1px solid #d4dfeb;
}
.btn-secondary:hover {
    background: #dde7f1;
    transform: translateY(-1px);
}
.btn-danger {
    background: rgba(196, 61, 61, 0.11);
    color: var(--danger);
    border: 1px solid rgba(196, 61, 61, 0.25);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}
.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.badge-primary  { background: rgba(67,97,238,0.1);    color: var(--primary); }
.badge-secondary{ background: rgba(163,174,209,0.15); color: #697a9b; }

/*
 * UI STANDARD (Quick Guide in code)
 * Use these classes in new views to keep visual consistency:
 * - Titles: ui-title-xl | ui-title-lg | ui-title-md | ui-subtitle
 * - Layout spacing: ui-stack-sm | ui-stack-md | ui-stack-lg | ui-row-actions
 * - Surfaces: ui-panel | ui-panel-soft
 * - Forms: ui-field | ui-field-label | ui-field-help
 * - KPIs: ui-kpi | ui-kpi-value | ui-kpi-label
 * - Buttons: btn-outline | btn-ghost | btn-warning
 */

.ui-title-xl {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ui-title-lg {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ui-title-md {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #21364f;
    line-height: 1.25;
}

.ui-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.ui-stack-sm > * + * { margin-top: 8px; }
.ui-stack-md > * + * { margin-top: 16px; }
.ui-stack-lg > * + * { margin-top: 24px; }

.ui-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ui-panel {
    background: var(--bg-surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.ui-panel-soft {
    background: var(--bg-elevated);
    border: 1px solid #dfe7f0;
    border-radius: var(--radius-md);
    padding: 16px;
}

.ui-field {
    margin-bottom: 16px;
}

.ui-field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #2a3e57;
}

.ui-field-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.ui-kpi {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe6f1;
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.ui-kpi-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #153554;
    line-height: 1;
}

.ui-kpi-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-outline {
    background: transparent;
    border: 1px solid #b8c8d9;
    color: #1e3a56;
}

.btn-outline:hover {
    background: #edf3f8;
    border-color: #9fb4c9;
}

.btn-ghost {
    background: transparent;
    color: #355170;
    border: 1px dashed #b7c8d9;
}

.btn-ghost:hover {
    background: #f5f9fd;
    border-style: solid;
}

.btn-warning {
    background: linear-gradient(135deg, #c08a28 0%, #a8751e 100%);
    color: #fff;
}

.btn-warning:hover {
    box-shadow: 0 8px 18px rgba(167, 117, 30, 0.28);
    transform: translateY(-1px);
}

/* ── Audit action badges ────────────────────────────────────── */
.audit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
}
.audit-auth      { background: rgba(67,97,238,.13);    color: #2d4bde; }
.audit-sale      { background: rgba(39,174,96,.13);    color: #1e8449; }
.audit-product   { background: rgba(230,126,34,.13);   color: #a04000; }
.audit-customer  { background: rgba(23,162,184,.13);   color: #0a778f; }
.audit-inventory { background: rgba(142,68,173,.13);   color: #7d3c98; }
.audit-payment   { background: rgba(44,62,80,.13);     color: #2c3e50; }
.audit-catalog   { background: rgba(243,156,18,.13);   color: #9a7d0a; }
.audit-users     { background: rgba(231,76,60,.13);    color: #c0392b; }
.audit-delete    { background: rgba(231,76,60,.22);    color: #c0392b; font-weight:700; }
.audit-other     { background: rgba(149,165,166,.13);  color: #717d7e; }

/* Audit change diff display */
.audit-changes {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.6;
}
.audit-change-key { color: var(--text-muted); font-weight: 600; }
.audit-old { color: #c0392b; text-decoration: line-through; opacity: .8; }
.audit-new { color: #1e8449; font-weight: 700; }

/* ── Users / Permissions Tabs ───────────────────────────────── */
.users-tabs {
    background: #fafbfc;
    padding: 0 1rem;
}
.users-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
}
.users-tab:hover { color: var(--primary); background: rgba(67,97,238,.04); }
.users-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.status-active  { background: rgba(39,174,96,.12); color: #1e8449; }
.status-inactive{ background: rgba(231,76,60,.12); color: #c0392b; }

/* ── Permissions Panel ──────────────────────────────────────── */
.perm-modules-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}
.perm-module {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}
.perm-module-header {
    background: #f8fafc;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background .15s;
    border-radius: 8px;
}
.perm-module.expanded .perm-module-header {
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e2e8f0;
}
.perm-module-header:hover {
    background: #f1f5f9;
}
.perm-expand-icon {
    color: #94a3b8;
    transition: transform .2s ease;
    font-size: 20px !important;
}
.perm-module.expanded .perm-expand-icon {
    transform: rotate(180deg);
}
.perm-module-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    pointer-events: auto;
}
.perm-module-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.perm-list {
    display: none;
}
.perm-module.expanded .perm-list {
    display: flex;
    flex-direction: column;
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background .1s;
}
.perm-item:last-child {
    border-bottom: none;
}
.perm-item:hover {
    background: #f8fafc;
}
.perm-item.granted {
    background: rgba(34, 197, 94, 0.06);
}
.perm-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
    flex-shrink: 0;
    cursor: pointer;
}
.perm-item input[type="checkbox"]:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.perm-name {
    flex: 1;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
}
.perm-code {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
    white-space: nowrap;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}
.card-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8f9ff;
    border-bottom: 2px solid #edf2f7;
}
.data-table td {
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    color: var(--text-main);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8f9ff; transition: background 0.15s; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Production hardening: touch, focus, overflow and compact-screen resilience. */
:where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 55%, white);
    outline-offset: 2px;
}

.modal-close,
.icon-btn,
button.btn {
    min-height: 44px;
}

.modal-close,
.icon-btn {
    min-width: 44px;
}

.table-container,
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

img[loading="lazy"] {
    content-visibility: auto;
}

@media (max-width: 768px) {
    .content,
    .main-content,
    .card,
    .modal-body,
    .purchase-create-layout > * {
        min-width: 0;
    }

    .purchase-create-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .form-control,
    input,
    select,
    textarea {
        font-size: 16px;
        min-height: 44px;
    }

    .card-header,
    .flex-between {
        flex-wrap: wrap;
        gap: 12px;
    }

    .inventory-actions {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }

    .inventory-actions .btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
        white-space: normal;
        justify-content: center;
    }

    .inventory-table .inventory-col-secondary {
        display: none;
    }

    .inventory-table th,
    .inventory-table td {
        padding-inline: 8px;
    }

    .inventory-table td:nth-last-child(2) {
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
