/* A mesma interface e os mesmos fluxos, adaptados ao espaço do computador. */
.desktop-context, .desktop-brand { display: none; }

@media screen and (min-width: 1024px) {
  body { background: #f3f6fa; }
  .app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: none; width: 100%; margin: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .app-shell.hidden { display: none; }
  .sidebar, .sidebar.open { position: sticky; top: 0; left: auto; width: 240px; height: 100dvh; transform: none; background: #fff; border-right: 1px solid #dce5ef; box-shadow: none; padding: 24px 16px; z-index: 30; }
  .side-brand { display: none; }
  .desktop-brand { display: grid; place-items: center; background: linear-gradient(120deg, #07579b, #0077c8); border-radius: 14px; padding: 16px; margin-bottom: 28px; }
  .desktop-brand img { width: 176px; height: 70px; object-fit: contain; }
  .sidebar nav { display: grid; gap: 6px; }
  .nav-item { width: 100%; min-height: 48px; padding: 12px; border-radius: 10px; color: #52697f; font-size: 14px; font-weight: 650; text-align: left; }
  .nav-item > span { width: 26px; font-size: 21px; text-align: center; }
  .nav-item.active { background: #e7f2fb; color: #006bb5; box-shadow: inset 3px 0 #0074c4; }
  .nav-item:hover { background: #eef5fa; }
  .user-panel { margin-top: auto; padding-top: 18px; border-top: 1px solid #e3ebf3; min-width: 0; }
  .user-panel > div:nth-child(2) { min-width: 0; flex: 1; }
  .user-panel b { font-size: 14px; overflow-wrap: anywhere; color: #173e62; }
  .user-panel small { font-size: 12px; color: #71869b; }
  .user-panel button { color: #0867ac; min-width: 36px; min-height: 40px; }
  .content-shell { min-width: 0; width: 100%; }
  .topbar { height: 76px; padding: 0 32px; border-radius: 0; background: #fff; border-bottom: 1px solid #dce5ef; box-shadow: none; position: sticky; top: 0; }
  .topbar::after, .topbar .top-logo, .topbar .menu-button, .bottom-nav, .side-scrim { display: none; }
  .desktop-context { display: grid; gap: 4px; min-width: 0; }
  .desktop-context strong { font-size: 17px; color: #143b60; }
  .desktop-context small { font-size: 13px; color: #71869b; overflow-wrap: anywhere; }
  .notification-button { background: #edf5fc; color: #0867ac; border-radius: 12px; }
  .notification-button svg { stroke: currentColor; }
  main { width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 48px; }
  .view > :first-child { margin-top: 0; }
  .view h1, #view-client-detail .contract-head h1, #view-client-orders .contract-head h1, #view-agenda .agenda-heading h1 { font-size: 28px; line-height: 1.25; }
  .view h2 { font-size: 20px; }
  .view h3 { font-size: 17px; }
  .view p { line-height: 1.5; }
  .view .page-heading p, .view .module-head p, .view .contract-head p, .clients-heading p, #view-agenda .agenda-heading p { font-size: 14px; max-width: none; }
  .view small { font-size: 13px; }
  .page-heading, .module-head, .contract-head { margin-bottom: 24px; }
  .module-head { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .module-head.simple { grid-template-columns: 44px minmax(0, 1fr); }
  .module-add { grid-column: auto; width: auto; min-width: 150px; margin: 0; }
  .back-button { width: 44px; height: 44px; flex-shrink: 0; }
  .view input, .view select, .view textarea, dialog input, dialog select, dialog textarea { font-size: 15px; }
  .view label, dialog label { font-size: 14px; }
  .view input:not([type=checkbox]):not([type=radio]), .view select { min-height: 44px; }
  .module-search, .client-search, .contract-search { max-width: 680px; min-height: 48px; height: auto; margin-bottom: 18px; }
  .module-search input, .client-search input, .contract-search input { font-size: 15px; }
  .view .chip, .client-filters button, .agenda-filters button, .contract-tabs button { min-height: 42px; font-size: 14px; padding: 10px 18px; }
  .filter-row, .client-filters, .agenda-filters { flex-wrap: wrap; overflow: visible; gap: 8px; margin-bottom: 20px; }
  .view button { cursor: pointer; }
  button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #5bb6ef; outline-offset: 3px; }
  .primary-button, .secondary-button, .contract-primary, .contract-cancel, .module-add, .icon-button { min-height: 42px; font-size: 14px; }
  .home-greeting { margin-bottom: 24px; }
  .home-greeting p { font-size: 15px; }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
  .home-card { min-height: 132px; padding: 20px 16px; gap: 12px; }
  .home-copy strong { font-size: 19px; }
  .home-copy small { font-size: 13px; }
  .home-title-break { display: none; }
  .home-icon { flex-shrink: 0; }
  .new-order-card { min-height: 90px; padding: 18px 24px; margin-bottom: 24px; }
  .new-order-card strong { font-size: 20px; }
  .new-order-card strong br::after { content: ' '; }
  .new-order-card strong br { display: contents; }
  .new-order-card small { font-size: 14px; }
  .today-panel { padding: 22px; }
  .today-head { margin-bottom: 18px; }
  #recentOrders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #recentOrders > .empty-state { grid-column: 1 / -1; }
  .home-related-tasks { margin-top: 20px; }
  .financial-indicators { gap: 20px; }
  .financial-indicators article { padding: 22px; }
  .financial-indicators article strong { font-size: 28px; }
  .financial-charge-shortcut { max-width: 420px; }
  .financial-attention-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .catalog-card { min-height: 154px; padding: 22px; }
  .catalog-card strong { font-size: 19px; }
  .catalog-card small { font-size: 14px; }
  .catalog-note, .module-info { padding: 18px 22px; margin-bottom: 20px; }
  .module-info strong { font-size: 16px; }
  .module-info span, .catalog-note span { font-size: 14px; }
  #clientList, #serviceList, #productList, #stockList, #taskList, #orderList, #chargeList, #clientFullOrderList, #equipmentHistoryList, #clientEquipmentList, #userList, .pix-key-list, .owner-organization-list, .owner-request-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
  .empty-state, .load-more { grid-column: 1 / -1; }
  .client-create-row { max-width: 440px; margin-bottom: 18px; }
  .client-create-row > button { min-height: 46px; font-size: 15px; }
  .client-contract-card { min-height: 104px; padding: 18px; }
  .client-contract-main b { font-size: 17px; }
  .client-contract-main small { font-size: 14px; line-height: 1.5; }
  .client-contract-main > span, .client-contract-main em { font-size: 12px; }
  .client-contract-avatar { width: 44px; height: 44px; font-size: 22px; }
  .client-list-title { font-size: 14px; margin: 18px 0 12px; }
  .order-card { display: block; margin: 0; padding: 20px; }
  .order-open h3 { font-size: 18px; }
  .order-open p, .order-location, .order-meta { font-size: 14px; }
  .order-actions { gap: 10px; margin-top: 16px; }
  .status { font-size: 12px; padding: 6px 10px; }
  .charge-card { margin: 0; padding: 20px; }
  .finance-values strong { font-size: 20px; }
  .finance-values .total strong { font-size: 26px; }
  .charge-actions, .charge-actions.has-payment { gap: 10px; }
  .charge-actions button { min-height: 48px; font-size: 14px; }
  .product-stock-main { padding: 20px; }
  .product-stock-main h3 { font-size: 18px; }
  .product-stock-control { margin: 0 20px 20px; }
  .product-stock-control button { font-size: 14px; }
  .product-stock-control > p strong { font-size: 15px; }
  .task-summary { max-width: 700px; margin-bottom: 22px; }
  .task-contract-card { padding: 18px; margin: 0; }
  .task-card-main strong { font-size: 17px; }
  .task-card-main span, .task-card-main small { font-size: 14px; }
  .task-contract-done { min-height: 42px; font-size: 14px; }
  #view-agenda { padding-bottom: 0; }
  .desktop-agenda-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
  .desktop-agenda-calendar { position: sticky; top: 100px; }
  .desktop-agenda-content { min-width: 0; }
  .desktop-agenda-layout:has(#agendaCalendar.hidden) { grid-template-columns: 1fr; }
  .desktop-agenda-layout:has(#agendaCalendar.hidden) .desktop-agenda-calendar { position: static; max-width: 400px; }
  .agenda-view-tabs { height: 48px; margin-bottom: 16px; }
  .agenda-view-tabs button { font-size: 15px; }
  .agenda-calendar { margin: 0; padding: 18px; }
  .agenda-calendar header strong { font-size: 18px; }
  .agenda-calendar header button { width: 42px; height: 42px; }
  .agenda-weekdays span { font-size: 13px; }
  .agenda-days button { min-height: 52px; font-size: 18px; }
  .agenda-filters { margin-top: 0; }
  .agenda-day-title { gap: 10px; flex-wrap: wrap; }
  .agenda-day-title strong { font-size: 18px; }
  .agenda-day-title span { font-size: 14px; }
  .agenda-contract-card { padding: 20px; }
  .agenda-order-main > span > b { font-size: 18px; }
  .agenda-order-main small, .agenda-order-main em { font-size: 14px; }
  .agenda-contract-card > button { min-height: 46px; font-size: 15px; }
  .agenda-tasks { margin-top: 24px; }
  #view-agenda .agenda-tasks > p, #view-agenda .agenda-task-empty, #view-agenda .agenda-task-card small, #view-agenda .agenda-unscheduled small { font-size: 13px !important; }
  #view-agenda .agenda-unscheduled b, #view-agenda .agenda-task-card b { font-size: 15px; }
  #view-agenda .agenda-unscheduled > strong, #view-agenda .agenda-task-card button { font-size: 14px; }
  #view-agenda .agenda-fab { position: fixed; right: 28px; left: auto; bottom: 24px; width: 56px; height: 56px; transform: none; }
  .agenda-unscheduled { margin-right: 0; }
  .report-period { max-width: 760px; }
  .report-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .desktop-report-rankings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
  .desktop-report-rankings > article { min-width: 0; padding: 20px; border: 1px solid #dce5ef; border-radius: 16px; background: #fff; }
  .desktop-report-rankings .list-title { margin: 0 0 18px; font-size: 17px; }
  #view-settings { max-width: 1100px; }
  .settings-group { margin-bottom: 24px; }
  .settings-row { min-height: 72px; padding: 18px 22px; }
  .settings-row b, .settings-row strong { font-size: 16px; }
  .settings-row small { font-size: 14px; }
  .settings-group button { min-height: 72px; padding: 18px 22px; font-size: 15px; }
  .settings-group button small, .feature-switch-copy small { font-size: 13px; }
  .settings-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-client-detail, #view-equipment-detail, #view-equipment-history { max-width: 1100px; }
  #view-client-detail .client-detail-data { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px; gap: 16px; }
  #view-client-detail .client-detail-data span { font-size: 12px; }
  #view-client-detail .client-detail-data b { font-size: 16px; }
  .client-summary-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-summary-link small { font-size: 12px; }
  .client-summary-link strong { font-size: 18px; }
  #view-client-orders .contract-order-card, #view-equipment-history .contract-order-card { padding: 20px; }
  #view-client-orders .contract-order-card > strong, #view-equipment-history .contract-order-card > strong { font-size: 18px; }
  #view-client-orders .contract-order-card > p, #view-equipment-history .contract-order-card > p { font-size: 14px; }
  #view-client-orders .contract-order-card > button, #view-equipment-history .contract-order-card > button { font-size: 14px; }
  .module-item h3, .service-item h3, .user-item h3 { font-size: 17px; }
  .module-item p, .service-item p, .user-item p { font-size: 14px; }
  .pix-new-button { max-width: 400px; }
  .pix-key-form { padding: 26px; }
  #view-client-form, #view-new-order, #view-equipment-form, #view-pix-key-form, #view-select-order-equipment, #view-link-order-equipment { max-width: 880px; }
  .contract-form { padding: 26px; background: #fff; border: 1px solid #dce5ef; border-radius: 16px; }
  .contract-grid { gap: 20px; }
  .contract-actions { gap: 16px; }
  #view-order-detail { display: none; }
  #view-order-detail.active { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.7fr); gap: 16px 24px; align-items: start; }
  #view-order-detail > .module-head { grid-column: 1 / -1; margin-bottom: 4px; }
  #view-order-detail > .order-hero { grid-column: 1; grid-row: 2 / span 4; margin: 0; padding: 22px; }
  #view-order-detail > .order-items-title, #view-order-detail > .order-items-panel { grid-column: 2; margin: 0; }
  #view-order-detail > .order-total, #view-order-detail > .order-status-actions, #view-order-detail > .order-history-button { grid-column: 2; margin: 0; }
  .execution-customer b { font-size: 20px; }
  .execution-customer small, .execution-problem p { font-size: 14px; }
  .execution-timer { grid-template-columns: 1fr; }
  .execution-timer small { grid-column: 1; grid-row: 3; margin-top: 6px; font-size: 13px; }
  .execution-problem span, .order-mode { font-size: 12px; }
  .order-items-panel { padding: 20px; }
  .order-catalog-help { font-size: 13px; }
  .os-line-item { grid-template-columns: minmax(120px, 1fr) 100px minmax(90px, auto) 40px 40px; }
  .os-item-info { padding: 14px 10px; }
  .os-item-info h3 { font-size: 16px; }
  .os-item-info p, .os-item-total span { font-size: 13px; }
  .os-item-total strong { font-size: 16px; }
  .os-quantity-control { grid-template-columns: 30px minmax(30px, 1fr) 30px; }
  .os-quantity-control span { font-size: 15px; }
  .os-item-action { min-width: 40px; }
  .os-item-action svg { width: 20px; height: 20px; }
  .order-total strong { font-size: 28px; }
  .order-status-actions button { min-height: 46px; font-size: 14px; }
  #view-receipt { max-width: 960px; margin: 0 auto; }
  .receipt-actions { display: flex; gap: 16px; }
  .receipt-actions > button { flex: 1; }
  dialog { margin: auto; width: calc(100% - 64px); max-width: 640px; max-height: calc(100dvh - 64px); border-radius: 20px; }
  dialog.filter-sheet, dialog.send-note-dialog, dialog.pix-preview-dialog, dialog.owner-dialog, dialog.notification-dialog, dialog.order-history-dialog { margin: auto; width: calc(100% - 64px); max-width: 680px; border-radius: 20px; max-height: calc(100dvh - 64px); }
  dialog .dialog-card { padding: 28px; }
  dialog .dialog-head h2 { font-size: 24px; }
  dialog .dialog-head p { font-size: 14px; }
  dialog .dialog-actions { position: static; }
  .sheet-handle { display: none; }
  .toast { left: calc(50% + 120px); bottom: 28px; width: auto; max-width: 560px; }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar, .sidebar.open { width: 210px; padding: 20px 12px; }
  .desktop-brand img { width: 160px; }
  main { padding: 24px; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grid, .desktop-report-rankings { grid-template-columns: 1fr; }
  #chargeList { grid-template-columns: 1fr; }
  #view-order-detail.active { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.4fr); }
  .os-line-item { grid-template-columns: minmax(100px, 1fr) 78px minmax(80px, auto) 34px 34px; }
  .os-quantity-control { grid-template-columns: 23px minmax(24px, 1fr) 23px; }
  .os-item-action { min-width: 34px; }
  .os-item-info h3, .os-item-total strong { font-size: 14px; }
  .desktop-agenda-layout { gap: 18px; grid-template-columns: minmax(300px, .9fr) minmax(0, 1fr); }
  .agenda-order-main { grid-template-columns: 56px minmax(0, 1fr); }
  .agenda-order-main > .status { grid-column: 2; justify-self: start; }
}
