:root {
  --ink: #14272a;
  --ink-soft: #314a44;
  --muted: #547067;
  --paper: #f4f5ef;
  --card: #fffefa;
  --line: #dfe4d8;
  --teal: #1b675f;
  --teal-deep: #164d49;
  --teal-tint: #e6f1eb;
  --lime: #d4df75;
  --amber: #d99b4b;
  --rose: #b8584c;
  --shadow: 0 16px 40px rgba(27, 51, 47, .055);
  --sans: "Manrope", "Avenir Next", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(27,103,95,.26); outline-offset: 2px; }

/* Shell & Navigation */
.app-shell { min-height: 100dvh; }
.sidebar { width: 260px; background: #163637; color: #dbe7dc; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 28px 18px 18px; z-index: 10; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 12px; color: #f7f8ef; }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: end; gap: 3px; padding: 7px 6px; background: var(--lime); border-radius: 9px 9px 9px 3px; transform: rotate(-4deg); }
.brand-mark span { width: 4px; border-radius: 3px 3px 1px 1px; background: #245451; display: block; }
.brand-mark span:nth-child(1) { height: 9px; opacity: .62; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 19px; opacity: .8; }
.brand-name { font-size: 19px; line-height: 1.1; font-weight: 800; letter-spacing: -.6px; }
.brand-period { color: var(--lime); }
.brand-name small { display: block; color: #9bb6b1; font-size: 11px; font-weight: 750; letter-spacing: 1.5px; margin-top: 5px; }
.sidebar-label { margin: 42px 12px 12px; color: #8ba7a2; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; }
.main-nav { display: grid; gap: 6px; }
.nav-link { min-height: 46px; display: flex; align-items: center; gap: 12px; border-radius: 8px; padding: 0 14px; color: #b7cbbf; font-size: 14px; font-weight: 650; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.nav-link.is-active { color: #f7f8ef; background: #26544e; box-shadow: inset 3.5px 0 var(--lime); }
.nav-index { color: #8ba7a2; font: 12.5px var(--mono); width: 22px; font-weight: 700; }
.nav-link.is-active .nav-index { color: var(--lime); }
.nav-active-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--lime); }
.sidebar-bottom { margin-top: auto; }
.desk-card { margin: 0 5px 18px; border: 1px solid rgba(201,224,204,.18); border-radius: 10px; padding: 16px 15px; background: rgba(255,255,255,.05); }
.desk-card-top { font-size: 11.5px; letter-spacing: 1.2px; font-weight: 800; display: flex; align-items: center; gap: 7px; color: #a2bcb5; }
.status-dot,.local-status i,.live-tag i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a8c56b; box-shadow: 0 0 0 3px rgba(168,197,107,.18); }
.desk-card p { color: #ffffff; font-size: 14.5px; font-weight: 700; margin: 10px 0 6px; }
.desk-card-foot { font: 12.5px var(--mono); color: #9bb6b1; font-weight: 550; }
.sidebar-user { display: flex; align-items: center; gap: 11px; padding: 16px 8px 0; border-top: 1px solid rgba(211,230,214,.14); }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #224642; background: #d7dfae; font-size: 12px; font-weight: 800; }
.user-copy { display: grid; gap: 2px; }
.user-copy strong { color: #eaf1ea; font-size: 13.5px; }
.user-copy small { color: #9bb6b1; font-size: 12px; }
.user-menu { margin-left: auto; color: #8ba7a2; letter-spacing: 1px; font-size: 13px; }

/* Main Content Area */
.main-area { min-height: 100dvh; margin-left: 260px; min-width: 0; overflow-x: hidden; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 56px); border-bottom: 1px solid #e3e8dc; background: rgba(249,250,245,.92); backdrop-filter: blur(8px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #4f665e; font-size: 13.5px; font-weight: 550; }
.breadcrumb strong { color: #1a342f; font-weight: 750; }
.crumb-slash { color: #a9b7ae; }
.topbar-right { display: flex; align-items: center; gap: 18px; color: #4a635b; font-size: 13px; font-weight: 550; }
.local-status { display: flex; align-items: center; gap: 8px; }
.local-status i { width: 6px; height: 6px; box-shadow: none; }
.topbar-divider { height: 18px; width: 1px; background: #dce3d8; }
.base-currency { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.currency-glyph { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border: 1px solid #d7e2cc; border-radius: 4px; background: #edf4e4; color: var(--teal); font: 12.5px var(--mono); font-weight: 700; }
.mobile-nav-toggle { display: none; border: 0; background: none; padding: 8px; }
.mobile-nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px; }
.content-wrap { max-width: 1440px; margin: 0 auto; padding: 36px clamp(24px, 4vw, 56px) 36px; }

/* Page Headings */
.page-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 28px; gap: 24px; animation: arrive .4s both; }
.eyebrow, .panel-kicker { color: #3d5a52; font-size: 12px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.eyebrow-rule { width: 22px; height: 2px; background: var(--amber); }
h1 { margin: 0; font-size: clamp(28px, 3.2vw, 36px); letter-spacing: -1.2px; line-height: 1.15; font-weight: 750; color: #14282b; }
.heading-period { color: var(--amber); }
.page-heading p { color: #37524a; font-size: 15px; margin: 8px 0 0; line-height: 1.55; max-width: 680px; font-weight: 500; }

/* Buttons */
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 0 20px; border-radius: 7px; border: 1px solid transparent; font-size: 14px; font-weight: 700; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fbfcf5; background: var(--teal); box-shadow: 0 4px 12px rgba(27,103,95,.18); }
.button-primary:hover { background: var(--teal-deep); box-shadow: 0 6px 16px rgba(27,103,95,.24); }
.button-primary span, .button-plus { color: var(--lime); font-size: 16px; }
.button-plus { font-size: 19px; line-height: 1; }
.button-outline { color: #1e453c; background: #fffefa; border-color: #ccd7cc; }
.button-outline:hover, .button-quiet:hover { border-color: #7d9f90; background: #f2f7ef; color: var(--teal); }
.button-quiet { color: #3b5a51; border-color: #d4ddd1; background: transparent; }

/* Flash Messages */
.flash { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid #c7dfca; border-radius: 8px; margin: 0 0 24px; background: #edf6eb; color: #1e5038; font-size: 14px; font-weight: 600; animation: arrive .25s both; }
.flash-error { background: #faede8; border-color: #ecc9bf; color: #872e21; }
.flash-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(45,111,75,.14); font-size: 13px; font-weight: 800; }

/* Metrics Section */
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; animation: arrive .45s .04s both; }
.metric-card { position: relative; overflow: hidden; min-height: 152px; background: var(--card); border: 1px solid #e1e7dc; border-radius: 10px; padding: 22px 24px 20px; box-shadow: 0 4px 14px rgba(38,57,46,.025); }
.metric-primary { background: #e8f0e5; border-color: #d6e2d1; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; color: #3f5c53; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.metric-symbol, .metric-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #e8efe2; color: #33544a; font: 13px var(--mono); font-weight: 700; }
.metric-primary .metric-symbol { background: #d0e0c9; color: var(--teal); }
.metric-value { margin-top: 14px; font-size: clamp(26px, 2.5vw, 32px); font-weight: 750; line-height: 1.1; letter-spacing: -.8px; color: #142928; }
.metric-unit { color: #446157; font-size: 14.5px; letter-spacing: 0; font-weight: 650; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #446157; font-size: 13.5px; font-weight: 550; }
.metric-foot-mark { color: var(--teal); font-size: 15px; font-weight: 750; }
.metric-accent-line { position: absolute; height: 3px; width: 48px; background: var(--teal); left: 24px; bottom: 0; border-radius: 2px 2px 0 0; }

/* Panels & Layout */
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .85fr); gap: 20px; align-items: start; animation: arrive .5s .08s both; }
.panel { background: var(--card); border: 1px solid #e1e7dc; border-radius: 10px; box-shadow: 0 4px 18px rgba(34,58,48,.025); }
.product-panel { min-width: 0; overflow: hidden; }
.panel-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid #ecf0e7; }
.panel-header h2 { margin: 4px 0 0; color: #162f2c; font-size: 19px; letter-spacing: -.4px; font-weight: 750; }
.panel-intro { margin: 0; color: #344e47; font-size: 15px; line-height: 1.6; font-weight: 500; }
.text-link { color: var(--teal); font-size: 13.5px; font-weight: 750; white-space: nowrap; display: inline-flex; align-items: center; }
.text-link:hover { text-decoration: underline; }
.text-link span, .panel-footer-link span { padding-left: 6px; font-size: 15px; }

/* Data Tables */
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
.data-table th { height: 46px; padding: 0 16px; background: #fbfcf8; color: #3f5c53; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.data-table th:first-child, .data-table td:first-child { padding-left: 26px; }
.data-table td { height: 66px; border-top: 1px solid #edf0ea; padding: 0 16px; color: #2d453f; font-size: 14px; }
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: #fafbf5; }
.product-cell { display: flex; align-items: center; gap: 12px; }
.product-cell strong { display: block; color: #162e29; font-size: 14px; font-weight: 750; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-cell small { display: block; margin-top: 2px; color: #4e6b62; font-size: 12px; font-weight: 550; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-stamp { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #eaf0e2; color: #335944; font-size: 13px; font-weight: 800; }
.data-table tbody tr:nth-child(3n+2) .product-stamp { background: #f4eee0; color: #7f6430; }
.data-table tbody tr:nth-child(3n) .product-stamp { background: #e5f0ed; color: #3b615a; }
.mono { font-family: var(--mono); font-size: 14px !important; font-variant-numeric: tabular-nums; }
.selling-price { color: #18523b !important; font-weight: 750; font-size: 14.5px !important; }
.markup-chip { display: inline-block; padding: 5px 9px; background: #eaf2e1; border-radius: 5px; color: #295724; font: 12.5px var(--mono); font-weight: 700; }
.row-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: #627c71; font-size: 15px; }
.row-arrow:hover { color: var(--teal); background: #e5efe6; }

/* Side Stack & Quick Converter */
.side-stack { display: grid; gap: 18px; }
.fx-panel { padding-bottom: 18px; }
.panel-header.compact { min-height: 68px; padding: 16px 22px; }
.panel-header.compact h2 { font-size: 17px; }
.live-tag { display: flex; align-items: center; gap: 7px; color: #405e50; font-size: 11.5px; font-weight: 800; letter-spacing: 1px; }
.fx-panel > .panel-intro { padding: 0 22px; margin-top: 14px; font-size: 14px; }
.converter-form { padding: 16px 22px 0; }
.field-label { display: block; margin-bottom: 8px; color: #3d5a52; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.converter-input-row { display: flex; height: 46px; border: 1px solid #d7e0d3; border-radius: 6px; overflow: hidden; background: #fffefa; }
.converter-input-row input, .converter-input-row output { min-width: 0; flex: 1; border: 0; background: transparent; padding: 0 14px; color: #1c3831; font: 15px var(--mono); font-weight: 650; outline: 0; }
.converter-input-row select { width: 92px; border: 0; border-left: 1px solid #e0e7dc; background: #f6f8f1; color: #27443d; padding: 0 8px; font: 13.5px var(--mono); font-weight: 700; outline: none; }
.converter-input-row output { display: flex; align-items: center; }
.result-row { border-color: #bed5bd; background: #eef6e6; }
.convert-direction { display: flex; align-items: center; gap: 8px; height: 28px; }
.convert-direction span { height: 1px; flex: 1; background: #e0e7dc; }
.convert-direction button, .swap-button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #d4ded0; border-radius: 50%; color: var(--teal); background: #f4f7ee; font-size: 14px; transition: transform .18s; }
.convert-direction button:hover, .swap-button:hover { transform: rotate(180deg); background: #e9f0e2; }
.rate-note { min-height: 28px; padding-top: 8px; color: #4a675e; font: 12.5px var(--mono); font-weight: 550; }
.panel-footer-link { display: flex; justify-content: space-between; align-items: center; margin: 14px 22px 0; padding-top: 14px; border-top: 1px solid #ecf0e7; color: var(--teal); font-size: 13.5px; font-weight: 750; }
.panel-footer-link:hover { text-decoration: underline; }

/* Rate Summary Widget */
.rate-summary { border-radius: 10px; padding: 20px 22px; color: #eaf2e8; background: #224b45; overflow: hidden; position: relative; }
.rate-summary:after { content: "¤"; position: absolute; right: 12px; top: 18px; color: rgba(225,237,207,.07); font: 96px var(--mono); pointer-events: none; }
.rate-summary-top { display: flex; align-items: center; gap: 8px; color: #c6dbc9; font-size: 12px; letter-spacing: 1.1px; font-weight: 800; text-transform: uppercase; }
.rate-summary-icon { color: var(--lime); font-size: 17px; }
.rate-summary > strong { display: block; position: relative; z-index: 1; margin-top: 12px; font-size: 28px; letter-spacing: -.8px; }
.rate-summary > strong small { color: #b2cbbe; font-size: 14px; font-weight: 550; letter-spacing: 0; }
.rate-progress { height: 5px; background: rgba(230,241,221,.18); border-radius: 5px; margin: 14px 0 12px; }
.rate-progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.rate-summary a { display: flex; justify-content: space-between; position: relative; z-index: 1; color: #d4e5d6; font-size: 13px; font-weight: 750; }
.rate-summary a:hover { text-decoration: underline; color: #fff; }

/* Empty States */
.empty-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.empty-illustration { position: relative; width: 56px; height: 50px; margin-bottom: 14px; }
.empty-sheet { position: absolute; left: 9px; top: 3px; width: 34px; height: 42px; border: 1px solid #c2d4c4; border-radius: 6px; background: #f4f8ec; transform: rotate(-6deg); }
.empty-sheet:before, .empty-sheet:after { content: ""; position: absolute; height: 2px; left: 7px; right: 7px; background: #d0ded1; border-radius: 2px; top: 13px; box-shadow: 0 7px #d0ded1, 0 14px #d0ded1; }
.empty-plus { position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--card); border-radius: 50%; background: var(--teal); color: white; font-size: 14px; font-weight: 750; }
.empty-state h3 { margin: 4px 0 8px; font-size: 18px; letter-spacing: -.3px; color: #1a322e; }
.empty-state p { max-width: 420px; margin: 0 0 22px; color: #435f56; font-size: 14.5px; line-height: 1.6; }

/* Footer */
.page-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 28px; margin-top: 36px; border-top: 1px solid #dfdfd7; color: #415e55; font-size: 13.5px; font-weight: 550; }
.footer-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 4px; background: #d7e4d0; color: var(--teal); font-size: 12px; font-weight: 800; }
.footer-divider { margin: 0 8px; color: #a9b9b0; }

/* Products Layout & Form */
.products-layout { display: grid; grid-template-columns: minmax(320px, 350px) minmax(0, 1fr); gap: 20px; align-items: start; animation: arrive .4s both; }
.editor-panel, .catalog-panel { overflow: hidden; min-width: 0; }
.form-step, .import-count { color: #4e6b61; font: 12.5px var(--mono); font-weight: 600; }
.form-step i { color: #a8b8ad; font-style: normal; }
.stack-form { padding: 24px 26px 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field > span, .field > span:first-child { color: #334e46; font-size: 12.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.field b { color: var(--amber); font-size: 14px; }
.field small { color: #506c63; font-size: 12px; letter-spacing: .5px; font-weight: 600; text-transform: none; }
.field input, .field select, .setting-row select, .setting-input-wrap input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #d7e0d3; border-radius: 6px; color: #1a342e; background: #fffefa; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #8fa196; }
.field input:focus, .field select:focus, .setting-row select:focus, .setting-input-wrap input:focus { border-color: #5c8b77; box-shadow: 0 0 0 3px rgba(45,111,75,.16); }
.field select { cursor: pointer; }

/* Input Addons */
.input-with-select, .input-suffix { display: flex; height: 44px; border: 1px solid #d7e0d3; border-radius: 6px; overflow: hidden; background: #fffefa; }
.input-with-select input, .input-suffix input { height: auto; border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; font-size: 14px; }
.input-with-select select { width: 88px; flex: 0 0 auto; padding: 0 8px; border: 0; border-left: 1px solid #dee5da; border-radius: 0; background: #f6f8f1; color: #2e4d44; font: 13px var(--mono); font-weight: 700; }
.input-suffix span { width: 42px; display: grid; place-items: center; border-left: 1px solid #dee5da; color: #35564c; background: #f6f8f1; font: 13.5px var(--mono); font-weight: 700; }

/* Suggested Selling Price Preview */
.price-preview { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 22px; padding: 18px 20px; border: 1px solid #d4dfce; border-radius: 8px; background: #eef5e7; }
.preview-label { color: #37534b; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.price-preview strong { grid-column: 2; grid-row: 1 / span 2; color: #154434; font: 25px var(--mono); font-weight: 750; letter-spacing: -.6px; }
.preview-caption { margin-top: 4px; color: #4f6d64; font-size: 13px; font-weight: 500; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.form-actions .button-primary { flex: 1; }

/* Catalog Table Specifics */
.count-pill { margin-left: 8px; vertical-align: 2px; padding: 4px 9px; border-radius: 12px; background: #eaf1e3; color: #3a554a; font: 12px var(--mono); font-weight: 750; }
.icon-link { padding: 9px 14px; border: 1px solid #d4ded0; border-radius: 6px; color: #2d4c42; font-size: 13px; font-weight: 750; }
.icon-link:hover { border-color: #7a9e8e; color: var(--teal); background: #f4f8f1; }
.icon-link span { margin-left: 6px; color: var(--teal); }
/* Bulk Action Bar */
.bulk-action-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: #eef5ee; border-bottom: 1px solid #d7e4d6; gap: 12px; flex-wrap: wrap; animation: arrive .2s ease-out; }
.bulk-bar-left { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bulk-selected-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 12px; background: #d7e8d6; color: #1c4d3d; font-size: 12.5px; font-weight: 750; font-family: var(--mono); }
.bulk-selected-badge strong { color: #103328; margin-right: 4px; }
.bulk-btn-link { background: none; border: 0; padding: 0; font-size: 12.5px; font-weight: 700; color: var(--teal); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bulk-btn-link:hover { color: var(--teal-deep); }
.bulk-btn-link.muted { color: #5f7a70; }
.bulk-btn-link.muted:hover { color: #2e493f; }
.bulk-bar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.button-danger-compact { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 6px; border: 1px solid #dc867a; background: #b84c3d; color: #ffffff; font-size: 12.5px; font-weight: 750; cursor: pointer; transition: all .16s ease; box-shadow: 0 2px 6px rgba(184,76,61,.2); }
.button-danger-compact:hover { background: #9c3325; border-color: #ba4737; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(184,76,61,.3); }
.button-danger-compact svg { flex-shrink: 0; }

/* Table Checkbox Column */
th.check-col, td.check-col { width: 40px; min-width: 40px; padding-left: 18px !important; padding-right: 4px !important; text-align: center; }
th.check-col + th, td.check-col + td { padding-left: 8px !important; }
.table-check-wrap { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; width: 18px; height: 18px; }
.table-checkbox { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.checkbox-box { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid #c2cec1; background: #ffffff; display: flex; align-items: center; justify-content: center; transition: all .16s ease; }
.table-checkbox:hover ~ .checkbox-box { border-color: var(--teal); background: #f6faf6; }
.table-checkbox:focus-visible ~ .checkbox-box { outline: 2px solid rgba(27,103,95,.4); outline-offset: 1px; }
.table-checkbox:checked ~ .checkbox-box { background: var(--teal); border-color: var(--teal); }
.table-checkbox:checked ~ .checkbox-box:after { content: ""; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.table-checkbox:indeterminate ~ .checkbox-box { background: var(--teal); border-color: var(--teal); }
.table-checkbox:indeterminate ~ .checkbox-box:after { content: ""; width: 8px; height: 2px; background: white; border-radius: 1px; }
.catalog-table tbody tr.is-selected { background: #f0f7f3 !important; }

.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td { padding: 10px 10px; height: 52px; }
.catalog-table th:first-child, .catalog-table td:first-child { padding-left: 18px; }
.catalog-table th:last-child, .catalog-table td:last-child { padding-right: 18px; }
.actions-head { text-align: right; width: 80px; padding-right: 18px !important; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid #d8e2d4; background: #ffffff; color: #3b5a50; cursor: pointer; transition: all .16s ease; padding: 0; }
.icon-btn.edit-icon-btn { color: var(--teal); border-color: #d1dfd6; }
.icon-btn.edit-icon-btn:hover { background: #eef6f0; color: var(--teal-deep); border-color: #9cbdae; transform: translateY(-1px); }
.icon-btn.delete-icon-btn { color: #a8493d; border-color: #edd5cf; }
.icon-btn.delete-icon-btn:hover { background: #faede8; color: #8c2518; border-color: #d99f94; transform: translateY(-1px); }
.inline-form { display: inline-flex; align-items: center; margin: 0; }
.compact-empty { min-height: 260px; }

/* Catalog Pagination */
.table-pagination { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-top: 1px solid #edf0ea; background: #fafbf7; gap: 12px; flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: #48655c; font-weight: 500; }
.pagination-info strong { color: #17332c; font-weight: 750; font-family: var(--mono); }
.pagination-controls { display: flex; align-items: center; gap: 5px; }
.page-numbers { display: flex; align-items: center; gap: 4px; }
.page-nav, .page-num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid #d8e2d4; background: #ffffff; color: #27473d; font-size: 12.5px; font-weight: 700; text-decoration: none; transition: all .16s ease; }
.page-nav { padding: 0 10px; font-size: 12px; }
.page-nav:hover:not(.is-disabled), .page-num:hover:not(.is-active) { background: #eef6ed; border-color: #9cbdae; color: var(--teal-deep); }
.page-nav.is-disabled { opacity: .4; cursor: not-allowed; background: #f4f5ef; border-color: #e2e6de; color: #799187; }
.page-num.is-active { background: var(--teal); border-color: var(--teal); color: #ffffff; box-shadow: 0 2px 6px rgba(27,103,95,.24); }
.page-ellipsis { padding: 0 4px; color: #789086; font-weight: 700; }

/* Rates Page */
.rates-intro-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; margin-bottom: 20px; animation: arrive .4s both; }
.rates-feature { padding: 26px 28px; background: #e8f0e3; border-color: #d6e2d1; position: relative; overflow: hidden; }
.rates-feature:after { content: "↗"; position: absolute; bottom: -45px; right: 0; color: rgba(34,94,76,.06); font: 160px var(--mono); pointer-events: none; }
.rates-feature h2 { position: relative; z-index: 1; margin: 12px 0 10px; color: #17342d; font-size: 26px; line-height: 1.2; letter-spacing: -1px; font-weight: 750; }
.rates-feature p { max-width: 440px; position: relative; z-index: 1; margin: 0; color: #37534b; font-size: 15px; line-height: 1.65; font-weight: 500; }
.rate-updated { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: 24px; color: #415f54; font-size: 13px; font-weight: 650; }
.rate-token { padding: 5px 9px; background: #e8f2e2; border-radius: 5px; color: #375945; font: 12.5px var(--mono); font-weight: 750; }
.rate-pair-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; }
.pair-arrow { padding-bottom: 12px; color: #6f8a7e; font-size: 18px; text-align: center; }
.rate-editor .stack-form { display: grid; gap: 18px; }
.rates-table-panel { overflow: hidden; animation: arrive .45s .05s both; }
.refresh-form { display: flex; }
.refresh-form .button { min-height: 40px; font-size: 13px; }
.refresh-form .button span { font-size: 17px; }
.currency-pair { display: inline-block; min-width: 46px; color: #1f4236; font: 14px var(--mono); font-weight: 750; }
.rate-number { color: #18543c !important; font-size: 14px !important; font-weight: 700; }
.source-label { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #eef4e6; color: #3c5a4d; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.date-cell { color: #4f6b60 !important; font-size: 13px !important; font-family: var(--mono); }
.empty-inline { min-height: 110px; display: flex; align-items: center; gap: 16px; padding: 22px 26px; }
.empty-rate-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #eaf2e2; color: var(--teal); font-size: 22px; font-weight: 750; }
.empty-inline strong { color: #1e3a31; font-size: 15px; }
.empty-inline p { margin: 4px 0 0; color: #446157; font-size: 13.5px; }

/* Rates Wide Conversion Desk */
.conversion-wide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: center; margin-top: 20px; padding: 26px 28px; background: #fbfcf8; animation: arrive .5s .1s both; }
.conversion-copy h2 { margin: 8px 0 8px; max-width: 380px; color: #162f2c; font-size: 19px; line-height: 1.35; letter-spacing: -.4px; font-weight: 750; }
.conversion-copy p { max-width: 360px; margin: 0; color: #3c584f; font-size: 14px; line-height: 1.6; }
.converter-horizontal { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(110px, 1fr) 30px minmax(110px, 1fr) minmax(130px, 1.2fr); align-items: end; gap: 10px; padding: 0; }
.converter-amount input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d7e0d3; border-radius: 6px; color: #1c3831; background: #fffefa; font: 14px var(--mono); font-weight: 650; }
.converter-horizontal .field select { height: 44px; font-size: 13.5px; }
.swap-button { margin-bottom: 8px; width: 32px; height: 32px; }
.conversion-result { min-height: 58px; padding-left: 16px; border-left: 1px solid #dee5da; }
.conversion-result output { display: block; color: #164635; font: 18px var(--mono); font-weight: 750; }
.conversion-result small { display: block; margin-top: 4px; color: #4f6b61; font: 12.5px var(--mono); font-weight: 550; }

/* Settings Page */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .75fr); gap: 20px; animation: arrive .4s both; }
.settings-main { overflow: hidden; }
.settings-badge { color: #48655c; font-size: 12px; letter-spacing: .8px; font-weight: 800; text-transform: uppercase; }
.settings-lede { padding: 20px 26px 0; max-width: 650px; font-size: 15px; color: #355048; line-height: 1.6; font-weight: 500; }
.settings-form { padding: 10px 26px 26px; }
.setting-row { display: flex; align-items: center; gap: 18px; min-height: 94px; border-bottom: 1px solid #edf0e7; }
.setting-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 8px; background: #eaf2e2; color: var(--teal); font: 19px var(--mono); font-weight: 750; }
.setting-copy { display: grid; gap: 4px; flex: 1; }
.setting-copy strong { color: #1b3530; font-size: 15px; font-weight: 750; }
.setting-copy small { color: #4a665d; font-size: 13.5px; line-height: 1.5; font-weight: 500; }
.setting-row select { width: min(280px, 46%); height: 44px; font-size: 14px; }
.setting-input-wrap { display: flex; width: 130px; height: 44px; border: 1px solid #d7e0d3; border-radius: 6px; overflow: hidden; }
.setting-input-wrap input { height: 42px; border: 0; font-size: 14px; font-weight: 700; }
.setting-input-wrap b { width: 40px; display: grid; place-items: center; background: #f6f8f1; border-left: 1px solid #dee5da; color: #35564c; font: 13.5px var(--mono); font-weight: 700; }
.settings-submit { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; }
.settings-submit > span { color: #4a665d; font-size: 13.5px; font-weight: 550; }
.settings-aside { display: grid; gap: 16px; align-content: start; }
.settings-note { padding: 24px; border-radius: 10px; background: #e5efe1; color: #2c4c3b; }
.note-mark { width: 28px; height: 28px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; background: #cee0c9; color: #1e5237; font: 14px var(--mono); font-weight: 800; }
.settings-note h3 { margin: 8px 0 8px; color: #16362b; font-size: 17px; letter-spacing: -.3px; font-weight: 750; }
.settings-note p { margin: 0; color: #355345; font-size: 14px; line-height: 1.65; }
.note-math { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(85,125,95,.24); font: 13.5px var(--mono); color: #315443; font-weight: 700; }
.note-math i { font-style: normal; color: #62826e; }
.note-math strong { color: #154530; font-size: 16px; }
.settings-count { padding: 22px 24px; border: 1px solid #dfdfd7; border-radius: 10px; background: #fffefa; }
.settings-count > span { display: block; color: #3e5c53; font-size: 12px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.settings-count > strong { display: block; margin: 8px 0 12px; color: #162f2c; font-size: 28px; letter-spacing: -.8px; }
.settings-count > strong small { color: #47665b; font-size: 13.5px; font-weight: 650; letter-spacing: 0; }
.settings-count a { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid #ecf0e7; color: var(--teal); font-size: 13.5px; font-weight: 750; }
.settings-count a:hover { text-decoration: underline; }

/* Currency Management */
.currency-manager { margin-top: 24px; padding: 22px 26px 26px; border-top: 1px solid #edf0e7; }
.currency-manager-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.currency-manager-header h3 { margin: 4px 0 0; font-size: 17px; font-weight: 750; color: #162f2c; }
.currency-manager p { margin: 0 0 16px; color: #435e56; font-size: 13.5px; line-height: 1.55; }
.currency-pill-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.currency-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; background: #eef4e8; border: 1px solid #d4e0cf; font-size: 13px; color: #204539; font-weight: 600; }
.currency-pill b { font-family: var(--mono); color: var(--teal); font-weight: 750; font-size: 13.5px; }
.currency-pill-remove { border: 0; background: none; color: #889a91; font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1; border-radius: 3px; font-weight: 700; }
.currency-pill-remove:hover { color: #b8584c; background: rgba(184,88,76,.14); }
.currency-add-form { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: end; background: #fbfcf8; padding: 16px 18px; border-radius: 8px; border: 1px solid #e1e7dc; }
.currency-add-form .field { gap: 4px; }
.currency-add-form .button { min-height: 44px; font-size: 13.5px; }

/* Import / Export Page */
.import-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 340px); gap: 24px; align-items: start; min-width: 0; animation: arrive .4s both; }
.import-main { min-width: 0; overflow: hidden; }
.import-main > .panel-intro { padding: 20px 26px 0; max-width: 720px; font-size: 15px; color: #324b44; font-weight: 500; line-height: 1.6; }
.import-steps { margin: 22px 26px 18px; border: 1px solid #dce4d6; border-radius: 8px; overflow: hidden; }
.import-step { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.import-step + .import-step { border-top: 1px solid #ecf0e7; }
.step-number { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #e5efe0; color: #23523c; font: 14px var(--mono); font-weight: 800; }
.import-step > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 180px; }
.import-step strong { color: #17332d; font-size: 15.5px; font-weight: 750; }
.import-step small { color: #435e56; font-size: 13.5px; font-weight: 500; }
.template-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.template-actions .button { min-height: 38px; padding: 0 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.upload-form { padding: 0 26px 26px; }
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; border: 1.8px dashed #9cb6a2; border-radius: 8px; background: #f6f8f1; cursor: pointer; transition: border .16s, background .16s; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: #3b7b58; background: #ebf4e6; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: #e2ede0; color: var(--teal); font-size: 22px; }
.upload-zone strong { color: #17342d; font-size: 16px; font-weight: 750; }
.upload-zone small { margin-top: 6px; color: #435e56; font-size: 13.5px; font-weight: 550; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone .button { min-height: 38px; margin-top: 14px; font-size: 13.5px; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.upload-actions > span { color: #37534b; font-size: 13.5px; font-weight: 550; }
.upload-actions .button { min-height: 44px; font-size: 14px; }

.import-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 100%; }
.export-panel { position: relative; overflow: hidden; padding: 22px 20px; border-radius: 10px; background: #1c443e; color: #ecf2e7; box-sizing: border-box; }
.export-panel .panel-kicker { color: #b7d5bf; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
.export-art { position: absolute; width: 68px; height: 76px; right: 16px; top: 20px; display: flex; gap: 4px; align-items: end; padding: 10px; transform: rotate(7deg); border: 1px solid rgba(221,238,214,.18); border-radius: 8px; background: rgba(238,246,221,.05); pointer-events: none; }
.export-art i { display: block; width: 8px; border-radius: 2px 2px 0 0; background: #a7be8d; }
.export-art i:nth-child(1) { height: 22px; opacity: .6; }
.export-art i:nth-child(2) { height: 36px; }
.export-art i:nth-child(3) { height: 50px; opacity: .75; }
.export-panel h3 { position: relative; z-index: 1; margin: 18px 0 8px; color: #f7faf3; font-size: 20px; line-height: 1.25; letter-spacing: -.4px; font-weight: 750; }
.export-panel p { margin: 0 0 16px; color: #cbe0d3; font-size: 13.5px; line-height: 1.5; }
.export-actions { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 2; width: 100%; box-sizing: border-box; }
.export-panel .button { width: 100%; min-height: 40px; padding: 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; font-size: 13px; font-weight: 750; border-radius: 7px; text-decoration: none; white-space: normal; }
.export-panel .button.export-btn-storefront { background: #ffffff; color: #13332c; border: 1px solid #ffffff; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.export-panel .button.export-btn-storefront:hover { background: #edf5eb; color: #0c2621; }
.export-panel .button.export-btn-pricing { background: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,.45); }
.export-panel .button.export-btn-pricing:hover { background: rgba(255,255,255,.12); border-color: #ffffff; }

.csv-fields { padding: 20px 20px; border: 1px solid #dfdfd7; border-radius: 10px; background: #fffefa; box-sizing: border-box; min-width: 0; max-width: 100%; }
.csv-fields .panel-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; color: #3a564e; }
.format-group { margin-top: 14px; }
.format-title { display: block; font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #1c443e; margin-bottom: 6px; }
.csv-tags { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; box-sizing: border-box; }
.csv-tags span { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #eaf1e4; border: 1px solid #d2e3cd; color: #1a4a3b; font: 11px var(--mono); font-weight: 700; line-height: 1.4; }

@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Media Queries */
@media (min-width: 1500px) {
  .content-wrap { padding-top: 44px; }
  .metrics-grid { gap: 18px; }
  .workspace-grid { gap: 22px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 230px; }
  .main-area { margin-left: 230px; }
  .content-wrap { padding-left: 26px; padding-right: 26px; }
  .topbar { padding: 0 26px; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .workspace-grid { grid-template-columns: minmax(0,1.5fr) minmax(260px,.8fr); }
  .products-layout { grid-template-columns: minmax(300px, 330px) minmax(0, 1fr); }
  .converter-horizontal { grid-template-columns: 1fr 1fr 28px 1fr 1.2fr; }
  .product-cell strong { max-width: 180px; }
  .import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .products-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 72px; padding: 24px 8px 16px; align-items: center; }
  .brand { padding: 0; }
  .brand-name, .sidebar-label, .nav-link > span:not(.nav-index), .desk-card, .user-copy, .user-menu { display: none; }
  .main-nav { width: 100%; margin-top: 40px; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-index { width: auto; font-size: 12px; }
  .nav-link.is-active { box-shadow: inset 0 -2px var(--lime); }
  .nav-active-dot { display: none !important; }
  .sidebar-user { padding: 14px 0 0; justify-content: center; }
  .main-area { margin-left: 72px; }
  .products-layout { grid-template-columns: 1fr; }
  .editor-panel { order: 0; }
  .catalog-panel { order: 1; }
  .conversion-wide { grid-template-columns: 1fr; }
  .conversion-copy h2, .conversion-copy p { max-width: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-aside { grid-template-columns: 1fr 1fr; }
  .import-layout { grid-template-columns: 1fr; }
  .import-aside { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sidebar { width: 0; padding: 0; transform: translateX(-100%); transition: transform .22s ease; overflow: hidden; }
  .sidebar.is-open { width: 260px; padding: 26px 18px 18px; align-items: stretch; transform: translateX(0); box-shadow: 15px 0 32px rgba(21,48,43,.18); overflow-y: auto; }
  .sidebar.is-open .brand { padding: 0 10px; }
  .sidebar.is-open .brand-name, .sidebar.is-open .sidebar-label, .sidebar.is-open .nav-link > span:not(.nav-index), .sidebar.is-open .desk-card, .sidebar.is-open .user-copy, .sidebar.is-open .user-menu { display: initial; }
  .sidebar.is-open .sidebar-label { display: block; }
  .sidebar.is-open .main-nav { margin-top: 0; }
  .sidebar.is-open .nav-link { justify-content: flex-start; padding: 0 14px; }
  .sidebar.is-open .nav-active-dot { display: block !important; }
  .sidebar.is-open .sidebar-user { padding: 16px 8px 0; justify-content: flex-start; }
  .sidebar.is-open .desk-card { display: block; }
  .sidebar.is-open .brand-mark { flex: 0 0 34px; }
  .main-area { margin-left: 0; }
  .topbar { height: 60px; padding: 0 18px; }
  .breadcrumb { font-size: 12px; gap: 7px; }
  .topbar-right { display: none; }
  .mobile-nav-toggle { display: block; }
  .content-wrap { padding: 26px 16px 20px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; gap: 14px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { max-width: 360px; }
  .heading-action { width: 100%; }
  .metrics-grid { gap: 10px; }
  .metric-card { min-height: 130px; padding: 16px; }
  .metric-heading { font-size: 11px; }
  .metric-value { margin-top: 12px; font-size: 24px; }
  .metric-foot { font-size: 12px; }
  .workspace-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-panel .panel-header { padding: 14px 16px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
  .data-table th, .data-table td { padding: 0 12px; }
  .product-cell { gap: 10px; }
  .product-cell strong { max-width: 150px; }
  .side-stack { grid-template-columns: 1fr; }
  .page-footer { flex-direction: column; align-items: flex-start; gap: 8px; line-height: 1.5; }
  .panel-header { padding-left: 18px; padding-right: 18px; }
  .stack-form { padding: 18px; }
  .form-grid { gap: 14px 10px; }
  .products-layout { gap: 14px; }
  .rates-intro-grid { grid-template-columns: 1fr; }
  .rates-feature { padding: 20px; }
  .rates-feature h2 { font-size: 22px; }
  .rates-table-panel .panel-header { align-items: flex-start; }
  .conversion-wide { padding: 18px; gap: 18px; }
  .converter-horizontal { grid-template-columns: 1fr 1fr 28px 1fr; }
  .conversion-result { grid-column: 1 / -1; padding: 12px 0 0; border-left: 0; border-top: 1px solid #dce4d6; }
  .settings-aside, .import-aside { grid-template-columns: 1fr; }
  .settings-form { padding: 8px 18px 20px; }
  .settings-lede { padding: 16px 18px 0; }
  .setting-row { gap: 10px; min-height: 84px; }
  .setting-copy small { max-width: 220px; }
  .setting-row select { width: 44%; min-width: 130px; }
  .setting-input-wrap { width: 110px; }
  .settings-submit { align-items: flex-start; flex-direction: column; }
  .settings-submit .button { width: 100%; }
  .currency-manager { padding: 18px; }
  .currency-add-form { grid-template-columns: 1fr; }
  .currency-add-form .button { width: 100%; }
  .import-step { flex-wrap: wrap; }
  .import-step .button { margin-left: 48px; }
  .upload-form { padding: 0 18px 20px; }
  .upload-actions { align-items: flex-start; flex-direction: column; }
  .upload-actions .button { width: 100%; }
  .import-main > .panel-intro { padding: 16px 18px 0; }
  .import-steps { margin: 18px 16px 14px; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-aside { order: -1; }
  .auth-card { padding: 26px 20px 22px; }
}

/* Auth Layout & Cards */
.auth-body { min-height: 100dvh; display: grid; place-items: center; background: var(--paper); padding: 32px 18px; }
.auth-wrap { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; animation: arrive .35s both; }
.auth-header { display: flex; justify-content: center; }
.auth-header .brand { color: var(--ink); }
.auth-header .brand-name { color: #14272a; }
.auth-card { width: 100%; background: var(--card); border: 1px solid #dfe5da; border-radius: 12px; padding: 36px 36px 28px; box-shadow: 0 16px 40px rgba(27, 51, 47, .06); }
.auth-card-top { margin-bottom: 24px; }
.auth-card-top h1 { margin: 8px 0 6px; font-size: 28px; letter-spacing: -.8px; }
.auth-card-top p { margin: 0; color: #435e56; font-size: 14px; line-height: 1.5; }
.auth-form { display: grid; gap: 18px; }
.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { width: 100%; padding-right: 44px; }
.password-toggle { position: absolute; right: 0; height: 100%; width: 42px; border: 0; background: none; color: #6f867c; font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.password-toggle:hover { color: var(--teal); }
.auth-options { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: #3b574f; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; font-weight: 550; color: #3b574f; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.auth-submit { width: 100%; min-height: 46px; font-size: 14.5px; margin-top: 6px; }
.auth-card-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0e7; text-align: center; }
.seed-hint { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 8px; background: #eef5e7; border: 1px solid #d4dfce; font-size: 12.5px; color: #2a4c3e; margin-bottom: 16px; text-align: left; }
.seed-badge { font: 10.5px var(--mono); font-weight: 800; letter-spacing: 1px; color: var(--teal); text-transform: uppercase; }
.seed-hint b { font-family: var(--mono); color: #163e33; font-weight: 700; }
.auth-switch { margin: 0; color: #435e56; font-size: 13.5px; }
.auth-switch a { color: var(--teal); font-weight: 750; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-switch.muted { color: #6f867c; font-size: 13px; }
.auth-footer { color: #627c73; font-size: 13px; }
.registration-closed-box { padding: 20px; border-radius: 8px; background: #fbfbf8; border: 1px solid #e1e7dc; color: #435e56; font-size: 14px; line-height: 1.6; }

/* Profile View Layout */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); gap: 20px; align-items: start; animation: arrive .4s both; }
.profile-main-stack { display: grid; gap: 20px; }
.role-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; background: #e8f2e2; color: #265538; font: 11.5px var(--mono); font-weight: 750; letter-spacing: .5px; }
.profile-aside { display: grid; gap: 16px; }
.profile-card { padding: 28px 24px 22px; text-align: center; overflow: hidden; position: relative; }
.profile-card-badge { display: flex; justify-content: center; margin-bottom: 14px; }
.user-avatar.large { width: 68px; height: 68px; font-size: 24px; font-weight: 800; border-radius: 50%; background: #d7dfae; color: #204539; border: 3px solid #fffefa; box-shadow: 0 4px 14px rgba(27,51,47,.12); }
.user-avatar.mini { width: 28px; height: 28px; font-size: 11px; }
.profile-card h3 { margin: 0; font-size: 20px; font-weight: 750; color: #14272a; }
.profile-email { margin: 4px 0 10px; color: #506d64; font-size: 13.5px; font-weight: 500; }
.profile-role-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; background: #eef4e8; color: var(--teal); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.profile-details-list { margin-top: 22px; border-top: 1px solid #edf0e7; text-align: left; }
.profile-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f2f5ed; font-size: 13.5px; }
.profile-detail-row span { color: #627e74; font-weight: 500; }
.profile-detail-row strong { color: #1e3a33; font-weight: 700; }

/* Sidebar & Topbar User Enhancements */
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 16px 8px 0; border-top: 1px solid rgba(211,230,214,.14); }
.user-avatar-link { display: block; flex: 0 0 34px; }
.user-actions-menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.user-action-btn { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; border: 0; background: transparent; color: #8ba7a2; font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.user-action-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.logout-btn:hover { color: #f28b7e !important; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-profile-link { display: flex; align-items: center; gap: 8px; color: #2d4740; font-weight: 650; font-size: 13px; text-decoration: none; }
.topbar-profile-link:hover { color: var(--teal); }
.topbar-logout-link { border: 0; background: none; color: #728b81; font-size: 12.5px; font-weight: 650; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.topbar-logout-link:hover { color: #b8584c; background: #faede8; }

/* Switch Toggle Component */
.switch-wrap { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.switch-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-toggle { position: absolute; cursor: pointer; inset: 0; background-color: #d1dcce; border-radius: 24px; transition: .2s; }
.switch-toggle:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.switch-wrap input:checked + .switch-toggle { background-color: var(--teal); }
.switch-wrap input:checked + .switch-toggle:before { transform: translateX(20px); }

/* Settings Sub Row */
.setting-sub-row { margin: -6px 0 14px 44px; padding: 12px 16px; border-radius: 8px; background: #f6f8f4; border: 1px dashed #d5e0d1; display: grid; gap: 4px; animation: arrive .25s ease-out; }
.setting-sub-row .checkbox-label { font-size: 13.5px; font-weight: 650; color: #213f36; }
.setting-sub-note { font-size: 12px; color: #577369; line-height: 1.45; margin-left: 24px; }
@media (max-width: 640px) {
  .setting-sub-row { margin-left: 0; }
}

/* Team & Roles Management Layout */
.team-header-panel { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; background: var(--card); border: 1px solid #dfe5da; border-radius: 10px; padding: 22px 28px; margin-bottom: 20px; box-shadow: 0 4px 18px rgba(27,51,47,.03); }
.team-header-copy h2 { margin: 6px 0 6px; font-size: 22px; color: var(--ink); letter-spacing: -.4px; }
.team-header-copy p { margin: 0; color: #4b675e; font-size: 14px; max-width: 680px; }

.roles-matrix-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.role-matrix-card { background: var(--card); border: 1px solid #dfe5da; border-radius: 10px; padding: 20px; box-shadow: 0 4px 14px rgba(27,51,47,.03); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.role-matrix-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,51,47,.06); }
.role-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.role-users-count { font: 12px var(--mono); color: #6a857b; font-weight: 600; }
.role-matrix-card h3 { margin: 0 0 6px; font-size: 17px; color: #162c26; font-weight: 750; }
.role-matrix-card p { margin: 0 0 16px; color: #4d6961; font-size: 13px; line-height: 1.5; min-height: 38px; }
.role-features-list { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid #edf2e8; display: grid; gap: 8px; font-size: 12.5px; color: #2e4a42; }
.role-features-list li { display: flex; align-items: center; gap: 8px; }
.role-features-list .check { color: #2b7a4b; font-weight: 800; font-family: var(--mono); }
.role-features-list .cross { color: #b85c5c; font-weight: 800; font-family: var(--mono); }

/* Role Pills */
.role-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 14px; font: 11px var(--mono); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.role-pill.role-admin { background: #1d3a33; color: #d8ea7a; border: 1px solid #2a5148; }
.role-pill.role-manager { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.role-pill.role-viewer { background: #f0f3f6; color: #475569; border: 1px solid #d8e2ea; }

/* Team Layout */
.team-layout { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.8fr); gap: 20px; align-items: start; }
.team-add-panel { position: sticky; top: 80px; }
.team-table td { vertical-align: middle; }
.self-tag { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #eef5e7; color: #265538; font: 10px var(--mono); font-weight: 800; margin-left: 6px; }
.business-cell { font-size: 13.5px; color: #3b574f; font-weight: 550; }

/* Readonly Banner for Viewers */
.readonly-banner { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-radius: 10px; background: #f4f6fa; border: 1px solid #dce4ed; color: #2c4456; margin-bottom: 20px; }
.readonly-banner .banner-icon { font-size: 20px; line-height: 1; color: #486581; }
.readonly-banner .banner-copy strong { display: block; font-size: 14.5px; font-weight: 750; color: #102a43; margin-bottom: 4px; }
.readonly-banner .banner-copy p { margin: 0; font-size: 13px; color: #486581; line-height: 1.5; }

/* Edit User Modal Dialog */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 30, 27, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; animation: arrive .2s both; }
.modal-box { width: 100%; max-width: 540px; background: #fffefa; border: 1px solid #dfe5da; border-radius: 12px; padding: 28px 30px; box-shadow: 0 20px 50px rgba(10, 25, 22, .25); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-header h2 { margin: 4px 0 0; font-size: 22px; color: var(--ink); }
.modal-close { border: 0; background: none; font-size: 18px; color: #627e74; cursor: pointer; width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; }
.modal-close:hover { background: #eef2ea; color: var(--ink); }
.modal-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1080px) {
  .roles-matrix-grid { grid-template-columns: 1fr; }
  .team-layout { grid-template-columns: 1fr; }
  .team-add-panel { position: static; }
}

/* Catalog Search & Filtering Toolbar */
.catalog-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef2ea; background: #fafbf8; }
.catalog-filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1; }
.filter-search-wrap { position: relative; min-width: 240px; flex: 1; max-width: 400px; }
.filter-search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #728c83; pointer-events: none; }
.filter-search-input { width: 100%; height: 38px; border: 1px solid #ccd7cc; border-radius: 6px; padding: 0 32px 0 36px; font-size: 13.5px; background: #fff; color: var(--ink); }
.filter-search-input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(27,103,95,.15); }
.clear-search-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #889e96; font-size: 13px; font-weight: bold; padding: 2px 6px; border-radius: 4px; }
.clear-search-btn:hover { background: #e8eee5; color: var(--ink); }
.filter-select-wrap { min-width: 170px; }
.filter-category-select { width: 100%; height: 38px; border: 1px solid #ccd7cc; border-radius: 6px; padding: 0 12px; font-size: 13px; background: #fff; color: #223e38; cursor: pointer; }
.filter-category-select:focus { border-color: var(--teal); outline: none; }
.filter-submit-btn { height: 38px; min-height: 38px; padding: 0 14px; font-size: 13px; }
.filter-reset-link { font-size: 13px; font-weight: 600; color: #6f877f; padding: 6px 10px; border-radius: 6px; }
.filter-reset-link:hover { color: #9c3b30; background: #fbeee8; }
/* Custom Confirmation & Alert Dialog */
.pp-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 28, 26, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.pp-confirm-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.pp-confirm-dialog {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid rgba(27, 103, 95, 0.14);
  border-radius: 16px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(10, 25, 22, 0.28), 0 4px 16px rgba(10, 25, 22, 0.08);
  transform: scale(0.92) translateY(12px);
  transition: transform .24s cubic-bezier(0.16, 1, 0.3, 1), opacity .2s ease;
  opacity: 0;
  position: relative;
}
.pp-confirm-backdrop.is-open .pp-confirm-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.pp-confirm-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.pp-confirm-icon-wrap {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.pp-confirm-icon-wrap.is-refresh {
  background: linear-gradient(135deg, #e7f5ef, #d4ebd8);
  border: 1px solid #b5ddc2;
  color: var(--teal);
}
.pp-confirm-icon-wrap.is-refresh svg {
  animation: spinSlow 8s linear infinite;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.pp-confirm-icon-wrap.is-danger {
  background: linear-gradient(135deg, #fdeee9, #f9ded8);
  border: 1px solid #f2bdb1;
  color: #b8584c;
}
.pp-confirm-icon-wrap.is-info {
  background: linear-gradient(135deg, #f0f6eb, #e2eed6);
  border: 1px solid #cde0bd;
  color: var(--teal-deep);
}
.pp-confirm-body {
  flex: 1;
  min-width: 0;
}
.pp-confirm-title {
  margin: 0 0 6px;
  font-size: 17.5px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.pp-confirm-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4a665e;
}
.pp-confirm-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 16px;
  color: #7b948c;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all .15s ease;
}
.pp-confirm-close:hover {
  background: #edf3ea;
  color: var(--ink);
}
.pp-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #edf2ea;
}
.pp-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.pp-confirm-btn-cancel {
  border: 1px solid #ccd7cb;
  background: #ffffff;
  color: #3b574f;
}
.pp-confirm-btn-cancel:hover {
  background: #f2f7ef;
  border-color: #b7c7b5;
  color: var(--ink);
}
.pp-confirm-btn-primary {
  border: 1px solid transparent;
  background: var(--teal);
  color: #f7fbf8;
  box-shadow: 0 4px 12px rgba(27, 103, 95, 0.22);
}
.pp-confirm-btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 103, 95, 0.3);
}
.pp-confirm-btn-danger {
  border: 1px solid transparent;
  background: #b8584c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(184, 88, 76, 0.22);
}
.pp-confirm-btn-danger:hover {
  background: #9e4338;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(184, 88, 76, 0.3);
}

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