:root {
    --bg: #f5f7fa;
    --line: #d9d9d9;
    --line-dark: #aeb8c4;
    --text: #08192f;
    --muted: #536174;
    --nav-a: #101927;
    --nav-b: #1a2e66;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.top-menu {
    height: 29px;
    border-bottom: 1px solid #c6cdd6;
    background: #f8fafc;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
    padding: 0 8px;
    color: #111;
    font-size: 14px;
}

.menu-row a,
.menu-row span,
.menu-trigger {
    color: inherit;
    text-decoration: none;
}

.menu-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
}

.menu-trigger {
    height: 100%;
    border: 0;
    background: transparent;
    cursor: default;
    padding: 0;
}

.submenu {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: -8px;
    display: none;
    min-width: 194px;
    padding: 4px 0;
    border: 1px solid #8a8a8a;
    background: #fff;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.22);
}

.menu-dropdown:hover .submenu,
.menu-dropdown:focus-within .submenu {
    display: block;
}

.submenu a,
.submenu-disabled {
    display: block;
    padding: 3px 22px;
    color: #111;
    line-height: 1.35;
    white-space: nowrap;
}

.submenu a:hover,
.submenu a:focus {
    background: #e8f0fe;
    outline: 0;
}

.submenu .submenu-child {
    padding-left: 30px;
}

.submenu-disabled {
    color: #8b8b8b;
}

.submenu-separator {
    height: 1px;
    margin: 4px 0;
    background: #c7c7c7;
}

.bank-import-modal {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    width: 202px;
    min-height: 148px;
    padding: 0 16px 16px;
    border: 1px solid #0089b9;
    background: #eeeeee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.bank-import-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 -16px 14px;
    padding: 3px 5px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
}

.bank-import-title span {
    margin-right: auto;
}

.bank-import-title button {
    width: 30px;
    height: 18px;
    border: 1px solid #8da2b6;
    background: #dbe8f4;
    line-height: 14px;
}

.bank-import-title button:last-child {
    background: #d7695f;
    color: #fff;
}

.bank-import-button {
    justify-self: center;
    min-width: 84px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.bank-import-file-name {
    min-height: 17px;
    margin-top: 8px;
    overflow: hidden;
    color: #444;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bank-import-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    align-self: end;
}

.bank-import-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.bank-import-actions button:disabled {
    color: #8a8a8a;
}

.indexation-service-modal {
    display: grid;
    grid-template-rows: auto auto auto;
    width: 426px;
    min-height: 162px;
    padding: 0 18px 28px;
    border: 1px solid #0089b9;
    background: #eeeeee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.indexation-service-modal strong {
    margin: 12px 0 8px 6px;
    font-size: 16px;
}

.indexation-service-row {
    display: grid;
    grid-template-columns: 1fr 76px;
    gap: 14px;
    align-items: center;
}

.indexation-service-row progress {
    width: 100%;
    height: 18px;
}

.indexation-service-row button {
    height: 22px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.database-change-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 360px;
    min-height: 144px;
    border: 1px solid #d0d0d0;
    background: #f3f3f3;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
    color: #000;
    font-size: 12px;
}

.database-change-title {
    display: flex;
    align-items: center;
    height: 28px;
    padding-left: 4px;
    background: #f6f7f8;
    color: #222;
}

.database-change-title span {
    margin-right: auto;
}

.database-change-title button {
    width: 32px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #b9b9b9;
    font-size: 18px;
    line-height: 24px;
}

.database-change-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 26px 16px;
    background: #f9f9f9;
}

.database-change-body p {
    margin: 0;
    line-height: 1.15;
}

.database-change-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: #2196d3;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.database-change-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 30px;
    background: #eeeeee;
}

.database-change-actions button {
    min-width: 72px;
    height: 22px;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    background: #fff;
}

.database-change-actions button:first-child {
    border-color: #0078d4;
}

.contract-export-modal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
    width: 470px;
    min-height: 548px;
    padding: 0 22px 18px;
    border: 1px solid #7d98b3;
    background: #f2f2f2;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
}

.contract-export-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -22px 5px;
    padding: 3px 4px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
    font-size: 12px;
}

.contract-export-title button {
    width: 21px;
    height: 19px;
    border: 1px solid #9a9a9a;
    background: #e66b5e;
    color: #fff;
    font-weight: 700;
    line-height: 16px;
}

.contract-export-modal strong,
.contract-date-section h2 {
    font-size: 13px;
}

.contract-date-section h2 {
    margin: 0 0 6px;
}

.contract-date-row {
    display: grid;
    grid-template-columns: 74px 78px 92px;
    gap: 8px;
    align-items: center;
    width: 270px;
    margin: 0 auto;
}

.contract-date-row label {
    display: grid;
    grid-template-columns: auto 36px;
    gap: 5px;
    align-items: center;
    font-weight: 600;
}

.contract-date-row input {
    width: 36px;
    height: 24px;
    padding: 0 3px;
    border: 1px solid #9b9b9b;
    background: #fff;
    text-align: right;
}

.contract-date-row label:nth-child(3) input {
    width: 54px;
}

.contract-date-meta {
    display: grid;
    grid-template-columns: 60px 82px 62px 84px;
    gap: 4px;
    width: 300px;
    margin: 4px auto 0;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.contract-date-meta span {
    text-align: center;
}

.contract-type-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 32px;
    width: 360px;
    margin: 58px auto 6px;
    padding: 8px 8px 10px;
    border: 1px solid #aaa;
}

.contract-type-box legend {
    padding: 0 4px;
    font-size: 12px;
}

.contract-type-box label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.contract-export-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.contract-export-actions button {
    min-width: 72px;
    height: 28px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.stock-card-export-modal {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: 642px;
    min-height: 396px;
    padding: 0 14px 8px;
    border: 1px solid #0089b9;
    background: #eeeeee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.stock-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -14px;
    padding: 3px 5px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
}

.stock-card-title button {
    width: 24px;
    height: 20px;
    border: 1px solid #9a9a9a;
    background: #dfe6ee;
    line-height: 16px;
}

.stock-card-move {
    width: 140px;
    height: 28px;
    margin: 0 0 2px;
    border: 1px solid #d6d6d6;
    background: #f8f8f8;
    text-align: center;
}

.stock-card-body {
    display: grid;
    grid-template-columns: 86px 248px 238px;
    gap: 12px;
    align-items: start;
}

.stock-card-print-mark {
    display: grid;
    place-items: center;
    width: 78px;
    height: 185px;
    margin-top: 0;
    overflow: hidden;
    border: 1px solid #d3d3d3;
    background:
        radial-gradient(circle at 70% 18%, rgba(255,255,255,.85), rgba(255,255,255,0) 26%),
        radial-gradient(circle at 56% 47%, #243a19 0, #314c22 40%, #192512 72%, #0c1309 100%);
}

.stock-card-print-mark span {
    transform: rotate(-68deg);
    color: #eee6cc;
    font-size: 34px;
    font-style: italic;
}

.stock-card-left,
.stock-card-right {
    display: grid;
    gap: 9px;
}

.stock-card-radio-group,
.stock-card-sort {
    display: grid;
    gap: 5px;
    border: 0;
    padding: 0;
    margin: 0;
}

.stock-card-main-filter {
    margin-top: 8px;
}

.stock-card-radio-group label,
.stock-card-sort label,
.stock-card-check {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 16px;
}

.stock-card-fields {
    display: grid;
    grid-template-columns: 46px 154px 26px;
    gap: 4px 6px;
    align-items: center;
    margin-top: 2px;
}

.stock-card-fields label {
    display: contents;
    font-weight: 600;
}

.stock-card-fields input,
.stock-card-select-line select,
.stock-card-state input {
    height: 22px;
    border: 1px solid #9e9e9e;
    background: #f7f7f7;
}

.stock-card-fields input {
    grid-column: 2;
}

.stock-card-fields button {
    grid-column: 3;
    grid-row: 1;
    width: 24px;
    height: 24px;
    border: 1px solid #aaa;
    background: #efefef;
}

.stock-card-sort {
    margin-top: 8px;
}

.stock-card-sort legend {
    margin-bottom: 3px;
    font-weight: 700;
}

.stock-card-select-line {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 6px;
    align-items: center;
    font-weight: 700;
}

.stock-card-select-line select {
    width: 100%;
    font-weight: 400;
}

.stock-card-state {
    display: grid;
    grid-template-columns: 40px 72px 72px;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    font-weight: 700;
}

.stock-card-state label {
    display: grid;
    grid-template-columns: auto 48px;
    gap: 5px;
    align-items: center;
}

.stock-card-state input {
    width: 48px;
    text-align: right;
    color: #777;
}

.stock-card-actions {
    display: flex;
    gap: 6px;
    margin: 6px 0 0 48px;
}

.stock-card-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.inventory-export-modal {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 420px;
    min-height: 286px;
    padding: 0 16px 8px;
    border: 1px solid #7d98b3;
    background: #eeeeee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.inventory-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 -16px;
    padding: 3px 5px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
    color: #7b8997;
}

.inventory-title span {
    margin-right: auto;
}

.inventory-title button {
    width: 30px;
    height: 18px;
    border: 1px solid #8da2b6;
    background: #dbe8f4;
    line-height: 14px;
}

.inventory-body {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 16px;
    padding-top: 10px;
}

.inventory-print-mark {
    height: 202px;
}

.inventory-content {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    align-content: start;
}

.inventory-content h2 {
    margin: 0 0 18px;
    font-size: 15px;
}

.inventory-date-options {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px 8px;
    align-items: center;
}

.inventory-date-options label,
.inventory-checks label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inventory-date-input {
    display: flex;
    align-items: center;
}

.inventory-date-input input {
    width: 134px;
    height: 22px;
    border: 1px solid #b9b9b9;
    background: #f7f7f7;
    color: #777;
}

.inventory-date-input button {
    width: 22px;
    height: 22px;
    margin-left: -1px;
    border: 1px solid #b9b9b9;
    background: #efefef;
    color: #777;
    font-size: 10px;
}

.inventory-checks {
    display: grid;
    gap: 3px;
    margin-top: 28px;
    font-weight: 700;
}

.inventory-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.inventory-actions button {
    min-width: 74px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.attendance-export-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 604px;
    min-height: 522px;
    padding: 0 30px 10px;
    border: 1px solid #0089b9;
    background: #f0f0f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.attendance-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 -30px 10px;
    padding: 3px 5px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
}

.attendance-title span {
    margin-right: auto;
}

.attendance-title button {
    width: 30px;
    height: 18px;
    border: 1px solid #8da2b6;
    background: #dbe8f4;
    line-height: 14px;
}

.attendance-title button:last-child {
    background: #d7695f;
    color: #fff;
}

.attendance-grid {
    display: grid;
    grid-template-columns: 312px 220px;
    gap: 26px;
    align-items: start;
}

.attendance-left,
.attendance-right {
    display: grid;
    align-content: start;
}

.attendance-left strong {
    margin-bottom: 10px;
}

.attendance-left .contract-date-row {
    margin-left: 38px;
    margin-right: 0;
}

.attendance-left .contract-date-meta {
    margin-left: 38px;
    margin-right: 0;
}

.attendance-type-box {
    width: 250px;
    margin: 78px 0 24px 42px;
    gap: 6px 22px;
}

.attendance-right h2,
.attendance-right h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.attendance-right h3 {
    margin-top: 2px;
}

.attendance-member-filter {
    display: grid;
    grid-template-columns: 1fr 24px;
    gap: 3px 4px;
    margin-bottom: 6px;
}

.attendance-member-filter label {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 5px;
    align-items: center;
    font-weight: 700;
}

.attendance-member-filter input {
    height: 22px;
    border: 1px solid #9e9e9e;
    background: #f7f7f7;
}

.attendance-member-filter button {
    height: 24px;
    border: 1px solid #aaa;
    background: #efefef;
}

.attendance-member-filter span {
    grid-column: 1 / -1;
    padding-left: 36px;
    font-weight: 700;
}

.attendance-check,
.attendance-statuses label,
.attendance-contract-type label {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.attendance-check {
    margin: 4px 0 8px;
    font-weight: 700;
}

.attendance-contract-type {
    display: grid;
    gap: 3px;
    margin: 0 0 4px;
    padding: 4px 7px 6px;
    border: 1px solid #aaa;
}

.attendance-contract-type legend {
    padding: 0 4px;
}

.attendance-statuses {
    display: grid;
    gap: 0;
    margin: 2px 0 16px 12px;
    font-weight: 700;
}

.attendance-count {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    align-items: center;
}

.attendance-count h3 {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.attendance-count label {
    display: grid;
    grid-template-columns: auto 68px;
    gap: 5px;
    align-items: center;
    font-weight: 700;
}

.attendance-count input {
    height: 22px;
    border: 1px solid #9e9e9e;
    background: #fff;
    text-align: right;
}

.attendance-actions {
    display: flex;
    gap: 6px;
    margin: 18px 0 0 40px;
}

.attendance-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.sales-export-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 602px;
    min-height: 530px;
    padding: 0 30px 10px;
    border: 1px solid #7d98b3;
    background: #f0f0f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.sales-grid {
    display: grid;
    grid-template-columns: 312px 220px;
    gap: 26px;
    align-items: start;
}

.sales-left strong {
    display: block;
    margin: 0 0 10px 22px;
}

.sales-left .contract-date-row,
.sales-left .contract-date-meta {
    margin-left: 38px;
    margin-right: 0;
}

.sales-type-box {
    width: 250px;
    margin: 78px 0 24px 38px;
    gap: 6px 22px;
}

.sales-right {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-top: 38px;
}

.sales-right h2 {
    margin: 0;
    font-size: 14px;
}

.sales-checks {
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    font-weight: 700;
}

.sales-checks label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sales-right select {
    width: 154px;
    height: 24px;
    border: 1px solid #9e9e9e;
    background: #f7f7f7;
}

.sales-member-button {
    width: 24px;
    height: 24px;
    border: 1px solid #8f8f8f;
    background: #efefef;
    font-size: 14px;
    line-height: 20px;
}

.sales-actions {
    display: flex;
    gap: 6px;
    margin: 18px 0 0 40px;
}

.sales-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.bank-payments-export-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 604px;
    min-height: 522px;
    padding: 0 30px 10px;
    border: 1px solid #0089b9;
    background: #f0f0f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.bank-payments-grid {
    display: grid;
    grid-template-columns: 312px 220px;
    gap: 26px;
    align-items: start;
}

.bank-payments-left strong {
    display: block;
    margin: 0 0 10px;
}

.bank-payments-left .contract-date-row,
.bank-payments-left .contract-date-meta {
    margin-left: 38px;
    margin-right: 0;
}

.bank-payments-type-box {
    width: 250px;
    margin: 78px 0 24px 42px;
    gap: 6px 22px;
}

.bank-payments-right {
    display: grid;
    align-content: start;
    padding-top: 38px;
}

.bank-payments-right h2,
.bank-payments-right h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.bank-payments-right .attendance-check {
    margin-top: 12px;
}

.bank-payments-actions {
    display: flex;
    gap: 6px;
    margin: 86px 0 0 40px;
}

.bank-payments-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.bar-purchase-export-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 604px;
    min-height: 522px;
    padding: 0 30px 10px;
    border: 1px solid #0089b9;
    background: #f0f0f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.bar-purchase-grid {
    display: grid;
    grid-template-columns: 312px 220px;
    gap: 26px;
    align-items: start;
}

.bar-purchase-right {
    display: grid;
    align-content: start;
    padding-top: 38px;
}

.bar-purchase-right h2 {
    margin: 0 0 6px;
    font-size: 14px;
}

.history-export-modal {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 628px;
    min-height: 522px;
    padding: 0 28px 10px;
    border: 1px solid #0089b9;
    background: #f0f0f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.history-grid {
    display: grid;
    grid-template-columns: 312px 236px;
    gap: 24px;
    align-items: start;
}

.history-left strong {
    display: block;
    margin: 0 0 10px;
}

.history-left .contract-date-row,
.history-left .contract-date-meta {
    margin-left: 38px;
    margin-right: 0;
}

.history-type-box {
    width: 250px;
    margin: 78px 0 24px 42px;
    gap: 6px 22px;
}

.history-right {
    display: grid;
    align-content: start;
    padding-top: 38px;
}

.history-right h2 {
    margin: 0 0 6px;
    font-size: 14px;
}

.history-right select {
    width: 154px;
    height: 24px;
    margin-bottom: 22px;
    border: 1px solid #9e9e9e;
    background: #f7f7f7;
}

.history-checks {
    display: grid;
    gap: 0;
    max-height: 320px;
    overflow: hidden;
}

.history-checks label {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 12px;
    color: #6e6e6e;
    line-height: 1;
    white-space: nowrap;
}

.history-checks input {
    width: 12px;
    height: 12px;
    margin: 0;
}

.history-actions {
    display: flex;
    gap: 6px;
    margin: 18px 0 0 34px;
}

.history-actions button {
    min-width: 72px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.membership-stats-modal {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: min(1660px, calc(100vw - 16px));
    height: min(868px, calc(100vh - 16px));
    padding: 0 18px 10px;
    border: 1px solid #7d98b3;
    background: #eeeeee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    color: #000;
    font-size: 12px;
}

.membership-stats-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 -18px 10px;
    padding: 3px 5px 3px 8px;
    border-bottom: 1px solid #b5b5b5;
    background: linear-gradient(#dfefff, #c1d8ef);
}

.membership-stats-title span {
    margin-right: auto;
}

.membership-stats-title button {
    width: 30px;
    height: 18px;
    border: 1px solid #8da2b6;
    background: #dbe8f4;
    line-height: 14px;
}

.membership-stats-title button:last-child {
    background: #d7695f;
    color: #fff;
}

.membership-stats-toolbar {
    display: flex;
    align-items: center;
    gap: 38px;
    margin: 0 0 18px 18px;
}

.membership-stats-toolbar label {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
}

.membership-stats-toolbar input {
    width: 132px;
    height: 22px;
    border: 1px solid #8c8c8c;
    background: #fff;
    color: #fff;
    text-align: right;
    background-color: #0078d7;
}

.membership-stats-grid-wrap {
    min-height: 0;
    overflow: auto;
    border-left: 1px solid #000;
    border-bottom: 1px solid #b9b9b9;
    background: #fff;
}

.membership-stats-grid {
    min-width: 1530px;
    border-collapse: collapse;
    table-layout: fixed;
}

.membership-stats-grid th,
.membership-stats-grid td {
    height: 28px;
    min-width: 58px;
    padding: 2px 4px;
    border: 1px solid #b9b9b9;
    text-align: right;
    white-space: nowrap;
}

.membership-stats-grid thead th {
    height: 40px;
    border-color: #000;
    background: #f4f4f4;
    text-align: center;
    font-weight: 700;
    line-height: 1.1;
}

.membership-stats-grid tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 110px;
    width: 110px;
    border-left: 0;
    background: #eeeeee;
    text-align: left;
    font-weight: 700;
}

.membership-stats-grid .row-marker {
    width: 12px;
    min-width: 12px;
    padding: 0;
    border-left-color: #000;
    background: #f2f2f2;
    text-align: center;
}

.membership-stats-grid tbody tr:nth-child(even) td {
    background: #eeeeee;
}

.membership-stats-grid tbody tr:nth-child(odd) td {
    background: #fff;
}

.membership-stats-grid tbody td:nth-child(n+9):nth-child(-n+14) {
    background: #93fb9a;
}

.membership-stats-grid tbody td:nth-child(n+15):nth-child(-n+20) {
    background: #ffff99;
}

.membership-stats-grid tbody td:nth-child(n+21) {
    background: #cdce9c;
}

.membership-stats-actions {
    display: flex;
    gap: 6px;
    margin: 10px 0 0 96px;
}

.membership-stats-actions button {
    min-width: 74px;
    height: 26px;
    border: 1px solid #8f8f8f;
    background: linear-gradient(#fff, #e9e9e9);
}

.current-user {
    width: 190px;
    margin-left: auto;
    overflow: hidden;
    color: #263548;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form {
    margin-left: 12px;
}

.logout-form button {
    height: 24px;
    padding: 0 10px;
}

.flash-wrap {
    position: fixed;
    z-index: 10;
    top: 36px;
    right: 18px;
}

.flash {
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line-dark);
    background: white;
    opacity: 1;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-4px);
}

.flash.error {
    border-color: #d66;
}

.flash.success {
    border-color: #55a663;
}

.app-shell {
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: calc(100vh - 29px);
}

.side-nav {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 29px);
    padding: 0 14px;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(150deg, #141f30 0%, #1c2838 52%, #172650 100%);
    color: #dbe7f7;
    font-family: "Aptos Narrow", "Arial Narrow", "Segoe UI", Arial, sans-serif;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.brand span {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand.has-white-bg span {
    color: #0b1220;
}

.brand img {
    display: block;
    max-width: 210px;
    max-height: 76px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: translateX(-5px);
}

.brand.has-white-bg {
    background: white;
}

.side-nav-links {
    flex: 1;
    padding: 18px 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 46px;
    margin: 0 0 9px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #dbe7f7;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.side-nav a.active,
.side-nav a:hover {
    border-color: rgba(96, 165, 250, 0.12);
    color: #7db5ff;
    background: rgba(59, 130, 246, 0.16);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.side-nav-section {
    margin: 20px 8px 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    color: #7f8da3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-account {
    margin: 0 -14px;
    padding: 20px 26px 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.side-account-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.side-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #bfdbfe;
    background: #2547a8;
    font-weight: 800;
}

.side-account-text {
    min-width: 0;
}

.side-account-name {
    overflow: hidden;
    color: white;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-account-role {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #98a6ba;
    font-size: 13px;
}

.side-account-role span {
    padding: 1px 5px;
    border-radius: 4px;
    color: white;
    background: rgba(148, 163, 184, 0.28);
    font-size: 10px;
    font-weight: 800;
}

.side-account-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef4ff;
    font-size: 14px;
    font-weight: 800;
}

.side-account-actions a,
.side-account-actions button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.logout-icon {
    width: 17px;
    height: 17px;
}

.side-account-actions a:hover,
.side-account-actions button:hover {
    color: #93c5fd;
    background: transparent;
}

.side-logout-form {
    margin: 0;
}

.workspace {
    position: relative;
    padding: 18px 24px 24px;
    overflow: hidden;
}

.page-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.command-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.tabs button,
.excel-grid th button {
    border: 1px solid #888;
    background: #ddd;
}

.search-box {
    display: flex;
    align-items: center;
    width: 224px;
    height: 32px;
    border: 1px solid #cfd7e2;
    border-radius: 0;
    background: #f8fafc;
    color: #7b8796;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}

.search-box span {
    width: 34px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.search-box input {
    width: 100%;
    height: 100%;
    padding: 0 12px 0 0;
    border: 0;
    outline: 0;
    color: #344050;
    background: transparent;
}

.search-box input::placeholder {
    color: #8c98a8;
}

.filter-chip {
    height: 32px;
    padding: 0 14px;
    border: 1px solid #cfd7e2;
    color: #314055;
    background: linear-gradient(#ffffff, #eef3f8);
    font-size: 14px;
}

.filter-chip:hover {
    border-color: #9fb0c3;
    background: #fff;
}

.column-picker {
    position: relative;
}

.column-menu {
    position: absolute;
    z-index: 30;
    top: 36px;
    left: 0;
    width: 230px;
    padding: 7px;
    border: 1px solid #8f9bad;
    background: white;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    color: #111;
    font-size: 13px;
}

.column-menu-title {
    padding: 2px 4px 7px;
    border-bottom: 1px solid #d5dce5;
    font-weight: 700;
    color: #102033;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 24px;
    white-space: nowrap;
}

.column-option input {
    width: 14px;
    height: 14px;
    margin: 0;
}

.column-option-list {
    padding-top: 5px;
}

.column-menu-actions {
    margin-top: 6px;
    padding-top: 7px;
    border-top: 1px solid #d5dce5;
}

.column-reset {
    width: 100%;
    height: 28px;
    border: 1px solid #a8b3c2;
    background: #f4f7fb;
    color: #102033;
    font: inherit;
    cursor: pointer;
}

.column-reset:hover {
    background: #eaf1fb;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 8px minmax(460px, 1.15fr);
    height: calc(100vh - 155px);
    min-height: 420px;
}

.split-layout.detail-collapsed {
    grid-template-columns: minmax(0, 1fr) 0 0 !important;
}

.split-layout.detail-collapsed .splitter,
.split-layout.detail-collapsed .detail-panel {
    display: none;
}

.trainers-layout {
    grid-template-columns: minmax(420px, 1fr) 8px minmax(420px, 0.9fr);
}

.cards-layout {
    grid-template-columns: minmax(460px, 1fr) 8px minmax(460px, 0.9fr);
}

.cash-layout {
    grid-template-columns: minmax(560px, 1.2fr) 8px minmax(460px, 0.8fr);
}

.bar-layout {
    grid-template-columns: minmax(520px, 1.15fr) 8px minmax(390px, 0.85fr);
}

.cart-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    border: 1px solid #cbd5e1;
    background: #f7f9fb;
}

.cart-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 10px;
    border-bottom: 1px solid #cbd5e1;
}

.cart-panel-head h2 {
    margin: 0;
    font-size: 14px;
}

.cart-tools {
    display: flex;
    gap: 7px;
}

.cart-scroll {
    min-height: 0;
    overflow: auto;
    background: white;
}

.cart-grid {
    min-width: 100%;
}

.cart-grid td:nth-child(2),
.cart-grid td:nth-child(3),
.cart-grid td:nth-child(4) {
    background: #dcffd9;
}

.cart-checkout {
    display: grid;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #cbd5e1;
    background: #f7f9fb;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
}

.cart-total-row strong {
    font-size: 18px;
}

.cart-payment-options {
    display: grid;
    gap: 7px;
}

.receipt-options label {
    display: grid;
    gap: 4px;
}

.receipt-options select {
    height: 27px;
    border: 1px solid #9eabba;
    background: white;
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cart-actions button {
    min-width: 86px;
    height: 29px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.receipt-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border: 1px solid #6e8ca8;
    background: #f4f6f9;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
}

.receipt-modal-head,
.receipt-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #cbd5e1;
}

.receipt-modal-actions {
    justify-content: flex-end;
    border-top: 1px solid #cbd5e1;
    border-bottom: 0;
}

.receipt-modal button {
    min-width: 74px;
    height: 28px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.receipt-preview-shell {
    display: grid;
    place-items: start center;
    overflow: auto;
    padding: 18px;
    background: #dfe5ed;
}

.receipt-paper {
    color: #111;
    background: white;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    font-family: "Arial", sans-serif;
}

.receipt-paper.thermal {
    width: 260px;
    padding: 12px;
    font-size: 12px;
}

.receipt-paper.standard {
    width: 560px;
    min-height: 760px;
    padding: 32px;
    font-size: 14px;
}

.receipt-title {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 800;
}

.receipt-meta,
.receipt-row,
.receipt-total {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.receipt-meta {
    margin-bottom: 10px;
    color: #334155;
}

.receipt-row {
    padding: 4px 0;
    border-top: 1px dashed #cbd5e1;
}

.receipt-row small {
    display: block;
    color: #64748b;
}

.receipt-total {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 2px solid #111;
    font-size: 16px;
    font-weight: 800;
}

.receipt-qr-placeholder {
    display: none;
    margin: 14px auto 0;
    width: 128px;
    height: 128px;
    place-items: center;
    border: 1px solid #111;
    background:
        linear-gradient(45deg, #111 25%, transparent 25%),
        linear-gradient(-45deg, #111 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #111 75%),
        linear-gradient(-45deg, transparent 75%, #111 75%);
    background-color: white;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    color: white;
    font-size: 11px;
    text-align: center;
}

.receipt-paper.show-qr .receipt-qr-placeholder {
    display: grid;
}

.grid-panel,
.detail-panel {
    border: 1px solid #cbd5e1;
    background: white;
    overflow: hidden;
}

.grid-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.grid-scroll {
    min-height: 0;
    overflow: auto;
}

.splitter {
    background: #dce6f2;
    border-left: 1px solid #c8d2df;
    border-right: 1px solid #c8d2df;
    cursor: col-resize;
}

.splitter:hover,
body.is-resizing .splitter {
    background: #b8cbe2;
}

body.is-resizing {
    cursor: col-resize;
    user-select: none;
}

.excel-grid {
    border-collapse: collapse;
    width: max-content;
    min-width: max-content;
    table-layout: auto;
    font-size: 13px;
}

.excel-grid th,
.excel-grid td {
    height: 22px;
    max-height: 22px;
    padding: 0 4px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.excel-grid [data-column-hidden="true"] {
    display: none;
}

.excel-grid th {
    position: relative;
    height: 22px;
    max-height: 22px;
    font-size: 13px;
    font-weight: 400;
    overflow: visible;
    text-align: left;
    background: #f7f7f7;
    cursor: grab;
    user-select: none;
}

.excel-grid th.is-dragging {
    opacity: 0.55;
}

.excel-grid th.is-drop-target {
    outline: 2px solid #2f6df6;
    outline-offset: -2px;
}

.excel-grid th.number,
.excel-grid td.number {
    text-align: right;
}

.excel-grid th.select-column,
.excel-grid td.select-column {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    text-align: center;
}

.excel-grid th.select-column {
    cursor: default;
}

.row-select {
    width: 14px;
    height: 14px;
    margin: 0;
    vertical-align: middle;
}

.excel-grid th button {
    width: 18px;
    height: 18px;
    margin-left: 3px;
    padding: 0;
    border-color: #f7f7f7;
    color: #111;
    background: #f7f7f7;
    line-height: 14px;
}

.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}

.column-resizer:hover {
    background: rgba(47, 109, 246, 0.16);
}

body.is-column-resizing {
    cursor: col-resize;
    user-select: none;
}

body.is-column-dragging {
    cursor: grabbing;
    user-select: none;
}

.excel-grid th button.is-active {
    color: #c60000;
}

body.filters-hidden .excel-grid th button:not(.is-active) {
    visibility: hidden;
}

.excel-grid.filters-hidden th button:not(.is-active) {
    visibility: hidden;
}

.filter-menu {
    position: absolute;
    z-index: 20;
    top: 22px;
    left: 0;
    min-width: 220px;
    max-width: 320px;
    padding: 7px;
    border: 1px solid #8f9bad;
    background: white;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    color: #111;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    white-space: nowrap;
}

.filter-option-strong {
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid #d6dce5;
}

.filter-option input {
    width: 14px;
    height: 14px;
    margin: 0;
}

.filter-option-list {
    max-height: 230px;
    overflow: auto;
}

.excel-grid tr.selected td {
    background: #e9f3ff;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 4px 7px;
    border-top: 1px solid #b9c4d2;
    background: linear-gradient(#f6f8fb, #e9edf3);
    font-size: 14px;
}

.grid-tool-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 9px;
    border-right: 1px solid #c5ceda;
}

.grid-tool-group button {
    min-width: 30px;
    height: 26px;
    padding: 0 6px;
    border: 1px solid transparent;
    color: #223044;
    background: transparent;
    font-size: 14px;
    line-height: 24px;
}

.grid-tool-group button:hover {
    border-color: #9aa8b8;
    background: #fff;
}

.grid-tool-group .tool-add {
    color: #03852d;
    font-size: 18px;
    font-weight: 700;
}

.grid-tool-group .tool-edit {
    color: #145cc8;
    font-weight: 700;
}

.grid-tool-group .tool-delete {
    color: #b51d1d;
    font-size: 18px;
    font-weight: 700;
}

.grid-tool-group .tool-refresh {
    font-size: 18px;
    color: #3f6f98;
}

.export-action {
    position: relative;
}

.export-menu {
    position: absolute;
    z-index: 5;
    left: 0;
    bottom: 25px;
    display: none;
    min-width: 74px;
    padding: 3px;
    border: 1px solid #9aa8b8;
    background: white;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.export-action:hover .export-menu,
.export-action:focus-within .export-menu {
    display: grid;
    gap: 2px;
}

.export-menu button,
.export-menu a {
    display: block;
    width: 100%;
    padding: 3px 7px;
    color: #223044;
    text-decoration: none;
    text-align: left;
}

.export-menu a:hover {
    background: #edf3fb;
}

.grid-status {
    display: flex;
    gap: 18px;
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.detail-panel {
    position: relative;
    padding: 12px;
}

.detail-toggle {
    min-width: 48px;
    margin-left: auto;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 30px;
}

.detail-toggle:hover {
    border-color: #aeb8c4;
    background: #fff;
}

.tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin-bottom: -1px;
}

.tabs button {
    height: 27px;
    padding: 0 10px;
    border: 1px solid #b8c2cf;
    border-bottom-color: #b8c2cf;
    color: #111;
    background: #f7f9fb;
}

.tabs button.active {
    border-top: 3px solid #1976d2;
    border-bottom-color: white;
    color: #075fa8;
    background: white;
    font-weight: 600;
}

.settings-tabs {
    margin-bottom: 12px;
}

.settings-tabs a {
    height: 27px;
    padding: 5px 12px 0;
    border: 1px solid #b8c2cf;
    color: #111;
    background: #f7f9fb;
    text-decoration: none;
}

.settings-tabs a.active {
    border-top: 3px solid #1976d2;
    border-bottom-color: white;
    color: #075fa8;
    background: white;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(520px, 1.05fr) minmax(420px, 0.95fr);
    gap: 12px;
    height: calc(100vh - 186px);
    min-height: 420px;
}

.stock-settings-grid {
    grid-template-columns: minmax(540px, 1fr) 8px minmax(420px, 0.86fr);
    gap: 0;
}

.settings-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    border: 1px solid #cbd5e1;
    background: white;
    overflow: hidden;
}

.stock-settings-grid .settings-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.stock-movements-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
}

.settings-panel-tools {
    min-height: 38px;
    padding: 5px 8px;
    border-bottom: 1px solid #dbe3ee;
    background: #f8fafc;
}

.settings-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 10px;
    border-bottom: 1px solid #cbd5e1;
    background: #f7f9fb;
}

.settings-panel-head h2 {
    margin: 0;
    font-size: 15px;
}

.settings-panel-head span {
    color: var(--muted);
}

.settings-form {
    min-height: calc(100vh - 160px);
    padding: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    overflow: auto;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 360px));
    gap: 12px;
    align-items: start;
}

.settings-form-grid.compact {
    grid-template-columns: 150px 220px;
}

.settings-form-grid.reader-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.settings-form-grid.printer-grid {
    grid-template-columns: 170px minmax(220px, 1fr) minmax(220px, 1fr);
}

.settings-form fieldset {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid #c8d1dc;
    background: #f4f6f8;
}

.settings-form legend {
    padding: 0 6px;
    font-weight: 600;
}

.settings-form label {
    display: grid;
    gap: 3px;
    color: #111827;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
    min-width: 0;
    min-height: 25px;
    padding: 2px 6px;
    border: 1px solid #aeb8c4;
    background: white;
    font: inherit;
}

.settings-form textarea {
    min-height: 86px;
    resize: vertical;
}

.settings-form input[type="color"] {
    width: 78px;
    padding: 1px;
}

.settings-form input[type="checkbox"],
.settings-form input[type="radio"] {
    min-height: auto;
    padding: 0;
}

.check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 6px;
}

.settings-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.settings-actions button,
.device-buttons button,
.settings-form button {
    min-width: 80px;
    height: 29px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.split-settings {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(260px, 360px);
    gap: 14px;
    align-items: start;
}

.users-settings {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(220px, 300px) minmax(260px, 360px);
    gap: 14px;
    align-items: start;
}

.address-settings-grid {
    grid-template-columns: minmax(620px, 1.05fr) 8px minmax(520px, 0.95fr);
    gap: 0;
}

.address-list-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.address-list-panel .settings-panel-tools {
    border-bottom: 1px solid #cbd5e1;
}

.address-detail-panel {
    grid-template-rows: auto minmax(0, 1fr);
    background: #f8fafc;
}

.address-detail-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    padding: 0;
    overflow: auto;
}

.address-subtabs {
    display: flex;
    align-items: end;
    margin: 0;
    padding: 6px 8px 0;
    border-bottom: 1px solid #cbd5e1;
    background: #eef3f8;
}

.address-subtabs button {
    min-width: 78px;
    height: 27px;
    padding: 5px 12px 0;
    border: 1px solid #b8c2cf;
    border-bottom: 0;
    background: #f7f9fb;
    text-align: center;
    font: inherit;
    cursor: pointer;
}

.address-subtabs button.active {
    border-top: 3px solid #1976d2;
    background: white;
    color: #075fa8;
    font-weight: 700;
}

.address-detail-grid {
    display: none;
}

.address-detail-grid.active {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    gap: 10px;
    padding: 10px;
    align-content: start;
    overflow: auto;
}

.address-wide-card {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
}

.address-contact-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.address-contact-scroll {
    min-height: 180px;
    max-height: 420px;
}

.address-contact-table {
    min-width: 760px;
}

.address-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    align-content: start;
    margin: 0;
    padding: 12px;
    border: 1px solid #c8d1dc;
    background: #f4f6f8;
}

.address-card legend {
    padding: 0 6px;
    font-weight: 700;
}

.address-card label {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: #111827;
}

.address-card input,
.address-card textarea {
    width: 100%;
    min-width: 0;
    min-height: 25px;
    padding: 2px 6px;
    border: 1px solid #aeb8c4;
    background: white;
    font: inherit;
}

.address-card input[readonly],
.address-card textarea[readonly] {
    color: #0f172a;
    background: white;
}

.address-card .span-2,
.address-actions {
    grid-column: 1 / -1;
}

.address-ares-card {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    padding-bottom: 8px;
}

.address-card textarea {
    min-height: 92px;
    resize: vertical;
}

.ares-search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 88px;
    gap: 8px;
}

.ares-search-row input {
    border-color: #8fbf9a;
    background: #eef8f0;
}

.ares-search-row input:focus {
    outline: 1px solid #5aa66b;
    background: #f6fff7;
}

.ares-search-row button {
    height: 27px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.ares-result-list {
    display: grid;
    gap: 4px;
    min-height: 34px;
    max-height: 128px;
    overflow: auto;
    padding-top: 4px;
}

.address-card:has(.ares-result-list:empty) .ares-result-list {
    display: none;
}

.ares-result-item,
.ares-result-message {
    padding: 6px 8px;
    border: 1px solid #d6dee9;
    background: white;
}

.ares-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
}

.ares-result-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ares-result-item button {
    min-width: 68px;
    height: 25px;
}

.ares-result-item span,
.ares-result-message {
    color: var(--muted);
}

.address-actions {
    justify-content: center;
    margin-top: 0;
}

.address-actions button {
    min-width: 80px;
    height: 29px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.table-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 4px 8px;
    border-top: 1px solid #cbd5e1;
    background: #eef3f8;
    color: #4b5563;
}

.table-status-row > div {
    display: flex;
    gap: 8px;
}

.table-action.subtle {
    min-width: 64px;
    height: 24px;
    border: 1px solid #c1ccd8;
    background: #f8fafc;
}

.settings-user-table {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 360px;
}

.settings-user-table .command-row {
    margin-bottom: 0;
    padding-bottom: 4px;
}

.settings-user-table .grid-scroll {
    border: 1px solid #cbd5e1;
    background: white;
}

.about-settings {
    display: grid;
    grid-template-columns: 380px 600px;
    column-gap: 26px;
    row-gap: 0;
    padding-right: 26px;
    align-items: start;
}

.about-main-column {
    display: grid;
    gap: 10px;
    align-items: start;
}

.registration-fieldset {
    width: 380px;
}

.about-side-column {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 706px;
}

.rounding-row {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    gap: 26px;
    align-items: start;
}

.rounding-fieldset {
    width: 280px;
    min-height: 135px;
}

.span-all {
    grid-column: 1 / -1;
}

.settings-list {
    min-height: 310px;
    background: white;
}

.settings-subtabs {
    display: flex;
    align-items: end;
    margin: 6px 0 0;
}

.settings-subtabs span {
    padding: 6px 12px;
    border: 1px solid #c8d1dc;
    background: #f7f9fb;
}

.settings-subtabs .active {
    border-bottom-color: white;
    background: white;
    font-weight: 600;
}

.price-grid input {
    width: 100%;
    border: 1px solid #9eabba;
}

.inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.inline-fields label {
    min-width: 130px;
}

.about-vat-fields {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: 10px;
}

.about-vat-fields label {
    min-width: 0;
}

.schedule-days {
    display: grid;
    grid-template-columns: 80px repeat(4, 70px);
    gap: 6px;
    align-items: center;
}

.rights-grid,
.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 6px 12px;
}

.wide-label {
    max-width: 620px;
    margin-top: 12px;
}

.about-actions {
    display: flex;
    justify-content: flex-start;
}

.brand-fieldset {
    align-self: end;
    width: 600px;
    min-height: 230px;
    align-content: start;
}

.brand-editor-row {
    display: grid;
    grid-template-columns: 265px 1fr;
    gap: 16px;
    align-items: center;
}

.brand-preview {
    display: grid;
    place-items: center;
    width: 265px;
    height: 118px;
    padding: 10px;
    overflow: hidden;
    border: 1px solid #6f7782;
    background:
        linear-gradient(45deg, #eceff4 25%, transparent 25%),
        linear-gradient(-45deg, #eceff4 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eceff4 75%),
        linear-gradient(-45deg, transparent 75%, #eceff4 75%);
    background-color: white;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    background-size: 18px 18px;
    box-sizing: border-box;
}

.brand-preview.has-white-bg {
    background: white;
}

.brand-preview .brand-preview-logo {
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.brand-preview span {
    max-width: 235px;
    overflow: hidden;
    color: #0b1220;
    font-size: 24px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-switches {
    display: grid;
    gap: 12px;
    align-content: center;
}

.stock-edit-button,
.stock-add-button,
.stock-remove-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #168238;
    color: #09872f;
    background: #f5fff8;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.stock-edit-button {
    border-color: #2f6df6;
    color: #1554c0;
    background: #f3f7ff;
}

.stock-edit-button:hover {
    background: #e8f0ff;
}

.stock-add-button:hover {
    background: #e8fbef;
}

.stock-remove-button {
    border-color: #b54747;
    color: #b42318;
    background: #fff7f7;
}

.stock-remove-button:hover {
    background: #ffecec;
}

.inline-category-form {
    margin: 0;
}

.inline-category-form select {
    width: 100%;
    min-width: 110px;
    height: 20px;
    border: 0;
    background: transparent;
    font: inherit;
}

.inline-category-form select:focus {
    outline: 1px solid #2f6df6;
    background: white;
}

.movement-sale-row td {
    color: #b42318;
}

.stock-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 8px;
    padding: 8px;
    border-top: 1px solid #cbd5e1;
    background: #f8fafc;
}

.stock-summary div {
    min-height: 48px;
    padding: 7px 9px;
    border: 1px solid #d7dee8;
    background: white;
}

.stock-summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.stock-summary strong {
    font-size: 15px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.18);
}

.modal-backdrop[hidden] {
    display: none;
}

.stock-modal,
.product-edit-modal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 340px;
    padding: 14px 28px 18px;
    border: 1px solid #6e8ca8;
    background: #f4f6f9;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
}

.product-edit-modal {
    width: min(920px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.stock-modal-title {
    margin: -14px -28px 6px;
    padding: 6px 10px;
    border-bottom: 1px solid #b7c7d8;
    background: linear-gradient(#eaf4ff, #c9dcee);
    font-weight: 600;
}

.stock-modal strong {
    margin-bottom: 4px;
}

.stock-modal label {
    display: grid;
    grid-template-columns: 1fr 120px;
    align-items: center;
    gap: 10px;
}

.stock-modal input,
.product-edit-modal input,
.product-edit-modal select {
    height: 26px;
    padding: 0 6px;
    border: 1px solid #9eabba;
    background: white;
}

.product-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 9px 14px;
}

.product-edit-grid label {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.product-edit-grid .span-2 {
    grid-column: 1 / -1;
}

.category-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) repeat(3, auto);
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #cbd5e1;
}

.category-tools legend {
    padding: 0 4px;
    font-weight: 600;
}

.stock-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.stock-modal-actions button {
    min-width: 74px;
    height: 28px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.detail-form {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 10px 12px;
    min-height: 400px;
    padding: 14px 12px;
    border: 1px solid var(--line-dark);
}

.detail-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.detail-form input,
.detail-form select {
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--line-dark);
    background: #fff;
    font-size: 14px;
}

.detail-form.is-editing input:not([type="hidden"]),
.detail-form.is-editing textarea,
.detail-form.is-editing select {
    background: #fffef0;
    border-color: #7aa7d9;
}

.detail-form .wide {
    grid-column: span 2;
}

.trainer-form {
    grid-template-rows: repeat(4, max-content) 1fr;
}

.card-form {
    grid-template-rows: repeat(5, max-content) 1fr;
}

.cash-form {
    grid-template-columns: 1fr 1fr 120px;
    align-content: start;
}

.bar-form {
    grid-template-columns: 1fr 1fr 120px;
    align-content: start;
}

.check-field {
    flex-direction: row !important;
    align-items: center;
    gap: 9px !important;
}

.check-field input {
    width: 16px;
    height: 16px;
}

.card-box {
    background:
        linear-gradient(90deg, #ecf2f8 0 34%, transparent 34% 100%),
        linear-gradient(#f8fafc, #dfe8f2);
}

.cash-box {
    background:
        linear-gradient(#f8fafc, #dbe6f1),
        repeating-linear-gradient(0deg, transparent 0 10px, rgba(120, 137, 157, 0.18) 10px 11px);
}

.bar-box {
    background:
        linear-gradient(135deg, rgba(12, 71, 88, 0.08), rgba(67, 126, 94, 0.14)),
        linear-gradient(#f8fafc, #e2edf1);
}

.number-input {
    text-align: right;
}

.photo-box {
    grid-row: span 3;
    width: 120px;
    height: 114px;
    border: 1px solid var(--line-dark);
    background:
        linear-gradient(45deg, transparent 49%, #a8b3c0 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, #a8b3c0 50%, transparent 51%);
}

.tab-panels {
    height: calc(100% - 26px);
    border: 1px solid var(--line-dark);
    background: white;
}

.tab-panel {
    display: none;
    height: 100%;
    min-height: 0;
}

.tab-panel.active {
    display: block;
}

.tab-panel .detail-form {
    height: 100%;
    border: 0;
}

.member-detail-form {
    grid-template-columns: minmax(560px, 1fr) 116px;
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 14px;
    row-gap: 12px;
    align-content: start;
    overflow: auto;
}

.member-detail-main {
    display: grid;
    grid-template-columns: 82px 132px minmax(220px, 1fr) 96px;
    grid-template-areas:
        "title first last birth"
        "code phone email email"
        "zip city street street"
        "document document document document"
        "schedule schedule . .";
    gap: 8px 10px;
    align-content: start;
}

.member-detail-main .title-field { grid-area: title; }
.member-detail-main .first-name-field { grid-area: first; }
.member-detail-main .last-name-field { grid-area: last; }
.member-detail-main .birth-field { grid-area: birth; }
.member-detail-main .code-field { grid-area: code; }
.member-detail-main .phone-field { grid-area: phone; }
.member-detail-main .email-picker { grid-area: email; }
.member-detail-main .zip-field { grid-area: zip; }
.member-detail-main .city-field { grid-area: city; }
.member-detail-main .street-field { grid-area: street; }
.member-detail-main .document-picker { grid-area: document; }
.member-detail-main .schedule-field { grid-area: schedule; }

.member-detail-main .span-3,
.member-credit-panel {
    grid-column: 1 / -1;
}

.member-note-field {
    grid-column: 1 / -1;
}

.member-detail-main textarea,
.member-note-field textarea {
    min-height: 56px;
    padding: 6px;
    border: 1px solid var(--line-dark);
    resize: vertical;
    font: inherit;
}

.member-detail-main .email-picker span,
.member-detail-main .document-picker span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 5px;
}

.member-detail-main button,
.member-photo-panel button {
    height: 26px;
    border: 1px solid #9eabba;
    background: #f7f9fb;
}

.member-photo-panel {
    display: grid;
    grid-template-rows: auto 28px;
    gap: 8px;
    justify-items: end;
    align-content: start;
}

.member-photo-box {
    grid-row: auto;
    width: 106px;
    height: 126px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.member-photo-box.has-photo {
    background-color: white;
}

.member-options-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(145px, 1fr));
    gap: 8px 20px;
    align-items: center;
}

.member-options-panel select {
    height: 26px;
    border: 1px solid var(--line-dark);
    background: #fff;
    font: inherit;
}

.member-options-panel .potential-field { grid-column: 1; grid-row: 1; }
.member-options-panel .vip-field { grid-column: 1; grid-row: 2; }
.member-options-panel .discounted-field { grid-column: 1; grid-row: 3; }
.member-options-panel .edit-membership-field { grid-column: 2; grid-row: 2; }
.member-options-panel .use-bar-field { grid-column: 2; grid-row: 3; }
.member-options-panel .price-1-field { grid-column: 3; grid-row: 2; }
.member-options-panel .price-2-field { grid-column: 3; grid-row: 3; }

.member-credit-panel {
    display: grid;
    grid-template-columns: 82px 110px 112px 112px;
    gap: 8px 12px;
    align-items: end;
    max-width: 460px;
}

.related-grid-wrap {
    height: 100%;
    overflow: auto;
}

.related-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.related-grid th,
.related-grid td {
    height: 24px;
    padding: 0 7px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9fb;
    font-weight: 600;
    text-align: left;
}

.related-grid .empty-cell {
    height: 72px;
    color: var(--muted);
    text-align: center;
}

.note-panel {
    padding: 12px;
}

.note-panel textarea {
    width: 100%;
    height: 100%;
    min-height: 280px;
    padding: 10px;
    border: 1px solid var(--line-dark);
    resize: none;
    font: inherit;
}

.summary-panel,
.placeholder-panel {
    padding: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px;
}

.summary-grid div {
    min-height: 58px;
    padding: 10px;
    border: 1px solid #d7dee8;
    background: #f8fafc;
}

.summary-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.summary-grid strong {
    font-size: 16px;
}

.placeholder-panel {
    color: var(--muted);
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 29px);
    place-items: center;
    background: linear-gradient(135deg, var(--nav-a), #172650 45%, var(--nav-b));
}

.auth-card {
    width: min(380px, calc(100vw - 32px));
    padding: 26px 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.auth-card h1 {
    margin: 0 0 8px;
}

.auth-card p {
    margin: 0 0 22px;
    color: #c7d2e8;
}

.auth-card form {
    display: grid;
    gap: 9px;
}

.auth-card input {
    height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(11, 24, 43, 0.7);
}

.auth-card .check-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.auth-card .check-row input {
    width: 16px;
    height: 16px;
}

.primary-button {
    height: 42px;
    margin-top: 8px;
    border: none;
    color: white;
    background: #2f6df6;
    font-weight: 700;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}

.auth-links a {
    color: #9dc2ff;
}
