/* Design B "Kartela". Manrope is served from wwwroot/lib/manrope (SIL OFL); Arabic falls back to Segoe UI. */
@font-face { font-family: Manrope; src: url("../lib/manrope/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; src: url("../lib/manrope/manrope-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-0130, U+0132-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; src: url("../lib/manrope/manrope-cyrillic.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --om-navy: #003466;
  --om-red: #be1d2d;
  --om-red-dark: #9c1825;
  --om-ink: #14202e;
  --om-muted: #4b5560;
  --om-ground: #fafaf8;
  --om-line: #e3e4e1;
  --om-nav-text: #d5e0ec;
  --bs-body-font-family: Manrope, "Segoe UI", sans-serif;
  --bs-body-color: var(--om-ink);
  --bs-body-bg: var(--om-ground);
  --bs-link-color-rgb: 0, 52, 102;
  --bs-link-hover-color-rgb: 190, 29, 45;
}

body { min-height: 100vh; font-size: 15px; }

.app-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; padding: 10px 32px; background: var(--om-navy); }
.app-logo { display: block; width: 220px; height: auto; }
.app-nav, .app-user { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 14px; }
.app-user { margin-inline-start: auto; }
.app-header form { margin: 0; }
.app-nav a, .app-user a { padding: 10px 0; border-bottom: 2px solid transparent; color: var(--om-nav-text); text-decoration: none; }
.app-nav a:hover, .app-user a:hover, .app-nav a.is-active, .app-user a.is-active { color: #fff; }
.app-nav a.is-active, .app-user a.is-active { border-bottom-color: #ff8a94; font-weight: 700; }
.app-language { height: 36px; padding: 0 8px; border: 0; border-radius: 6px; background: #fff; color: var(--om-ink); font-size: 13px; }

.app-main { max-width: 1376px; margin: 0 auto; padding: 28px 32px; }
.page-title { margin: 0 0 16px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.login-box, .form-page { max-width: 440px; }
.login-box { margin: 32px auto 0; }

.form-label { margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.form-control-lg, .form-select-lg { min-height: 56px; border: 2px solid var(--om-ink); border-radius: 10px; font-size: 18px; }
.form-check-input { width: 1.25em; height: 1.25em; border: 2px solid var(--om-ink); }
.btn-lg { min-height: 56px; border-radius: 10px; font-size: 16px; font-weight: 800; }
.btn-danger { --bs-btn-bg: var(--om-red); --bs-btn-border-color: var(--om-red); --bs-btn-hover-bg: var(--om-red-dark); --bs-btn-hover-border-color: var(--om-red-dark); --bs-btn-active-bg: var(--om-red-dark); --bs-btn-active-border-color: var(--om-red-dark); }

:focus-visible { outline: 3px solid #ff8a94; outline-offset: 2px; }

@media (max-width: 768px) {
  .app-header { padding: 10px 16px; }
  .app-main { padding: 20px 16px; }
  .app-user { margin-inline-start: 0; }
  .page-title { font-size: 24px; }
}

/* Formula detail window */
.detail { display: flex; flex-wrap: wrap; min-height: 100%; }
.detail-color { flex: 1 1 400px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; padding: 22px 32px 28px; background: var(--formula-color); color: var(--formula-text); }
.detail-back { align-self: flex-start; min-height: 44px; padding: 0 14px; border: 2px solid var(--formula-text); border-radius: 8px; background: transparent; color: var(--formula-text); font-weight: 700; }
.detail-heading { margin-top: auto; }
.detail-code { margin: 0; font-size: 76px; line-height: 1; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.detail-name { margin-top: 8px; font-size: 28px; font-weight: 700; }
.detail-brand { margin-top: 6px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding-top: 18px; border-top: 1px solid var(--formula-text); }
.detail-facts dt { font-size: 12px; font-weight: 400; }
.detail-facts dd { min-height: 1.4em; margin: 0; font-weight: 700; }
.detail-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detail-links-title { width: 100%; font-size: 12px; }
.detail-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 8px; border: 0; border-radius: 22px; background: #fff; color: var(--om-ink); box-shadow: inset 0 0 0 1px var(--om-line); font-size: 13px; font-weight: 700; }
.detail-link:hover { box-shadow: inset 0 0 0 2px var(--om-ink); }
.detail-work { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 28px 40px; background: var(--om-ground); }
.detail-column { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 720px; }
.mix-box { padding: 4px 20px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.mix-box > .alert { margin: 12px 0; }
.detail-load-error { max-width: 560px; margin: 48px auto; padding: 0 16px; }

.series-tabs { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 12px; background: #ecedea; }
.series-tab { min-height: 48px; padding: 0 22px; border: 0; border-radius: 9px; background: transparent; color: var(--om-ink); font-weight: 800; }
.series-tab.is-active { background: #fff; }
.series-panel { display: flex; flex-direction: column; gap: 18px; }
.series-panel[hidden] { display: none; }

.series-date { font-size: 13px; color: var(--om-muted); }
.amount-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.amount-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
.amount-field .form-control-lg { width: 130px; font-size: 26px; font-weight: 800; }
.amount-cumulative { display: flex; align-items: center; gap: 8px; min-height: 56px; margin: 0 0 0 auto; padding: 0; font-weight: 700; }
.amount-cumulative .form-check-input { float: none; margin: 0; }
.detail-under { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }

.mix-list { margin: 0; padding: 0; list-style: none; }
.mix-row { display: flex; align-items: center; gap: 14px; min-height: 62px; border-bottom: 1px solid var(--om-line); }
.mix-dot { flex: none; display: inline-block; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.mix-row > .mix-dot { width: 44px; height: 44px; }
.mix-code { font-size: 18px; font-weight: 800; }
.mix-grams { margin-inline-start: auto; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.mix-grams small { font-size: 14px; font-weight: 500; }
.mix-total { font-weight: 800; border-bottom: 0; }
.mix-total .mix-grams { font-size: 22px; }
.mix-summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.mix-summary-label { font-size: 13px; font-weight: 700; }
.mix-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.mix-facts { font-size: 13px; text-align: end; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Change history */
.detail-top { display: flex; justify-content: space-between; gap: 10px; }
.history { max-width: 1100px; margin: 0 auto; padding: 28px 32px; }
.history-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.history-head .page-title { margin: 0; }
.history-scope { margin: 8px 0 20px; color: var(--om-muted); font-size: 14px; }
.history-entry { margin-bottom: 18px; padding: 16px 20px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.history-entry-head { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.history-action { font-weight: 700; color: var(--om-navy); }
.history-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.history-column { flex: 1 1 320px; min-width: 0; }
.history-column h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; }
.history-column dl { margin: 0 0 10px; font-size: 13px; }
.history-column dl > div { display: flex; gap: 10px; padding: 3px 6px; }
.history-column dt { flex: 0 0 110px; font-weight: 400; color: var(--om-muted); }
.history-column dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.history-column table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-column td { padding: 3px 6px; border-top: 1px solid #ecedea; }
.history-amount { text-align: end; }
.history-changed, .history-changed td { background: #fff3cd; }

/* Formula form */
.formula-form { display: flex; flex-direction: column; gap: 20px; max-width: 1100px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.form-hint { color: #8c5a00; font-size: 13px; font-weight: 700; }
.form-hint[hidden] { display: none; }
.brand-row { display: flex; gap: 8px; }
.brand-row .form-select { flex: 1; min-width: 0; }
.form-color { width: 100%; height: 56px; border: 2px solid var(--om-ink); border-radius: 10px; }
.toner-box { display: flex; flex-direction: column; gap: 10px; max-width: 720px; padding: 14px 20px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.toner-box[hidden] { display: none; }
.toner-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--om-line); }
.toner-row .btn { min-height: 44px; }
.toner-field { flex: 2 1 200px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
.toner-field .form-control { min-height: 44px; }
.toner-amount { flex: 1 1 110px; }
.toner-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.toner-foot .btn { min-height: 44px; }

/* List actions */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.color-card-wrap { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.color-card-wrap .color-card { flex: 1; border-radius: 0; box-shadow: none; }
.own-badge { position: absolute; top: 8px; inset-inline-end: 8px; padding: 2px 10px; border-radius: 10px; background: #fff; color: var(--om-ink); font-size: 12px; font-weight: 700; }
.color-card-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 10px; }
.row-action { display: inline-block; min-height: 32px; padding: 4px 10px; border: 1px solid var(--om-line); border-radius: 6px; background: #fff; color: var(--om-navy); font-size: 12px; font-weight: 700; text-decoration: none; }
.row-action:hover { border-color: var(--om-ink); }

/* Prices */
.price-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.price-tool { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.price-tool .btn, .price-tool .form-select, .price-tool .form-control { min-height: 44px; }
.price-tool .btn { display: inline-flex; align-items: center; }
.price-table { max-width: 1140px; }
.price-table table { min-width: 620px; }
.price-table .form-control, .price-table .form-select { min-height: 38px; }
.price-status { font-size: 12px; color: #14703f; }
.price-status.is-error { color: #8c1420; }

/* Import */
.import-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.import-form .form-check { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; }
.import-form .form-check-input { float: none; margin: 0; }
.import-table table { min-width: 620px; }

/* Central screens */
.app-menu-toggle { padding: 10px 0; border: 0; background: none; color: var(--om-nav-text); font: inherit; }
.app-menu-toggle:hover { color: #fff; }
.app-nav .dropdown-item { padding: 8px 16px; border: 0; color: var(--om-ink); font-weight: 400; }
.app-nav .dropdown-item:hover { background: #f1f2ef; color: var(--om-ink); }
.admin-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-tools .btn { min-height: 38px; }
.admin-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0; }
.admin-search .search-field { flex: 0 1 220px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.admin-pair { display: flex; flex-wrap: wrap; gap: 16px; }
.admin-pair .search-field { flex: 1 1 200px; }
.admin-table table { min-width: 620px; }
.admin-table tbody tr { cursor: default; }
.admin-actions { width: 1%; white-space: nowrap; text-align: end; }
.admin-actions form { display: inline-block; margin: 0; }
.admin-actions button.row-action { background: none; }
.admin-subtitle { margin: 24px 0 12px; font-size: 18px; font-weight: 700; }
.admin-choice { display: flex; flex-direction: column; gap: 8px; }
.admin-choice legend, .role-tree legend { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.role-tree { display: flex; flex-direction: column; gap: 12px; }
.role-child { margin-inline-start: 24px; }

/* Printing: only the prepared area goes to paper. Label sizes come from legacy PrintLabelPartial. */
#print-area { display: none; }
.label-big { line-height: 60px; font-size: 50px; }
.label-small { line-height: 60px; font-size: 30px; }
@media print {
  body.is-printing > *:not(#print-area) { display: none !important; }
  body.is-printing { background: #fff; }
  body.is-printing #print-area { display: block; }
  #print-area[data-kind="details"] .detail-code { font-size: 40px; }
}

@media (max-width: 768px) {
  .detail-color { padding: 16px; }
  .detail-work { padding: 20px 16px; }
  .detail-code { font-size: 52px; }
  .amount-cumulative { margin-inline-start: 0; }
}

/* Color search */
.search-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.search-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
.search-field-brand { flex: 1 1 190px; }
.search-field-text { flex: 3 1 240px; }
.search-field-region { flex: 1 1 150px; }
.search-field .form-control-lg { font-weight: 700; }
.search-submit { align-self: flex-end; padding-inline: 34px; }
.search-message { margin-top: 24px; }

.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 14px; font-size: 14px; }
.view-toggle { display: flex; overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--om-ink); }
.view-toggle button { min-height: 44px; padding: 0 16px; border: 0; background: #fff; color: var(--om-ink); font-size: 13px; font-weight: 700; }
.view-toggle button.is-active { background: var(--om-ink); color: #fff; }

.color-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.color-card { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: #fff; color: var(--om-ink); text-align: start; box-shadow: 0 0 0 1px var(--om-line); }
.color-card:hover { box-shadow: 0 0 0 2px var(--om-ink); }
.color-card-swatch { display: block; height: 104px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.color-card-body { display: block; padding: 12px 14px 14px; }
.color-card-code { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.color-card-name { display: block; font-size: 14px; font-weight: 700; }
.color-card-meta { display: block; font-size: 13px; color: var(--om-muted); }
.color-card-name + .color-card-meta { margin-top: 6px; }

.results-table { overflow-x: auto; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.results-table table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 13px; }
.results-table th { padding: 12px 10px; color: var(--om-muted); font-size: 12px; text-align: start; }
.results-table th button { padding: 0; border: 0; background: none; color: inherit; font-weight: inherit; text-decoration: underline; }
.results-table td { padding: 0 10px; border-top: 1px solid #ecedea; height: 44px; }
.results-table tbody tr { cursor: pointer; }
.results-table tbody tr:hover { background: #f1f2ef; }
.results-code { padding: 0; border: 0; background: none; color: var(--om-navy); font-weight: 800; }
.results-swatch { display: block; width: 44px; height: 26px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.results-name { font-weight: 700; }
.results-nowrap { white-space: nowrap; }
.results-pages { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.results-pages .btn { min-width: 44px; min-height: 44px; }

/* Markalar */
.brand-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.brand-search .search-field { flex: 1 1 280px; max-width: 480px; }
.brand-list { overflow: clip; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--om-line); }
.brand-list table { width: 100%; border-collapse: collapse; font-size: 14px; }
.brand-list th { position: sticky; top: 0; padding: 10px 14px; background: #fff; color: var(--om-muted); font-size: 12px; text-align: start; }
.brand-list td { padding: 0 14px; border-top: 1px solid #ecedea; height: 44px; }
.brand-pick { padding: 8px 0; border: 0; background: none; color: var(--om-navy); font-weight: 800; text-align: start; }

/* Account menu: the signed-in user's name opens feedback, password and log out. */
.app-icon { flex: none; }
.app-account-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--om-nav-text); border-radius: 6px; background: transparent; color: #fff; font: inherit; font-size: 14px; }
.app-account-toggle:hover, .app-account-toggle[aria-expanded="true"] { background: #fff; color: var(--om-navy); }
.app-account .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border: 0; color: var(--om-ink); font-size: 14px; }
.app-account .dropdown-item:hover { background: #f1f2ef; color: var(--om-ink); }
