/*
 * "Modern" look, part 3: the pages' own class families (everything portal.css styles per page and modern.css, the shell,
 * does not). Rules as in modern.css: only its tokens, every selector starts with html.tp-modern, night follows the tokens.
 * The whole file is screen-only: the pages' print views (Pusula comparison, Yardım) stay exactly as the classic ones.
 * Order: tokens · shared bits · Müşterilerim · Takvim · Talepler · Ürünler / Stok / Hammadde · Siparişler · Cari hesap ·
 * Mesajlar · Pusula · Web sitesi · Yardım, teklif önizleme.
 */
html.tp-modern {
    /* the calendar's fifth kind (an offer's validity ends): violet, apart from visit (orange), activity (blue), order (gray) and late (red) */
    --tm-offer: #6d3fc4;  --tm-offer-soft: #f1ecfb;
    --tm-r-xs: 6px;       /* chips inside a calendar cell, the search highlight */
}
html.tp-modern.dark { --tm-offer: #b79cf5; --tm-offer-soft: #231b36; }

@media screen {

/* ===== 0. shared bits the pages use ===== */
/* portal.css paints these with --tp-side, which is the canvas here: they are surfaces */
html.tp-modern .tp-mark { padding: 0 2px; border-radius: var(--tm-r-xs); background: color-mix(in srgb, var(--tp-amber) 20%, var(--tm-surface)); color: var(--tp-text); }
html.tp-modern .tp-meta { gap: .5rem 1.25rem; margin-bottom: 1rem; font-size: .875rem; color: var(--tm-dim); }
html.tp-modern .tp-note { margin-top: .75rem; }
html.tp-modern .tp-check { gap: .5rem; min-height: var(--tm-control-h); }
html.tp-modern .tp-step { font-size: .8125rem; color: var(--tm-dim); }
html.tp-modern .tp-progress > span { border-radius: 999px; }
html.tp-modern .tp-out { font-size: .75rem; font-weight: 500; }
html.tp-modern .tp-actions-row { gap: .5rem; margin-top: 1rem; }
html.tp-modern .tp-loading { opacity: .55; }
html.tp-modern .tp-table .tp-code { font-variant-numeric: tabular-nums; white-space: nowrap; }   /* a code never breaks at its hyphens */
/* sort marks of <x-tp-grid>: quiet arrows instead of the boxed glyphs */
html.tp-modern .tp-table th[data-sort]::after { content: '\2195\FE0E'; opacity: .4; }   /* \FE0E: the text glyph, not the boxed emoji */
html.tp-modern .tp-table th[aria-sort="ascending"]::after { content: '\2191\FE0E'; opacity: 1; color: var(--tp-amber); }
html.tp-modern .tp-table th[aria-sort="descending"]::after { content: '\2193\FE0E'; opacity: 1; color: var(--tp-amber); }
/* a totals row: the line above it is the last body row's (the shell hides that one), none below */
html.tp-modern .tp-table:has(tfoot) tbody tr:last-child > td { border-bottom-color: var(--tp-line2); }
html.tp-modern .tp-table tfoot td { border-top: 0; border-bottom: 0; }
html.tp-modern .tp-table-wrap { border-radius: var(--tm-r-sm); }
html.tp-modern .tp-rows tbody tr:hover > td { background: var(--tm-surface-2); }
html.tp-modern .tp-empty { font-size: .875rem; }
/* phone: a table of five or more columns keeps a readable width and scrolls inside its wrapper instead of crushing the first column */
@media (max-width: 639.98px) { html.tp-modern .tp-table-wrap > .tp-table:not(.tp-stack):not(:has(.tp-empty)):has(th:nth-child(5)) { min-width: 36rem; } }

/* ===== 1. Müşterilerim (customers) ===== */
/* rows are grids. "Seç" is only its own button (user, 12.11.2026): it used to be stretched over the whole row (::after), which swallowed
   every other click there; the code and name cells open the firma sayfası, the icons their forms */
html.tp-modern .tp-rows:has([wire\:click^="pick("]) { display: block; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) :is(thead, tbody) { display: block; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) tr { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr) auto; align-items: center; position: relative;
    border-bottom: 1px solid var(--tp-line); }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) thead tr { background: var(--tm-surface-2); border-radius: var(--tm-r-sm) var(--tm-r-sm) 0 0; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) :is(th, td) { border-bottom: 0; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) thead th { background: none; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody tr:last-child { border-bottom-color: transparent; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody tr:hover { background: var(--tm-surface-2); }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody tr:hover > td { background: none; }
html.tp-modern .tp-rows:has([wire\:click^="pick("]) td > .tp-dim { margin-top: .125rem; font-size: .8125rem; }
/* "Seç": a quiet pill that turns orange under the pointer */
html.tp-modern body .tp-rows [wire\:click^="pick("].fi-btn { position: static; min-height: 2rem; padding: .25rem .875rem; border-radius: 999px; background: var(--tm-surface); color: var(--tm-dim);
    box-shadow: 0 0 0 1px var(--tp-line2); }
html.tp-modern body .tp-rows [wire\:click^="pick("].fi-btn:hover, html.tp-modern body .tp-rows [wire\:click^="pick("].fi-btn:focus-visible {
    background: var(--tm-accent-soft); color: var(--tp-amber); box-shadow: 0 0 0 1px var(--tm-accent-line); }
html.tp-modern body .tp-rows [wire\:click^="pick("].fi-btn .fi-icon { color: inherit; }   /* the loading spinner on the white pill */
/* the picked customer: a tinted row with an orange edge */
html.tp-modern .tp-rows tbody tr:has(> .tp-num > .fi-badge) { background: var(--tm-accent-soft); box-shadow: inset 3px 0 0 var(--tp-amber); }
html.tp-modern .tp-rows tbody tr:has(> .tp-num > .fi-badge) > td:nth-child(2) { font-weight: 600; }
@media (max-width: 639.98px) {
    /* phone: name over code on the left, the pill on the right; no head row */
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) thead { display: none; }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody tr { grid-template-columns: minmax(0, 1fr) auto; min-height: 3.5rem; padding: .625rem .25rem; }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody td { padding: 0 .5rem; }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody td:nth-child(1) { grid-area: 2 / 1; font-size: .75rem; color: var(--tm-dim); }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody td:nth-child(2) { grid-area: 1 / 1; overflow-wrap: anywhere; }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody td:nth-child(3) { grid-area: 1 / 2 / span 2; }
    html.tp-modern .tp-rows:has([wire\:click^="pick("]) tbody td.tp-empty { grid-area: auto / 1 / auto / -1; }
}

/* ===== 2. Takvim + Ajanda + Faaliyetler ===== */
html.tp-modern .tp-cal { --tp-offer: var(--tm-offer); }
html.tp-modern .tp-cal-month { min-width: 8.5rem; font-family: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--tp-text); }
html.tp-modern .tp-cal-bar > .tp-dim { font-size: .8125rem; }
html.tp-modern .tp-cal-legend { gap: .375rem; margin-bottom: .875rem; }
/* month grid: one rounded frame, hairline cells, the other months' days on the inset gray */
html.tp-modern .tp-cal-head { border: 1px solid var(--tp-line); border-bottom: 0; border-radius: var(--tm-r-sm) var(--tm-r-sm) 0 0; background: var(--tm-surface-2); }
html.tp-modern .tp-cal-head span { padding: .5rem .625rem; border-bottom: 0; font-family: inherit; font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tm-dim); }
html.tp-modern .tp-cal-grid { border: 1px solid var(--tp-line); border-radius: 0 0 var(--tm-r-sm) var(--tm-r-sm); overflow: hidden; }
html.tp-modern .tp-cal-day { gap: 3px; min-height: 7rem; padding: .375rem; border-color: var(--tp-line); }
html.tp-modern .tp-cal-day:nth-child(7n) { border-right: 0; }
html.tp-modern .tp-cal-day:nth-last-child(-n + 7) { border-bottom: 0; }
html.tp-modern .tp-cal-day:hover { background: var(--tm-surface-2); }
html.tp-modern .tp-cal-day.is-out { background: var(--tm-surface-2); }
html.tp-modern .tp-cal-day.is-out .tp-cal-date { color: var(--tm-faint); }
html.tp-modern .tp-cal-date { min-width: 1.5rem; height: 1.5rem; margin-bottom: 1px; padding: 0; align-items: center; font-family: inherit; font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
html.tp-modern .tp-cal-date b { display: inline-block; min-width: 1.5rem; padding: 0 .25rem; border-radius: 999px; font-weight: inherit; line-height: 1.5rem; text-align: center; }
html.tp-modern .tp-cal-date:hover { color: var(--tp-amber); }
html.tp-modern .tp-cal-date:hover b { background: var(--tm-accent-soft); }
html.tp-modern .tp-cal-day.is-today .tp-cal-date b { padding: 0 .25rem; background: var(--tp-amber); color: var(--tp-amber-ink); font-weight: 600; }
html.tp-modern .tp-cal-date:focus-visible, html.tp-modern .tp-cal-item:focus-visible, html.tp-modern .tp-agenda-row:focus-visible, html.tp-modern .tp-agenda-add:focus-visible {
    outline: 2px solid var(--tp-amber); outline-offset: 1px; }
/* entries: small tinted pills, one tint per kind. Aktivite blue, Ziyaret orange, Planlı = its kind's outline dashed on white,
   Sipariş termini gray (late: red), Teklif violet */
html.tp-modern .tp-cal-item { padding: .125rem .4375rem; border: 1px solid transparent; border-radius: var(--tm-r-xs); background: var(--tm-info-soft); color: var(--tp-text);
    font-size: .75rem; line-height: 1.125rem; }
html.tp-modern .tp-cal-item:hover { border-color: color-mix(in srgb, var(--tm-info) 45%, transparent); }
html.tp-modern .tp-cal-item.is-visit { background: var(--tm-accent-soft); border-color: transparent; }
html.tp-modern .tp-cal-item.is-visit:hover { border-color: var(--tm-accent-line); }
html.tp-modern .tp-cal-item.is-plan { border: 1px dashed color-mix(in srgb, var(--tm-info) 55%, transparent); background: var(--tm-surface); }
html.tp-modern .tp-cal-item.is-plan.is-visit { border-color: color-mix(in srgb, var(--tp-amber) 60%, transparent); }
html.tp-modern .tp-cal-item.is-plan:hover { border-style: solid; }
html.tp-modern .tp-cal-order { border: 1px solid transparent; background: var(--tm-hover); color: var(--tm-dim); }
html.tp-modern .tp-cal-order:hover { border-color: var(--tp-line2); }
html.tp-modern .tp-cal-order.is-late { background: var(--tm-bad-soft); color: var(--tm-bad); }
html.tp-modern .tp-cal-order.is-late:hover { border-color: color-mix(in srgb, var(--tm-bad) 40%, transparent); }
html.tp-modern .tp-cal-offer { border: 1px solid transparent; background: var(--tm-offer-soft); color: var(--tm-offer); }
html.tp-modern .tp-cal-offer:hover { border-color: color-mix(in srgb, var(--tm-offer) 40%, transparent); }
html.tp-modern .tp-cal-item .tp-code { font-size: .6875rem; font-weight: 500; }
html.tp-modern .tp-cal-time { margin-right: .25rem; font-family: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
html.tp-modern .tp-cal-legend .tp-cal-item { padding: .125rem .5rem; border-radius: 999px; }
html.tp-modern .tp-cal-legend .tp-cal-item:hover { border-color: transparent; }
html.tp-modern .tp-cal-legend .tp-cal-item.is-plan:hover { border-style: dashed; border-color: color-mix(in srgb, var(--tm-info) 55%, transparent); }
/* the activity's detail (modal) */
html.tp-modern .tp-cal-detail { gap: .5rem 1.25rem; }
html.tp-modern .tp-cal-detail dt { padding-top: 0; font-family: inherit; font-size: .8125rem; letter-spacing: 0; text-transform: none; color: var(--tm-dim); }
/* phone: the day list. A day = its date line and its entries as full-width 44 px rows */
@media (max-width: 639.98px) {
    /* toolbar: ‹ month › Bugün · whose customers · the view switch across · the two toggles side by side */
    html.tp-modern .tp-cal-bar .tp-cal-month { flex: 1 1 auto; min-width: 0; }
    html.tp-modern .tp-cal-bar > .tp-dim { flex-basis: 100%; min-width: 0; }
    html.tp-modern .tp-cal-bar > .tp-seg { display: flex; flex: 1 1 100%; width: auto; }
    html.tp-modern .tp-cal-bar > .tp-seg .fi-tabs-item { flex: 1 1 0; justify-content: center; }
    html.tp-modern .tp-cal-bar > .tp-seg ~ .fi-btn { flex: 1 1 0; min-width: 0; padding-inline: .5rem; white-space: nowrap; }
    html.tp-modern .tp-cal-grid { border: 0; border-radius: 0; overflow: visible; }
    html.tp-modern .tp-cal-day { gap: .375rem; min-height: 0; padding: .75rem 0; border-bottom: 1px solid var(--tp-line); }
    html.tp-modern .tp-cal-day:nth-last-child(-n + 7) { border-bottom: 1px solid var(--tp-line); }
    html.tp-modern .tp-cal-day:hover { background: none; }
    html.tp-modern .tp-cal-date { height: 2rem; margin-bottom: .125rem; gap: .5rem; font-size: .875rem; }
    html.tp-modern .tp-cal-date b { min-width: 2rem; line-height: 2rem; font-weight: 600; }
    html.tp-modern .tp-cal-wd { color: var(--tm-dim); }
    html.tp-modern .tp-cal-item { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .25rem; min-height: 2.75rem; padding: .375rem .75rem; border-radius: var(--tm-r-sm); font-size: .875rem; line-height: 1.3; }
    html.tp-modern .tp-cal-item .tp-code { font-size: .8125rem; }
    html.tp-modern .tp-cal-legend .tp-cal-item { display: block; min-height: 0; padding: .125rem .5rem; font-size: .75rem; line-height: 1.125rem; }
}
/* Ajanda: day header, then airy rows; the kind is the row's left edge */
html.tp-modern .tp-agenda { gap: 1.25rem; }
html.tp-modern .tp-agenda-date { gap: .5rem; padding: .25rem 0 .5rem; border-bottom-color: var(--tp-line); }
html.tp-modern .tp-agenda-date b { font-family: inherit; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tp-text); }
html.tp-modern .tp-agenda-date span { color: var(--tm-dim); }
html.tp-modern .tp-agenda-day.is-today .tp-agenda-date { border-bottom-color: var(--tm-accent-line); }
html.tp-modern .tp-agenda-add { width: 2rem; height: 2rem; border: 1px solid var(--tp-line2); border-radius: 999px; background: var(--tm-surface); color: var(--tm-dim); font-family: inherit; font-weight: 500; }
html.tp-modern .tp-agenda-add:hover { border-color: var(--tm-accent-line); background: var(--tm-accent-soft); color: var(--tp-amber); }
html.tp-modern .tp-agenda-row { min-height: 3.25rem; padding: .625rem .75rem; border-bottom-color: var(--tp-line); border-left-color: var(--tm-info); }
html.tp-modern .tp-agenda-row:hover { background: var(--tm-surface-2); }
html.tp-modern .tp-agenda-row.is-visit { border-left-color: var(--tp-amber); }
html.tp-modern .tp-agenda-row.is-order { border-left-color: var(--tp-line2); }
html.tp-modern .tp-agenda-row.is-late { border-left-color: var(--tm-bad); }
html.tp-modern .tp-agenda-row.is-offer { border-left-color: var(--tm-offer); }
html.tp-modern .tp-agenda-time { font-family: inherit; font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--tm-dim); }
html.tp-modern .tp-agenda-main { gap: .125rem; }
@media (pointer: coarse) { html.tp-modern .tp-agenda-add { width: 2.75rem; height: 2.75rem; } }
html.tp-modern .tp-act-form.fi-grid { row-gap: 1rem; column-gap: 1rem; }

/* ===== 3. Taleplerim, Yeni talep, Talep ayrıntısı ===== */
html.tp-modern .tp-split { gap: var(--tm-gap); }
html.tp-modern .tp-fields { gap: 1rem; }
html.tp-modern .tp-field { gap: .375rem; }
html.tp-modern .tp-invalid { margin-top: .25rem; }
html.tp-modern .tp-chips { gap: .375rem; }
html.tp-modern .tp-text { margin: .5rem 0; line-height: 1.55; }
/* the file picker: its own button in the gray button language */
html.tp-modern .tp-file { font-size: .875rem; color: var(--tm-dim); }
html.tp-modern .tp-file::file-selector-button { min-height: var(--tm-control-h); margin-right: .75rem; padding: .375rem .875rem; border: 1px solid var(--tp-line2); border-radius: var(--tm-r-sm);
    background: var(--tm-surface); color: var(--tp-text); font-family: inherit; font-weight: 500; font-size: .875rem; line-height: 1.25rem; cursor: pointer; }
html.tp-modern .tp-file::file-selector-button:hover { background: var(--tm-surface-2); }
html.tp-modern .tp-files { margin-top: .75rem; }
html.tp-modern .tp-files li { gap: .5rem .75rem; min-height: 2.75rem; padding: .375rem 0; border-bottom-color: var(--tp-line); }
html.tp-modern .tp-files li:last-child { border-bottom: 0; }
html.tp-modern .tp-files li.tp-removed > .tp-grow { color: var(--tm-faint); }
/* history: a timeline, a dot on a hairline; Turcar's entries orange, the customer's gray */
html.tp-modern .tp-history { margin-left: .3125rem; border-left: 1px solid var(--tp-line2); }
html.tp-modern .tp-history li { position: relative; margin: 0; padding: 0 0 1.25rem 1.25rem; border-left: 0; font-size: .875rem; line-height: 1.5; }
html.tp-modern .tp-history li:last-child { padding-bottom: .25rem; }
html.tp-modern .tp-history li::before { content: ''; position: absolute; left: -.34375rem; top: .375rem; width: .625rem; height: .625rem; border-radius: 50%;
    background: var(--tp-amber); box-shadow: 0 0 0 3px var(--tm-surface); }
html.tp-modern .tp-history li.is-customer::before { background: var(--tm-faint); }
html.tp-modern .tp-message { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--tp-line); }
html.tp-modern .tp-qty { width: 6.5rem; }

/* ===== 4. Ürünler, Stok, Hammadde: categories, results, row tools ===== */
html.tp-modern .tp-cat { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom-color: var(--tp-line); }
html.tp-modern .tp-cat-head { gap: .25rem .75rem; margin-bottom: .75rem; }
html.tp-modern .tp-cat-label { font-size: .8125rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tm-dim); }
html.tp-modern .tp-cat-path { gap: .125rem; }
html.tp-modern .tp-cat-path button { min-height: 1.75rem; padding: .125rem .5rem; border-radius: 999px; font-weight: 500; color: var(--tp-amber); }
html.tp-modern .tp-cat-path button:hover:not([disabled]) { background: var(--tm-accent-soft); }
html.tp-modern .tp-cat-path button[aria-current] { background: var(--tm-hover); color: var(--tp-text); font-weight: 600; }
html.tp-modern .tp-cat-path button:focus-visible, html.tp-modern .tp-cat-tile:focus-visible { outline: 2px solid var(--tp-amber); outline-offset: 2px; }
html.tp-modern .tp-cat-sep { color: var(--tm-faint); }
html.tp-modern .tp-cat-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; }
html.tp-modern .tp-cat-tile { gap: .25rem; min-height: 5.25rem; padding: .875rem 1rem; border: 1px solid var(--tp-line); border-radius: var(--tm-r); background: var(--tm-surface); box-shadow: var(--tm-shadow); }
html.tp-modern .tp-cat-tile:hover { border-color: var(--tm-accent-line); box-shadow: var(--tm-shadow-pop); }
html.tp-modern .tp-cat-code { margin-bottom: .125rem; padding: 0 .4375rem; border-radius: 999px; background: var(--tm-accent-soft); color: var(--tp-amber); font-size: .6875rem; font-weight: 500; line-height: 1.25rem; }
html.tp-modern .tp-cat-name { font-size: .9375rem; font-weight: 600; letter-spacing: -.005em; color: var(--tp-text); }
html.tp-modern .tp-cat-name.is-sample { font-size: .8125rem; font-weight: 400; color: var(--tm-dim); }
html.tp-modern .tp-cat-tile .tp-dim { font-size: .8125rem; }
@media (prefers-reduced-motion: no-preference) {
    html.tp-modern .tp-cat-tile { transition: transform .12s, box-shadow .12s, border-color .12s; }
    html.tp-modern .tp-cat-tile:hover { transform: translateY(-2px); }
}
@media (max-width: 639.98px) { html.tp-modern .tp-cat-grid { grid-template-columns: 1fr 1fr; gap: .5rem; } html.tp-modern .tp-cat-tile { padding: .75rem; } }
/* results: code over name, right-aligned stock / price */
html.tp-modern .tp-catalogue td, html.tp-modern .tp-stack td { vertical-align: middle; }
html.tp-modern .tp-stack .tp-c-price, html.tp-modern .tp-stack .tp-num { font-variant-numeric: tabular-nums; }
html.tp-modern .tp-row-tools { gap: .5rem; }
html.tp-modern .tp-row-btn-gap { width: 2rem; }
/* the row dialogs' insides (<x-tp-product-tools>) */
html.tp-modern .tp-dialog-head b { font-size: 1rem; font-weight: 600; }
html.tp-modern .tp-kv { gap: .375rem 1rem; margin-bottom: 1rem; }
html.tp-modern .tp-list-price { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
html.tp-modern .tp-disc-own { gap: .75rem; padding: .75rem 1rem; margin-bottom: 1rem; }
html.tp-modern .tp-disc-input { min-height: var(--tm-control-h); border-color: var(--tp-line2); color: var(--tm-dim); }
html.tp-modern .tp-disc-input input { font-weight: 600; font-variant-numeric: tabular-nums; }
html.tp-modern .tp-disc-result { font-size: .8125rem; color: var(--tm-dim); }
html.tp-modern .tp-disc-result b { font-size: 1.125rem; font-weight: 600; color: var(--tp-amber); font-variant-numeric: tabular-nums; }
html.tp-modern .tp-disc tr.is-marked td:first-child { box-shadow: inset 3px 0 var(--tp-amber); }
/* the discount window, compact (user, 12.11.2026): less air round its parts, the rate rows closer together */
html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-head { padding-block: .75rem; }
html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-body { padding-block: .75rem; }
html.tp-modern .tp-dialog .tp-kv { gap: .125rem 1rem; margin-bottom: .625rem; font-size: .8125rem; }
html.tp-modern .tp-dialog .tp-list-price { font-size: 1.25rem; line-height: 1.5rem; }
html.tp-modern .tp-dialog .tp-disc-own { gap: .625rem; padding: .5rem .75rem; margin-bottom: .625rem; }
html.tp-modern .tp-dialog .tp-table.tp-disc :is(th, td) { padding-block: .1875rem; font-size: .8125rem; line-height: 1.25rem; }
html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-foot { padding-block: .5rem; }
html.tp-modern .tp-picture { padding: 1rem; }
html.tp-modern .tp-picture img { border-radius: var(--tm-r-sm); }
@media (max-width: 639.98px) {
    html.tp-modern .tp-dialog { width: calc(100vw - 1.5rem); }
    html.tp-modern .tp-dialog-foot { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
    /* a phone: the discount window is the whole screen (user, 12.11.2026); its head and foot stay, the body scrolls. Touch rows stay 36 px */
    html.tp-modern .tp-dialog[open]:not(.tp-dialog-picture) { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; overflow: hidden; }
    html.tp-modern .tp-dialog:not(.tp-dialog-picture) > div { display: flex; flex-direction: column; height: 100%; }
    /* the cost windows (ⓘ, Varyant Hesapla) have no wrapper: head, body and foot are the dialog's own children, so the
       rule above made the body as tall as the screen and pushed the foot (its buttons) off it */
    html.tp-modern .tp-dialog[open]:is(.tp-dialog-cost, .tp-dialog-variant) { display: flex; flex-direction: column; }
    html.tp-modern .tp-dialog:is(.tp-dialog-cost, .tp-dialog-variant) > .tp-dialog-body { display: block; height: auto; }
    html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-head { padding-top: max(.75rem, env(safe-area-inset-top)); }
    html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
    html.tp-modern .tp-dialog:not(.tp-dialog-picture) .tp-dialog-foot { flex: none; padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
    html.tp-modern .tp-dialog .tp-table.tp-disc :is(th, td) { padding-block: .4375rem; font-size: .875rem; }
    html.tp-modern .tp-table.tp-stack td:not(:first-child) { margin-top: .5rem; }
    html.tp-modern .tp-table.tp-stack td.tp-c-tools { margin-top: 0; }
}

/* ===== 5. Siparişlerim, Sipariş ayrıntısı ===== */
html.tp-modern .tp-step { margin-top: .375rem; }
html.tp-modern .tp-step b { font-weight: 600; color: var(--tp-text); }
html.tp-modern .tp-step + .tp-progress, html.tp-modern .tp-table .tp-progress { max-width: 12rem; margin-top: .375rem; }

/* ===== 6. Cari Hesabım: the totals per currency as stat cards (account/index, Modern branch), statement, open items ===== */
html.tp-modern .tp-acc-totals { display: grid; gap: .75rem; }
html.tp-modern .tp-acc-cur { display: grid; grid-template-columns: 5.5rem repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 0; }
html.tp-modern .tp-acc-cur > div { display: flex; flex-direction: column; gap: .375rem; min-width: 0; padding: 1rem 1.25rem; border: 1px solid var(--tp-line); border-radius: var(--tm-r); background: var(--tm-surface); }
html.tp-modern .tp-acc-cur dt { font-size: .8125rem; line-height: 1.25rem; color: var(--tm-dim); }
html.tp-modern .tp-acc-cur dd { margin: 0; font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--tp-text); overflow-wrap: anywhere; }
html.tp-modern .tp-acc-cur .tp-acc-code { background: var(--tm-surface-2); }
html.tp-modern .tp-acc-cur .is-main { border-color: var(--tm-accent-line); background: var(--tm-accent-soft); }
html.tp-modern .tp-acc-cur .is-late { border-color: color-mix(in srgb, var(--tm-bad) 35%, var(--tm-surface)); background: var(--tm-bad-soft); }
html.tp-modern .tp-acc-cur .is-late dd { color: var(--tm-bad); }
@media (max-width: 1279.98px) {
    html.tp-modern .tp-acc-cur { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    html.tp-modern .tp-acc-cur dd { font-size: 1.125rem; }
}
@media (max-width: 639.98px) {
    html.tp-modern .tp-acc-cur { grid-template-columns: 1fr 1fr; gap: .5rem; }
    html.tp-modern .tp-acc-cur > div { padding: .75rem .875rem; }
    html.tp-modern .tp-acc-cur dd { font-size: 1rem; line-height: 1.5rem; }
}
/* the date range row: label over nothing, fields in a line that wraps */
html.tp-modern form.tp-toolbar .tp-check > span { color: var(--tm-dim); font-size: .8125rem; }

/* ===== 7. Mesajlar: the shared chat component styles itself (portal-mesaj.css + portal-mesaj-tema.css) ===== */
html.tp-modern.dark .tp-cat-tile { box-shadow: none; }

/* ===== 8. Pusula (the advisor and the comparison, cutting/styles): the instrument on Modern surfaces ===== */
/* its own variables, tied to the tokens (night follows them); mono, density and sliders stay */
html.tp-modern .tca { --bg: var(--tp-bg); --bg2: var(--tm-surface); --bg3: var(--tm-surface-2); --line: var(--tp-line); --line2: var(--tp-line2); --text: var(--tp-text);
    --dim: var(--tm-dim); --faint: var(--tm-faint); --amber-dim: var(--tm-accent-line); --amber-soft: var(--tm-accent-soft); --green: var(--tm-good); --red: var(--tm-bad); --blue: var(--tm-info);
    --grid: transparent; background-image: none; }
html.tp-modern .tca input[type=text], html.tp-modern .tca select, html.tp-modern .tca .tca-state-note { border-color: var(--tp-line2); border-radius: var(--tm-r-sm); background-color: var(--tp-field); }
html.tp-modern .tca input[type=text]:focus, html.tp-modern .tca select:focus, html.tp-modern .tca .tca-state-note:focus { border-color: var(--tp-amber); box-shadow: 0 0 0 3px var(--tm-ring); }
html.tp-modern .tca .tca-cval input[type=text] { border-radius: 0; background: none; box-shadow: none; border-color: var(--tp-line2); }
html.tp-modern .tca .tca-cval input[type=text]:focus { border-bottom-color: var(--tp-amber); box-shadow: none; }
html.tp-modern .tca-btn { border-radius: var(--tm-r-sm); background: var(--tm-surface); }
html.tp-modern .tca-btn.primary { background: var(--tp-amber); }
html.tp-modern .tca-btn:focus-visible, html.tp-modern .tca-pill:focus-visible, html.tp-modern .tca-combo-x:focus-visible { outline: 2px solid var(--tp-amber); outline-offset: 2px; }
html.tp-modern .tca-pills { border-radius: var(--tm-r-sm); background: var(--tp-line); border-color: transparent; }
html.tp-modern .tca-pill { border-radius: var(--tm-r-xs); }
html.tp-modern .tca-pill.on { background: var(--tm-surface); color: var(--tp-amber); box-shadow: var(--tm-shadow); }
html.tp-modern .tca-engage, html.tp-modern .tca-card, html.tp-modern .tca-small, html.tp-modern .tca-empty, html.tp-modern .tca-formula, html.tp-modern .tca-combo-list { border-radius: var(--tm-r-sm); }
html.tp-modern .tca-combo-list { box-shadow: var(--tm-shadow-pop); }
html.tp-modern .tca-warn { border-radius: 0 var(--tm-r-sm) var(--tm-r-sm) 0; }
html.tp-modern .tca-tag { border-radius: 999px; }
html.tp-modern .tca-table th:first-child { border-top-left-radius: var(--tm-r-sm); }
html.tp-modern .tca-table th:last-child { border-top-right-radius: var(--tm-r-sm); }
html.tp-modern .tca input[type=range] { border-radius: 999px; background: var(--tp-line); border-color: transparent; }
html.tp-modern .tca input[type=range]::-webkit-slider-thumb { border-radius: var(--tm-r-xs); border-color: var(--tm-surface); }
html.tp-modern .tca input[type=range]::-moz-range-thumb { border-radius: var(--tm-r-xs); border-color: var(--tm-surface); }
html.tp-modern .tca-band { border-radius: 2px; }
html.tp-modern .tca-dot { box-shadow: none; }
@media (max-width: 639.98px) { html.tp-modern .tca input[type=text], html.tp-modern .tca select, html.tp-modern .tca .tca-state-note { font-size: 1rem; } }
/* library table cells (Girdiler / Çıktılar) */
html.tp-modern :is(.tp-ins, .tp-outs) { font-size: .75rem; line-height: 1.6; color: var(--tp-text); }

/* ===== 9. Web sitesi: Katalog, Çeviriler, QR sayaçları ===== */
/* the counts: stat cards, the label small and gray above, the value big, semibold, tabular */
html.tp-modern .tp-web-kpis { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
html.tp-modern .tp-web-kpis .tp-kpi { flex-direction: column-reverse; justify-content: flex-end; gap: .375rem; min-width: 0; padding: 1rem 1.25rem; border: 1px solid var(--tp-line); border-radius: var(--tm-r);
    background: var(--tm-surface); box-shadow: none; }
html.tp-modern .tp-web-kpis .tp-kpi:hover { border-color: var(--tp-line); }
html.tp-modern .tp-web-kpis .tp-kpi-l { font-family: inherit; font-size: .8125rem; line-height: 1.25rem; letter-spacing: 0; text-transform: none; color: var(--tm-dim); }
html.tp-modern .tp-web-kpis .tp-kpi-n { font-family: inherit; font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--tp-text); overflow-wrap: anywhere; }
html.tp-modern .tp-web-kpis .tp-kpi-n.tp-web-date { font-size: 1.125rem; letter-spacing: -.01em; }
html.tp-modern .tp-web-kpis .tp-kpi.is-alert { border-color: color-mix(in srgb, var(--tm-bad) 35%, var(--tm-surface)); background: var(--tm-bad-soft); }
html.tp-modern .tp-web-kpis .tp-kpi.is-alert .tp-kpi-n { color: var(--tm-bad); }
html.tp-modern .tp-web-actions { margin-top: 1.25rem; }
html.tp-modern .tp-web-diff { gap: var(--tm-gap); margin-top: .75rem; }
html.tp-modern .tp-web-h { margin-bottom: .5rem; font-family: inherit; font-weight: 600; font-size: .875rem; line-height: 1.25rem; letter-spacing: 0; text-transform: none; color: var(--tp-text); }
/* the category tree */
html.tp-modern .tp-web-tree td { vertical-align: middle; }
html.tp-modern .tp-web-tree td:first-child { padding-left: calc(.75rem + var(--d, 0) * 1.5rem); }
html.tp-modern .tp-web-row { gap: .625rem; min-height: 1.5rem; }
html.tp-modern .tp-web-fold { width: 1.5rem; height: 1.5rem; border-radius: var(--tm-r-xs); color: var(--tm-dim); }
html.tp-modern .tp-web-fold:hover { background: var(--tm-hover); color: var(--tp-text); }
html.tp-modern .tp-web-fold:focus-visible, html.tp-modern .tp-web-name:focus-visible, html.tp-modern .tp-web-check:focus-visible { outline: 2px solid var(--tp-amber); outline-offset: 2px; }
html.tp-modern .tp-web-check { width: 1.125rem; height: 1.125rem; }
html.tp-modern .tp-web-name { font-weight: 500; }
html.tp-modern .tp-web-name:hover { color: var(--tp-amber); }
html.tp-modern .tp-web-cat:not(.is-on) .tp-web-name, html.tp-modern .tp-web-prod.is-off td { color: var(--tm-dim); }
@media (pointer: coarse) {
    html.tp-modern .tp-web-fold { width: 2.75rem; height: 2.75rem; margin: -.5rem -.375rem; }
    html.tp-modern .tp-web-check { width: 1.375rem; height: 1.375rem; }
    html.tp-modern .tp-web-row { min-height: 2.75rem; }
}
/* translations */
html.tp-modern .tp-web-texts td { vertical-align: top; }
html.tp-modern .tp-web-upload { cursor: pointer; }
@media (max-width: 639.98px) {
    html.tp-modern .tp-web-kpis { grid-template-columns: 1fr 1fr; gap: .5rem; }
    html.tp-modern .tp-web-kpis .tp-kpi { padding: .75rem .875rem; }
    html.tp-modern .tp-web-kpis .tp-kpi-n { font-size: 1.25rem; line-height: 1.75rem; }
    html.tp-modern .tp-web-kpis .tp-kpi-n.tp-web-date { font-size: 1rem; }
    html.tp-modern .tp-web-kpis .tp-kpi:has(.tp-web-date) { grid-column: 1 / -1; }
    html.tp-modern .tp-web-tree td:first-child { padding-left: calc(.25rem + var(--d, 0) * 1rem); }
    html.tp-modern .tp-web-tree td { padding-inline: .25rem; }
    html.tp-modern .tp-web-row { gap: .5rem; }
    html.tp-modern :is(.tp-web-code, .tp-web-lang, .tp-web-filter, .tp-web-search) { flex: 1 1 100%; width: 100%; min-width: 0; }
}

/* ===== 10. Yardım pages, offer preview ===== */
html.tp-modern .tp-help { font-size: .9375rem; line-height: 1.65; }
html.tp-modern .tp-help-toc, html.tp-modern .tp-help-note { border-color: var(--tp-line); border-radius: var(--tm-r-sm); background: var(--tm-surface-2); }
html.tp-modern .tp-help-toc b { font-family: inherit; font-weight: 600; font-size: .8125rem; letter-spacing: 0; text-transform: none; color: var(--tp-text); }
html.tp-modern .tp-help-toc a:hover { color: var(--tp-amber); }
html.tp-modern .tp-help h2 { padding-bottom: .5rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; border-bottom-color: var(--tp-line); }
html.tp-modern .tp-help th { font-family: inherit; font-weight: 500; font-size: .75rem; letter-spacing: 0; text-transform: none; color: var(--tm-dim); background: var(--tm-surface-2); }
html.tp-modern .tp-help :is(th, td) { padding: .5rem .75rem; border-bottom-color: var(--tp-line); }
html.tp-modern .tp-help code { padding: .0625rem .3125rem; border-radius: var(--tm-r-xs); background: var(--tm-hover); }
html.tp-modern .tp-help figure img { border-color: var(--tp-line); border-radius: var(--tm-r-sm); }
html.tp-modern .tp-help figcaption { margin-top: .375rem; font-family: inherit; font-weight: 400; font-size: .75rem; color: var(--tm-dim); }
html.tp-modern .tp-help dt { font-weight: 600; }
html.tp-modern .tp-help a:not([class]) { color: var(--tp-amber); }
html.tp-modern .tp-help-toc a:not([class]) { color: inherit; }
/* offer preview (modal): total and facts */
html.tp-modern .tp-offer { gap: 1rem; }
html.tp-modern .tp-offer-total { font-family: inherit; font-weight: 600; font-size: 1.375rem; line-height: 1.75rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
html.tp-modern .tp-offer-total small { font-family: inherit; font-weight: 400; font-size: .75rem; letter-spacing: 0; color: var(--tm-dim); }
html.tp-modern .tp-offer-facts { gap: .75rem 1.25rem; padding: .875rem 1rem; border-color: var(--tp-line); border-radius: var(--tm-r-sm); background: var(--tm-surface-2); }
html.tp-modern .tp-offer-facts dt { font-family: inherit; font-weight: 400; font-size: .75rem; line-height: 1.125rem; letter-spacing: 0; text-transform: none; color: var(--tm-dim); }
html.tp-modern .tp-offer-facts dd { font-size: .875rem; font-weight: 500; }
html.tp-modern .tp-offer-lines td { font-size: .8125rem; }
html.tp-modern .tp-offer-note { font-size: .8125rem; color: var(--tm-dim); }

}

/* the state marks in the Modern look: rounded like its cards */
html.tp-modern .tp-flow a { border-radius: var(--tm-r); background: var(--tm-surface); box-shadow: var(--tm-shadow); }
html.tp-modern .tp-flow-t span, html.tp-modern .tp-left { color: var(--tm-dim); }
html.tp-modern .tp-left.is-soon { color: var(--tp-amber); }
html.tp-modern .tp-left.is-last { color: var(--tm-bad); border-color: var(--tm-bad); }
html.tp-modern .tp-drop { border-radius: var(--tm-r); background: var(--tm-surface-2); }
html.tp-modern .tp-drop.is-over { background: var(--tm-accent-soft); }
html.tp-modern .tp-drop-bar, html.tp-modern .tp-drop-bar span { border-radius: 999px; }
html.tp-modern .tp-ring-track { stroke: var(--tp-line); }
