/* Shared mobile layout for the administration and dealer portal. */
@media screen and (max-width:960px) {
  .main,.content,.panel-main,.panel-top-in {min-width:0;width:100%}
  .content,.panel-main {padding-inline:12px;max-width:100%;margin-inline:auto}
  .content > *,.panel-main > * {min-width:0}
  .page-head {flex-direction:column;align-items:center;gap:12px;text-align:center}
  .page-head > * {min-width:0;max-width:100%}
  .page-head h1 {font-size:clamp(20px,5vw,26px);overflow-wrap:anywhere}
  .page-head p {line-height:1.7}
  .page-actions {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:100%}
  .topbar {flex-wrap:wrap;justify-content:center;gap:10px;padding:10px 12px}
  .topbar-search {flex:1 1 100%;max-width:none;min-width:0;order:2}
  .topbar-right {margin-inline:0;justify-content:center;gap:8px;min-width:0;max-width:100%;flex:1 1 auto}
  .topbar.no-search .topbar-brand {margin-inline:0;justify-content:center}
  .topbar-brand img {max-width:95px;height:34px}
  .topbar .surum-btn {padding:8px;min-height:40px}
  .topbar .surum-yazi {font-size:0}
  .topbar .surum-yazi::after {content:attr(data-kisa);font-size:10px}
  .workspace-badge {white-space:normal;text-align:center;justify-content:center}
  .topbar .language-switcher {gap:3px}
  .topbar .language-switcher select {max-width:96px;min-height:40px}
  .topbar .language-switcher button {min-width:36px;min-height:40px}
  .card {min-width:0;padding:16px;overflow-wrap:anywhere}
  .card-head {flex-wrap:wrap;justify-content:center;gap:12px;text-align:center}
  .card-head > h2,.card-head > h3 {max-width:100%;line-height:1.6}
  .card-head > .right {margin-inline:0;justify-content:center;flex-wrap:wrap;max-width:100%}
  .card-head .search-box {min-width:0;max-width:100%}
  .card-head .flex,.card-head form {flex-wrap:wrap;justify-content:center;max-width:100%}
  .form-grid {grid-template-columns:minmax(0,1fr)!important}
  .form-grid > *, .form-grid .span-2 {grid-column:auto!important;min-width:0}
  .field {min-width:0}
  .field > label {text-align:center;line-height:1.6}
  .field > .flex {flex-wrap:wrap;justify-content:center}
  .input,.select,.textarea {min-width:0;max-width:100%}
  .btn {min-height:42px;white-space:normal;justify-content:center;text-align:center;line-height:1.45;overflow-wrap:anywhere}
  .icon-btn {min-width:40px;min-height:40px;flex-shrink:0}
  .tabs-nav,.chip-row {max-width:100%;justify-content:center;flex-wrap:wrap;gap:6px}
  .tabs-nav .tab-btn {white-space:normal;min-height:42px;justify-content:center;text-align:center}
  .table {min-width:0!important}
  .table tr {min-width:0}
  .table td {flex-wrap:wrap;justify-content:center!important;text-align:center!important;gap:8px;overflow-wrap:anywhere}
  .table td::before {flex:1 1 100%;text-align:center!important;white-space:normal}
  .table td > * {min-width:0;max-width:100%}
  .table td.td-stack {text-align:center!important}
  .table td .flex {flex-wrap:wrap;justify-content:center!important}
  .table td .sales-product-identity {justify-content:center;flex-wrap:wrap;text-align:center}
  .table td .input,.table td .select {max-width:100%;margin-inline:auto}
  .table .sales-quantity {margin-inline:auto}
  .sales-quantity > button,.discount-stepper > button {min-height:36px;min-width:30px}
  .td-stack .iskonto-box [style*="grid-template-columns"] {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .td-stack .iskonto-box .input {padding-inline:4px!important}
  .modal-backdrop {padding:12px;align-items:flex-start;overscroll-behavior:contain}
  .modal-backdrop .modal {width:100%;max-width:100%!important;margin:auto;padding:18px 14px;min-width:0;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
  .modal-head {gap:10px;min-width:0}
  .modal-head h3 {flex:1;text-align:center;line-height:1.6;overflow-wrap:anywhere}
  .modal-head .icon-btn {margin-inline:0}
  .modal .form-grid {gap:10px}
  .modal .catalog-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:40dvh!important;overscroll-behavior:contain}
  .product-tile {min-width:0;text-align:center;overflow-wrap:anywhere}
  .product-tile img {max-width:100%;width:100%;object-fit:contain}
  .modal .mini-item,.modal .modul-item {min-width:0;max-width:100%;flex-wrap:wrap}
  .modal form > .flex {flex-wrap:wrap;justify-content:center}
  .modal .search-box {width:100%;min-width:0}
  .notif-panel {position:fixed;inset-inline:12px;top:100px;width:auto;max-width:none;max-height:calc(100dvh - 190px);overflow:auto}
  .toast-wrap {inset-inline:12px;width:auto;max-width:none;bottom:calc(84px + env(safe-area-inset-bottom))}
  .toast {max-width:100%;overflow-wrap:anywhere}
  .panel-top-in {flex-wrap:wrap;justify-content:center;gap:12px}
  .panel-brand {justify-content:center;max-width:100%;flex-wrap:wrap}
  .panel-user {margin-inline:0;justify-content:center;width:100%;gap:8px}
  .panel-nav {width:100%;flex-wrap:wrap;justify-content:center;overflow:visible;gap:6px}
  .panel-nav a {white-space:normal;text-align:center;justify-content:center;min-height:42px}
  .panel-user-name {text-align:center!important;overflow-wrap:anywhere;min-width:0}
  .panel-foot {text-align:center;padding-inline:16px}
  .pn-katalog {grid-template-columns:minmax(0,1fr)!important}
  .pn-cart,.builder-side {position:static!important;min-width:0}
  .pn-catalog-hero {text-align:center;justify-content:center;flex-wrap:wrap;padding:20px 16px}
  .pn-catalog-eyebrow,.pn-rep-lines {justify-content:center}
  .pn-catalog-highlights {width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
  .pn-catalog-highlights > div {min-width:0;padding:12px 6px}
  .pn-filtre {justify-content:center;flex-wrap:wrap}
  .pn-filtre > * {min-width:0;max-width:100%}
  #pnGrid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  #pnGrid .product-tile {padding:9px}
  #pnGrid .product-tile img {height:120px}
  .sales-hero {text-align:center;align-items:center;justify-content:center;flex-wrap:wrap}
  .sales-hero-total {border:0!important;padding-inline:0!important;text-align:center;width:100%}
  .sales-hero-meta {justify-content:center;flex-wrap:wrap}
  .sales-actions-card .sales-action-list {min-width:0}
  .bottom-nav {padding-bottom:env(safe-area-inset-bottom)}
  .content {padding-bottom:calc(100px + env(safe-area-inset-bottom))}
  .chat-assistant-launcher {bottom:calc(80px + env(safe-area-inset-bottom))}
}
@media screen and (max-width:600px) {
  input.input,select.select,textarea.textarea {font-size:16px}
  .topbar {position:relative}
  .topbar.no-search .topbar-brand {flex:1 1 100%}
  .topbar-right {flex:1 1 100%}
  .content .stat-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat-card {text-align:center;padding:14px 10px;min-height:0}
  .stat-value {font-size:clamp(18px,5vw,24px);overflow-wrap:anywhere}
  .stat-label,.stat-note {justify-content:center;line-height:1.6}
  .stat-sub {text-align:center;justify-content:center;flex-wrap:wrap}
  .builder .catalog-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .sales-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card-head > .right {width:100%}
  .card-head > .right > .btn {flex:1 1 130px}
  .card-head .search-box {flex:1 1 100%;width:100%}
  .page-actions > .btn {flex:1 1 130px}
  .modal .catalog-grid .product-tile img {height:90px}
  .modal .pt-name {font-size:12px;line-height:1.5}
  .modal .pt-price {font-size:12px}
  .sales-hero h2 {font-size:22px;overflow-wrap:anywhere}
  .table td .sales-product-photo {margin-inline:auto}
}
@media screen and (max-width:359px) {
  .workspace-badge {max-width:90px}
  .td-stack .iskonto-box [style*="grid-template-columns"] {grid-template-columns:minmax(0,1fr)!important}
  .pn-catalog-highlights {gap:6px}
}
@media screen and (max-width:960px) {
  .login-card {width:100%;max-width:440px;margin-inline:auto}
}
@media screen and (max-width:960px) {
  .mini-body .t {flex-wrap:wrap;white-space:normal;overflow-wrap:anywhere}
  .mini-body .t > :is(a,span) {min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media screen and (max-width:960px) {
  .topbar .surum-yazi::after {content:none}
  .sales-workspace .sales-main > .tabs-nav {flex-wrap:wrap!important;justify-content:center;overflow:visible}
  .sales-workspace .sales-main > .tabs-nav .tab-btn {flex:1 1 125px;min-width:0;white-space:normal}
  .sales-workspace .sales-document-actions > .flex > .btn-ghost {justify-content:center}
}
@media screen and (max-width:600px) {
  .topbar-right {gap:5px}
  .topbar-right > .avatar {width:30px;height:30px;flex:0 0 30px;font-size:11px}
  .topbar .language-switcher select {width:80px;max-width:80px;padding-inline:4px;font-size:11px}
  .topbar .language-switcher button {min-width:30px;padding-inline:6px}
  .topbar .surum-btn {gap:3px;padding-inline:5px}
  .topbar .surum-yazi::before {font-size:10px}
  .topbar .workspace-badge {padding-inline:5px;font-size:9px}
}
@media screen and (max-width:960px) {
  body:has(.modal-backdrop.open),body:has(.more-sheet.open) {overflow-y:hidden}
  .more-sheet .more-panel {max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
  .more-sheet .more-grid {min-width:0;justify-content:center}
  .more-link {min-width:0;text-align:center;overflow-wrap:anywhere}
  .chat-composer textarea {font-size:16px;min-width:0}
  .chat-composer {min-width:0}
  .chat-conversation {max-height:calc(100dvh - 110px)}
  .chat-conversation-head,.chat-connection {text-align:center;justify-content:center}
  .chat-tabs {flex-wrap:wrap}
  .assistant-voice {flex-wrap:wrap;justify-content:center}
}
@media screen and (max-width:960px) {
  .customers-hero,.svk-hero,.portal-welcome {text-align:center;align-items:center;justify-content:center;flex-wrap:wrap}
  .customers-eyebrow,.svk-hero-chips,.portal-shortcuts {justify-content:center}
  .customers-toolbar,.store-toolbar,.store-toolbar form,.store-actions {flex-wrap:wrap;justify-content:center;gap:10px;text-align:center}
  .store-toolbar select {min-width:0;max-width:100%}
  .customer-identity {justify-content:center;text-align:center;flex-wrap:wrap;min-width:0}
  .transaction-actions {justify-content:center;flex-wrap:wrap;white-space:normal}
  .transaction-toolbar {justify-content:center}
  .ekstre-detail-heading {flex-wrap:wrap;justify-content:center;text-align:center}
}
@media screen and (max-width:960px) {
  .topbar .surum-yazi::before {content:attr(data-kisa);font-size:10px}
}
/* A visible desktop sidebar leaves less room on small tablets/laptops. */
@media screen and (min-width:961px) and (max-width:1200px) {
  .content > *, .content .card, .content .card > *, .content .grid-2 > *, .content .grid-3 > * {min-width:0;max-width:100%}
  .content :is(.grid-2,.grid-3,.dz-row,.dash-grid,.dash-grid-3),
  .content [style*="grid-template-columns"] {grid-template-columns:minmax(0,1fr)!important}
  .content .form-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .content .form-grid > * {min-width:0}
  .content .stat-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .content .stat-card {min-width:0;overflow-wrap:anywhere}
  .content .table-wrap {max-width:100%;overflow-x:auto}
  .content .card-head {flex-wrap:wrap;gap:10px}
  .content .sales-columns {grid-template-columns:minmax(0,1fr)!important}
  .content .sales-sidebar {position:static}
  .content .mini-body .t {flex-wrap:wrap;overflow-wrap:anywhere}
  .content .mini-body .t > * {min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
}
@media screen {
  .content .grid-2 > *, .content .grid-3 > *, .content [style*="grid-template-columns"] > *, .content .stat-grid > * {min-width:0}
}
@media screen and (min-width:961px) {
  .content .stat-grid {grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr))}
  .content .stat-card {overflow-wrap:anywhere}
}
@media screen and (min-width:961px) and (max-width:1200px) {
  .content .stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen {
  .content .badge,.panel-main .badge {max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
}
@media screen and (max-width:600px) {
  .pgrid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .pcard-img {height:120px}
  .pcard-body {padding:12px 9px}
  .pcard-name {font-size:12px;line-height:1.6;flex-wrap:wrap;justify-content:center!important;text-align:center}
  .pcard-meta {justify-content:center}
  .pcard-prices .prow {flex-wrap:wrap;gap:4px;justify-content:center;text-align:center}
  .pcard-prices .prow .pl {font-size:10px;flex-basis:100%}
  .pcard-prices .prow .pv {font-size:12px}
  .pcard-prices .prow.main .pv {font-size:14px}
}
@media screen and (max-width:359px) {
  .pgrid {grid-template-columns:minmax(0,1fr)}
}
