
:root {
    --main-color: #2563eb;
    --main-hover: #1d4ed8;
    --main-light: #eff6ff;
    --page-background: #f5f7fa;
    --card-background: #ffffff;
    --sidebar-background: #111827;
    --sidebar-hover: #1f2937;
    --sidebar-width: 230px;
    --topbar-height: 68px;
    --text-main: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --border-dark: #d1d5db;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --orange: #d97706;
    --orange-light: #fff7ed;
    --red: #dc2626;
    --red-light: #fef2f2;
    --card-radius: 12px;
    --button-radius: 7px;
    --page-padding: 28px;
}
* {
    box-sizing: border-box;
}
html {
    min-height: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-background);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    border: 0;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    background: var(--sidebar-background);
    color: #e5e7eb;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    height: var(--topbar-height);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--main-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.brand-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.brand-subtitle {
    margin-top: 2px;
    color: #9ca3af;
    font-size: 12px;
}
.sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    padding: 18px 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 0 13px;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.nav-item.active {
    background: #1e3a8a;
    color: #fff;
}
.nav-icon {
    display: inline-flex;
    justify-content: center;
    width: 18px;
    font-size: 17px;
}
.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user-label {
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 11px;
}
.sidebar-user-name {
    overflow: hidden;
    color: #d1d5db;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.main-shell {
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    margin-left: var(--sidebar-width);
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 var(--page-padding);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.96);
}
.topbar-title {
    font-size: 16px;
    font-weight: 700;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-content {
    width: 100%;
    padding: var(--page-padding);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.page-header h1 {
    margin-bottom: 6px;
    font-size: 25px;
    line-height: 1.3;
}
.page-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--button-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.primary-button {
    border: 1px solid var(--main-color);
    background: var(--main-color);
    color: #fff;
}
.primary-button:hover {
    border-color: var(--main-hover);
    background: var(--main-hover);
}
.secondary-button {
    border: 1px solid var(--border-dark);
    background: #fff;
    color: #374151;
}
.secondary-button:hover {
    border-color: #93c5fd;
    background: var(--main-light);
    color: var(--main-color);
}
.danger-button {
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
}
.danger-button:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}
.text-link {
    color: var(--main-color);
    font-size: 13px;
    font-weight: 500;
}
.text-link:hover {
    color: var(--main-hover);
}

.dashboard-section {
    margin-bottom: 30px;
}
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}
.section-header h2 {
    margin-bottom: 4px;
    font-size: 18px;
}
.section-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.stat-grid,
.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.stat-card,
.mini-stat-card {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: var(--card-background);
}
.stat-card {
    padding: 19px;
}
.mini-stat-grid {
    margin-bottom: 20px;
}
.mini-stat-card {
    box-sizing: border-box;
    min-height: 108px;
    padding: 18px;
}
.stat-card:hover,
.mini-stat-card:hover {
    border-color: #cbd5e1;
}
.stat-label,
.mini-stat-title {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}
.stat-value,
.mini-stat-value {
    overflow: hidden;
    color: var(--text-main);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stat-value {
    font-size: 25px;
}
.mini-stat-value {
    font-size: 23px;
}
.stat-value span,
.mini-stat-value span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}
.stat-meta,
.mini-stat-meta {
    margin-top: 7px;
    color: var(--text-light);
    font-size: 12px;
}
.warning-card {
    border-color: #fed7aa;
    background: #fffdfa;
}

.filter-panel {
    margin-bottom: 21px;
    padding: 19px;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: #fff;
}
.filter-panel-header {
    margin-bottom: 16px;
}
.filter-panel-header h2 {
    margin-bottom: 3px;
    font-size: 16px;
}
.filter-panel-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
}
.trade-list-filter-grid {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.filter-item-wide {
    grid-column: span 2;
}
.filter-item {
    min-width: 0;
}
.filter-item label,
.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}
.filter-item input,
.filter-item select,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border-dark);
    border-radius: 7px;
    background: #fff;
    color: var(--text-main);
    outline: none;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-item input,
.filter-item select,
.form-group input,
.form-group select {
    height: 41px;
    padding: 0 11px;
}
.form-group textarea {
    min-height: 115px;
    padding: 11px;
    resize: vertical;
}
.filter-item input:focus,
.filter-item select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.filter-item input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b0b7c3;
}
.filter-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    padding-top: 16px;
    border-top: 1px solid #f0f1f3;
}
.form-help {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 12px;
}

.table-panel {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: #fff;
}
.no-top-margin {
    margin-top: 0;
}
.table-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 67px;
    padding: 13px 19px;
    border-bottom: 1px solid var(--border-color);
}
.table-panel-header h2 {
    margin-bottom: 3px;
    font-size: 16px;
}
.table-panel-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}
.table-wrapper::-webkit-scrollbar {
    height: 9px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #cbd5e1;
}
.trade-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.inventory-table {
    min-width: 1450px;
}
.sold-table {
    min-width: 2050px;
}
.trash-table {
    min-width: 1180px;
}
.home-table {
    min-width: 980px;
}
.ranking-table {
    min-width: 1000px;
}
.trade-table th {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}
.trade-table td {
    overflow: hidden;
    padding: 14px;
    border-bottom: 1px solid #f0f1f3;
    color: #374151;
    font-size: 14px;
    line-height: 1.65;
    vertical-align: middle;
}
.trade-table tbody tr:last-child td {
    border-bottom: 0;
}
.trade-table tbody tr:hover {
    background: #fafcff;
}

.inventory-table th:nth-child(1) { width: 120px; }
.inventory-table th:nth-child(2) { width: 100px; }
.inventory-table th:nth-child(3) { width: 165px; }
.inventory-table th:nth-child(4) { width: 285px; }
.inventory-table th:nth-child(5) { width: 125px; }
.inventory-table th:nth-child(6) { width: 125px; }
.inventory-table th:nth-child(7) { width: 120px; }
.inventory-table th:nth-child(8) { width: 200px; }
.inventory-table th:nth-child(9) { width: 210px; }

.sold-table th:nth-child(1) { width: 120px; }
.sold-table th:nth-child(2) { width: 95px; }
.sold-table th:nth-child(3) { width: 160px; }
.sold-table th:nth-child(4) { width: 270px; }
.sold-table th:nth-child(5),
.sold-table th:nth-child(6),
.sold-table th:nth-child(7) { width: 125px; }
.sold-table th:nth-child(8),
.sold-table th:nth-child(9) { width: 125px; }
.sold-table th:nth-child(10) { width: 120px; }
.sold-table th:nth-child(11),
.sold-table th:nth-child(12) { width: 120px; }
.sold-table th:nth-child(13) { width: 200px; }
.sold-table th:nth-child(14) { width: 165px; }
.item-code {
    color: #475569;
    font-family: Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
}
.item-name {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}
.type-badge,
.status-badge,
.active-sort-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    white-space: nowrap;
}
.type-badge {
    padding: 4px 9px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
}
.status-badge {
    padding: 4px 9px;
    font-size: 12px;
}
.status-sold {
    background: var(--green-light);
    color: var(--green);
}
.status-unsold {
    background: var(--main-light);
    color: var(--main-color);
}
.active-sort-badge {
    padding: 5px 10px;
    background: var(--main-light);
    color: var(--main-color);
    font-size: 12px;
}
.cell-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-attribute {
    max-width: 275px;
}
.cell-note {
    max-width: 200px;
    color: var(--text-secondary);
}
.empty-note {
    color: #c1c7d0;
}
.price-text {
    color: var(--text-main);
    font-weight: 600;
}
.cost-text {
    color: var(--orange);
    font-weight: 600;
    cursor: help;
}
.profit-positive,
.profit-negative {
    font-weight: 700;
}
.profit-zero {
    color: var(--text-secondary);
    font-weight: 600;
}
.stock-days-warning {
    color: var(--orange);
    font-weight: 700;
}
.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    white-space: nowrap;
}
.sort-link:hover,
.sort-link.active {
    color: var(--main-color);
}
.sort-link.active {
    font-weight: 700;
}
.sort-neutral {
    color: #aab1bd;
}

.ranking-section .section-header h2 {
    font-size: 19px;
}
.ranking-section .section-header p {
    font-size: 13px;
}
.ranking-table th {
    padding: 14px 15px;
    font-size: 14px;
}
.ranking-table td {
    padding: 15px;
    font-size: 15px;
}
.ranking-table .type-badge {
    padding: 5px 11px;
    font-size: 13px;
}
.ranking-table .item-code {
    font-size: 13px;
}
.ranking-table .item-name {
    font-size: 15px;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.action-buttons form {
    margin: 0;
}
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.success-button {
    border-color: #bbf7d0;
    background: var(--green-light);
    color: var(--green);
}
.success-button:hover {
    background: #dcfce7;
}
.edit-button {
    border-color: #bfdbfe;
    background: var(--main-light);
    color: var(--main-color);
}
.edit-button:hover {
    background: #dbeafe;
}
.restore-button {
    border-color: #bbf7d0;
    background: var(--green-light);
    color: var(--green);
}
.restore-button:hover {
    background: #dcfce7;
}
.delete-button {
    border-color: #fecaca;
    background: var(--red-light);
    color: var(--red);
}
.delete-button:hover {
    background: #fee2e2;
}

.empty-state {
    padding: 44px 20px;
    text-align: center;
}
.empty-title {
    margin-bottom: 6px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
}
.empty-description {
    color: var(--text-light);
    font-size: 13px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    padding: 13px 19px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}
.pagination-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.pagination-info {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}
.page-size-control,
.page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}
.page-size-select,
.page-jump-input {
    height: 35px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
}
.page-size-select {
    min-width: 66px;
    padding: 0 8px;
}
.page-jump-input {
    width: 68px;
    padding: 0 8px;
    text-align: center;
}
.page-size-select:focus,
.page-jump-input:focus {
    border-color: var(--main-color);
}
.pagination-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
}
.pagination-button:hover {
    border-color: #93c5fd;
    background: var(--main-light);
    color: var(--main-color);
}
.pagination-button.current {
    border-color: var(--main-color);
    background: var(--main-color);
    color: #fff;
}
.pagination-button.disabled {
    background: #f9fafb;
    color: #c1c7d0;
    cursor: not-allowed;
}
.pagination-button.disabled:hover {
    border-color: var(--border-color);
    background: #f9fafb;
    color: #c1c7d0;
}
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    height: 35px;
    padding: 0 3px;
    color: var(--text-light);
    font-size: 13px;
}
.page-jump-button {
    height: 35px;
    padding: 0 11px;
    border-radius: 6px;
    background: var(--main-color);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.page-jump-button:hover {
    background: var(--main-hover);
}

.form-card {
    max-width: 900px;
    padding: 23px;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: #fff;
}
.form-section-title {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.form-group {
    min-width: 0;
}
.form-group-full {
    grid-column: 1 / -1;
}
.required {
    color: var(--red);
}
.form-divider {
    height: 1px;
    margin: 22px 0;
    background: var(--border-color);
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.errorlist {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    color: var(--red);
    font-size: 12px;
}
.formula-box {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: var(--main-light);
    color: #1e40af;
    font-size: 13px;
    line-height: 1.7;
}
.sale-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 900px;
    margin-bottom: 15px;
}
.sale-summary-item {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #fff;
}
.sale-summary-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 12px;
}
.sale-summary-item strong {
    display: block;
    overflow: hidden;
    color: var(--text-main);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trash-warning {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: var(--orange-light);
    color: #9a3412;
    font-size: 13px;
}

.chart-panel {
    padding: 21px 19px 9px;
}
.chart-legend {
    display: flex;
    align-items: center;
    gap: 19px;
    flex-wrap: wrap;
    margin-bottom: 9px;
    color: var(--text-secondary);
    font-size: 13px;
}

.user-chip {
    max-width: 150px;
    overflow: hidden;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.logout-form {
    margin: 0;
}
.logout-button {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}
.logout-button:hover {
    border-color: #fecaca;
    background: var(--red-light);
    color: var(--red);
}
.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    background: #f5f7fa;
}
.auth-shell {
    width: 100%;
    max-width: 430px;
    margin: auto;
}
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}
.auth-brand-mark {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--main-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.auth-brand-name {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
}
.auth-brand-subtitle {
    margin-top: 1px;
    color: var(--text-secondary);
    font-size: 11px;
}
.auth-card {
    padding: 29px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
}
.auth-header {
    margin-bottom: 22px;
    text-align: center;
}
.auth-header h1 {
    margin-bottom: 6px;
    font-size: 23px;
}
.auth-header p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.auth-form {
    width: 100%;
}
.auth-form-group {
    margin-bottom: 16px;
}
.auth-form-group label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}
.auth-form-group input {
    width: 100%;
    height: 43px;
    padding: 0 12px;
    border: 1px solid var(--border-dark);
    border-radius: 7px;
    background: #fff;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}
.auth-form-group input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.auth-primary-button {
    width: 100%;
    height: 43px;
    margin-top: 5px;
    border-radius: 7px;
    background: var(--main-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.auth-primary-button:hover {
    background: var(--main-hover);
}
.auth-footer {
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}
.auth-footer a {
    color: var(--main-color);
    font-weight: 600;
}
.site-legal-footer {
    padding: 14px 16px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}
.site-legal-footer a {
    color: #64748b;
}
.site-legal-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}
.site-police-beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.site-police-beian img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}
.site-legal-divider {
    margin: 0 7px;
    color: #cbd5e1;
}
.auth-site-legal-footer {
    flex: 0 0 auto;
    padding-bottom: 0;
}
.auth-password-tip {
    margin: -3px 0 14px;
    color: var(--text-light);
    font-size: 12px;
}
.auth-error {
    margin-bottom: 15px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: var(--red-light);
    color: var(--red);
    font-size: 12px;
}
.auth-error .errorlist {
    margin: 0;
}

@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .filter-item-wide {
        grid-column: span 1;
    }
    .stat-grid,
    .mini-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    :root {
        --page-padding: 18px;
    }
    .app-shell {
        display: block;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .brand {
        height: 58px;
    }
    .sidebar-nav {
        flex: none;
        flex-direction: row;
        gap: 4px;
        padding: 8px 12px;
        overflow-x: auto;
    }
    .nav-item {
        min-width: max-content;
        min-height: 38px;
    }
    .sidebar-footer {
        display: none;
    }
    .main-shell {
        width: 100%;
        margin-left: 0;
    }
    .topbar {
        top: 0;
        height: 60px;
    }
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }
    .pagination-main {
        justify-content: flex-start;
        width: 100%;
    }
}
@media (max-width: 700px) {
    :root {
        --page-padding: 14px;
    }
    .page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .page-header h1 {
        font-size: 22px;
    }
    .page-header-actions {
        width: 100%;
    }
    .stat-grid,
    .mini-stat-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .filter-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .filter-item-wide,
    .form-group-full {
        grid-column: auto;
    }
    .form-card {
        padding: 17px;
    }
    .sale-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .section-header {
        align-items: flex-start;
    }
    .pagination-left {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    .page-jump {
        width: 100%;
    }
    .user-chip {
        display: none;
    }
    .auth-page {
        padding: 15px;
    }
    .auth-card {
        padding: 22px 18px;
    }
}
@media (max-width: 420px) {
    .topbar {
        padding: 0 12px;
    }
    .topbar-title {
        font-size: 14px;
    }
    .primary-button,
    .secondary-button,
    .danger-button {
        min-height: 37px;
        padding: 0 12px;
    }
    .sale-summary {
        grid-template-columns: 1fr;
    }
}
.site-legal-footer {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    padding: 18px 16px;
}

.site-legal-footer a {
    color: #6b7280;
    text-decoration: none;
}

.site-legal-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.site-legal-divider {
    margin: 0 8px;
}

.app-main-public .site-legal-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    width: 100%;
}
