@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f1ea;
  --ink: #1b1b1f;
  --muted: #5c606b;
  --accent: #ff7a59;
  --accent-2: #1f7a8c;
  --accent-3: #f6c453;
  --panel: #fffdfb;
  --panel-solid: #ffffff;
  --panel-soft: #fbf7f1;
  --border: rgba(86, 93, 108, 0.16);
  --shadow: 0 24px 60px rgba(28, 32, 45, 0.16);
  --shadow-soft: 0 16px 34px rgba(28, 32, 45, 0.1);
  --radius: 24px;
  --radius-sm: 18px;
  --danger: #b42318;
  --success: #047857;
  --warning: #b45309;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Public Sans', sans-serif;
  background: linear-gradient(140deg, #f5efe6 0%, #f8f4ef 35%, #eef4f5 100%);
}

body.modal-open {
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: url('background.jpg') center / cover no-repeat fixed;
}

.bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 27, 31, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 27, 31, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.34;
}

.orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  opacity: 0.28;
  animation: float 18s ease-in-out infinite;
}

.orb-a {
  background: radial-gradient(circle, rgba(255, 122, 89, 0.75), transparent 60%);
  top: -120px;
  right: -80px;
}

.orb-b {
  background: radial-gradient(circle, rgba(31, 122, 140, 0.68), transparent 60%);
  bottom: -140px;
  left: -120px;
  animation-delay: 3s;
}

.orb-c {
  background: radial-gradient(circle, rgba(246, 196, 83, 0.68), transparent 60%);
  top: 45%;
  left: 55%;
  animation-delay: 6s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(18px, -20px) scale(1.05);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 4px;
  max-width: 1760px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  flex: 1 1 420px;
}

.logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
}

.tag {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

h1 {
  font-size: 44px;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  max-width: 600px;
}

.userbox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 22px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  min-width: 230px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.user-greeting {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.user-name {
  font-weight: 700;
  font-size: 16px;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shell {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  background: #f2eee7;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 122, 140, 0.18);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff9b72);
  color: #fff;
}

.btn.ghost {
  background: #fffdfa;
  border: 1px solid var(--border);
}

.btn-small {
  padding: 9px 16px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eaf4f6;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-card,
.section-card,
.hero,
.panel-card,
.tickets-card,
.userbox,
.floating-menu,
.modal-card {
  animation: lift 0.6s ease both;
}

.login-card {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.login-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.login-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.highlight {
  padding: 18px;
  border-radius: 18px;
  background: #f7f4ee;
  border: 1px dashed rgba(27, 27, 31, 0.15);
  display: grid;
  gap: 8px;
}

.highlight p {
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input[type='text'],
input[type='password'],
input[type='search'],
input[type='date'],
input[type='time'],
input[type='number'],
input[type='email'],
input[type='url'],
input[type='tel'],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #fffdfa;
  color: var(--ink);
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 7.25L9 11.75L13.5 7.25' stroke='%231b1b1f' stroke-opacity='0.72' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  background-size: 16px 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 122, 140, 0.28);
  border-color: rgba(31, 122, 140, 0.42);
}

.error {
  color: var(--danger);
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.app-shell {
  display: none;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}


.mobile-menu-profile,
.menu-item-mobile-only {
  display: none;
}

.mobile-menu-profile {
  align-items: center;
  gap: 12px;
}

.mobile-menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-menu-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.mobile-menu-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mobile-menu-copy strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  line-height: 1;
}

.mobile-menu-user {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mobile-menu-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-install-btn,
.mobile-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: #fffdfa;
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
}

.mobile-install-btn svg,
.mobile-logout-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item-mobile-only {
  text-decoration: none;
}

.floating-menu {
  position: sticky;
  top: 18px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(180deg, #18202a, #253241);
  box-shadow: 0 28px 54px rgba(16, 20, 30, 0.26);
  backdrop-filter: blur(14px);
  color: #f7f7f8;
}

.menu-head {
  display: grid;
  gap: 4px;
  padding: 6px 6px 18px;
}

.menu-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.76);
}

.menu-list {
  display: grid;
  gap: 10px;
}

.menu-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: #22303a;
  color: inherit;
  text-align: left;
  border: 1px solid #31414d;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.menu-item:hover {
  transform: translateX(2px);
  background: #2b3944;
}

.menu-item.is-active {
  background: linear-gradient(135deg, #5c3b35, #294b56);
  border-color: rgba(255, 255, 255, 0.18);
}

.menu-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #31414d;
  color: #f7f7f8;
}

.menu-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item.is-active .menu-icon {
  background: rgba(255, 255, 255, 0.12);
}

.menu-copy {
  display: grid;
  gap: 3px;
}

.menu-copy strong {
  font-size: 15px;
}

.menu-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.workspace {
  display: grid;
}

.view-panel {
  display: none;
  gap: 18px;
}

.view-panel.is-active {
  display: grid;
}

.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: #fffdfb;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.view-heading p {
  margin-top: 8px;
  color: #4f5562;
  max-width: 720px;
  line-height: 1.6;
}

.view-heading-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.split-actions {
  align-items: center;
}

.section-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: center;
}

.home-copy {
  display: grid;
  gap: 14px;
}

.home-copy p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-chip {
  padding: 18px 16px;
  border-radius: 18px;
  background: #fffaf4;
  border: 1px solid rgba(255, 122, 89, 0.16);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.summary-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  animation: rise 0.6s ease both;
}

.summary-card:nth-child(2) {
  animation-delay: 0.04s;
}

.summary-card:nth-child(3) {
  animation-delay: 0.08s;
}

.summary-card:nth-child(4) {
  animation-delay: 0.12s;
}

.summary-card.dark {
  background: #1c2127;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.summary-card.emphasis {
  background: linear-gradient(135deg, #ffe3db, #fff6f1);
}

.summary-card.cool {
  background: linear-gradient(135deg, #dff1f4, #f6fbfc);
}

.summary-card.warm {
  background: linear-gradient(135deg, #fff0c8, #fff9ea);
}

.summary-card.summary-link {
  cursor: pointer;
}

.summary-card h4 {
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.summary-card .value {
  font-size: 30px;
  font-weight: 700;
}

.panel-grid,
.home-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.panel-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel-card h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.panel-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-headline p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f4ee;
  border: 1px solid rgba(27, 27, 31, 0.08);
  display: grid;
  gap: 6px;
}

.mini-item strong {
  font-size: 14px;
}

.mini-item span {
  color: var(--muted);
  font-size: 13px;
}

.micro-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.portal-filters + .micro-stats {
  margin-top: 16px;
}

.stat-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef6f8;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}


.stat-pill-toggle {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stat-pill-toggle:hover,
.stat-pill-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 122, 140, 0.14);
  outline: none;
}


.section-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-toolbar input[type='search'] {
  flex: 1 1 auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.dashboard {
  display: grid;
  gap: 18px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}

.hero-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
}

.hero-filters label {
  min-width: 150px;
}

.filters label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.bars,
.trend {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

#byArea .bar-row,
#byAreaClosed .bar-row {
  grid-template-columns: var(--bar-label-width, 240px) 1fr 70px;
}

.bar-row > div:first-child,
.trend-row > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row > div:last-child,
.trend-row > div:last-child {
  text-align: right;
}

.bar,
.trend .bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.trend-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.tickets-card {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0 0 16px;
  overflow: hidden;
}

.tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 16px;
  gap: 20px;
}

.tickets-header h2 {
  font-size: 30px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#searchInput {
  width: 320px;
  min-width: 320px;
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--border);
}

.drawer-table-wrap,
.modal-table-wrap {
  border-top: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  text-align: left;
  background: #f2efe9;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: #f2f8f9;
}


#ticketsBody tr {
  cursor: default;
}

#ticketsBody tr:hover {
  background: transparent;
}

#ticketsBody tr.prio-row:hover {
  background: var(--prio-bg, transparent);
}
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf4f6;
  color: #14505d;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.table-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 122, 140, 0.16);
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-open {
  background: #e8f6f0;
  color: var(--success);
}

.status-closed {
  background: #fbefe2;
  color: var(--warning);
}

.status-neutral {
  background: #eef0f3;
  color: var(--muted);
}
.status-success {
  background: #e8f6f0;
  color: #1f7a4c;
}

.status-danger {
  background: #fbe8e6;
  color: #b44737;
}

.ticket-id-link {
  border: none;
  background: #eaf4f6;
  color: #14505d;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ticket-id-link:hover {
  transform: translateY(-1px) scale(1.04);
  background: #d6e9ee;
  box-shadow: 0 6px 14px rgba(31, 122, 140, 0.25);
}

.prio-row {
  background: var(--prio-bg, transparent);
  box-shadow: inset 4px 0 var(--prio-color, transparent);
}

.prio-row td {
  background: transparent;
}

.pending-row {
  animation: pendingPulse 1.2s ease-in-out infinite;
}

@keyframes pendingPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(255, 122, 89, 0);
  }

  50% {
    box-shadow: inset 0 0 0 999px rgba(255, 122, 89, 0.3);
  }
}

.tickets-pagination {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px 0;
}

.pagination-btn {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.pagination-info {
  min-width: 86px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 25, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.offers-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(760px, 100vw);
  height: 100vh;
  padding: 28px 24px 22px;
  background: #ffffff;
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease, visibility 0s linear 0.24s;
  z-index: 90;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
}

.offers-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.24s ease, opacity 0.24s ease, visibility 0s linear 0s;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-header p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 16, 24, 0.55);
  backdrop-filter: blur(6px);
  z-index: 110;
}

.modal-overlay.is-open {
  display: flex;
}


#clientPickerModal {
  z-index: 115;
}
.modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(1100px, 100%);
}

.modal-narrow {
  width: min(560px, 100%);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-body {
  overflow: auto;
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.client-form-grid {
  align-content: start;
}

.form-section-title {
  margin: 6px 0 -2px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.client-modal-card {
  width: min(1180px, 100%);
}

.client-modal-footer {
  flex-wrap: wrap;
}

#clientFormPanel.is-readonly input,
#clientFormPanel.is-readonly textarea,
#clientFormPanel.is-readonly select {
  background: #f8f5ef;
  border-color: rgba(39, 51, 70, 0.12);
  color: var(--ink);
  box-shadow: none;
}

#clientFormPanel.is-readonly textarea {
  resize: none;
}

#clientFormPanel input[type='email'],
#clientFormPanel input[type='url'],
#clientFormPanel input[type='tel'] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
  border-radius: 16px;
}

#clientFormPanel label {
  color: #243041;
}

#clientsBody tr.client-row {
  cursor: pointer;
}

#clientsBody tr.client-row td:last-child,
#clientsBody tr.client-row td:last-child * {
  cursor: default;
}

#clientOpenOffersBtn:not(:disabled) {
  cursor: pointer;
}

#clientOpenOffersBtn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 122, 140, 0.18);
}

#clientOpenOffersBtn:disabled {
  cursor: not-allowed;
}
#clientsBody td:last-child .client-offers-action,
#clientsBody td:last-child .client-offers-action:hover,
#clientsBody td:last-child .client-offers-action * {
  cursor: pointer !important;
}

.picker-preview,
.selection-note,
.note-box {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f7f4ee;
  color: var(--ink);
  line-height: 1.6;
}

.selection-note {
  color: var(--muted);
}

.note-box {
  white-space: pre-wrap;
}

.picker-btn {
  margin-top: 10px;
  justify-self: start;
}

.monitor-content-modal {
  width: min(1280px, calc(100vw - 36px));
  max-width: min(1280px, calc(100vw - 36px));
}

.monitor-content-body {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 20px;
}

#monitorContentModal .monitor-library-panel {
  min-width: 0;
}

#monitorContentModal .modal-table-wrap {
  overflow-x: hidden;
}

#monitorContentModal .modal-table-wrap table {
  min-width: 0;
}

.monitor-upload-panel,
.monitor-library-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.monitor-upload-panel {
  padding-right: 6px;
}

.monitor-note-block {
  line-height: 1.6;
}

.monitor-upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sr-only-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-picker-card,
.upload-progress-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(179, 163, 144, 0.42);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(247, 242, 232, 0.96));
  box-shadow: 0 14px 28px rgba(78, 58, 36, 0.08);
}

.upload-picker-card {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
}

.upload-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(27, 63, 92, 0.2);
  background: linear-gradient(135deg, #23445f, #315f81);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(35, 68, 95, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.upload-picker-btn:hover,
.upload-picker-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(35, 68, 95, 0.26);
  filter: saturate(1.06);
}

.upload-picker-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-picker-meta strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

.upload-picker-meta span {
  color: var(--muted);
  font-size: 13px;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-head strong {
  color: var(--ink);
  font-size: 15px;
}

.upload-progress-head span {
  color: #23445f;
  font-size: 14px;
  font-weight: 700;
}

.upload-progress-track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(35, 68, 95, 0.12);
}

#monitorUploadProgressFill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c6902a, #f2bc4d 55%, #ffd679);
  box-shadow: 0 4px 10px rgba(198, 144, 42, 0.24);
  transition: width 0.22s ease;
}

.upload-progress-card .selection-note {
  margin: 0;
}

.monitor-panel-headline {
  margin-bottom: 0;
}

#monitorContentModal .modal-table-wrap table {
  table-layout: fixed;
}

#monitorContentModal .modal-table-wrap th:nth-child(1),
#monitorContentModal .modal-table-wrap td:nth-child(1) {
  width: 34%;
}

#monitorContentModal .modal-table-wrap th:nth-child(2),
#monitorContentModal .modal-table-wrap td:nth-child(2) {
  width: 13%;
}

#monitorContentModal .modal-table-wrap th:nth-child(3),
#monitorContentModal .modal-table-wrap td:nth-child(3) {
  width: 7%;
}

#monitorContentModal .modal-table-wrap th:nth-child(4),
#monitorContentModal .modal-table-wrap td:nth-child(4) {
  width: 14%;
}

#monitorContentModal .modal-table-wrap th:nth-child(5),
#monitorContentModal .modal-table-wrap td:nth-child(5) {
  width: 8%;
}

#monitorContentModal .modal-table-wrap th:nth-child(6),
#monitorContentModal .modal-table-wrap td:nth-child(6) {
  width: 24%;
}

.monitor-actions-inline {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

#monitorContentModal .monitor-actions-inline .table-action.icon-action {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
}

#monitorContentModal .monitor-actions-inline .table-action.icon-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#monitorContentModal .monitor-actions-inline .table-action.icon-action.danger-action {
  background: #f8ece9;
  color: #8a2f25;
}

#monitorContentModal .monitor-actions-inline .table-action.icon-action.danger-action:hover {
  box-shadow: 0 10px 20px rgba(138, 47, 37, 0.16);
}

#monitorUploadStatus[data-status='error'] {
  color: var(--danger);
}

#monitorUploadStatus[data-status='success'] {
  color: var(--success);
}

#monitorUploadStatus[data-status='info'] {
  color: var(--muted);
}
.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 12px;
  z-index: 130;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.24);
}

.toast.success {
  background: linear-gradient(135deg, #0f9f72, #047857);
}

.toast.error {
  background: linear-gradient(135deg, #d64545, #b42318);
}

.toast.info {
  background: linear-gradient(135deg, #2a7f91, #1f7a8c);
}

.copy-menu {
  position: fixed;
  z-index: 120;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  display: none;
}

.copy-menu button {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}

.copy-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.token-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 24, 0.55);
  backdrop-filter: blur(6px);
  z-index: 140;
}

.token-overlay.active {
  display: flex;
}

.token-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  color: #14171d;
  padding: 18px 22px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.token-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.token-card span {
  font-size: 12px;
  color: #5f6571;
}

.token-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(31, 122, 140, 0.2);
  border-top-color: #1f7a8c;
  animation: spin 0.8s linear infinite;
}

.page-version {
  margin: 22px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

body.realtime .summary-card,
body.realtime .panel-card,
body.realtime .tickets-card,
body.realtime .hero,
body.realtime .login-card,
body.realtime .section-card,
body.realtime .floating-menu {
  animation: none !important;
}

.floating-menu {
  animation: none !important;
}

@keyframes lift {
  from {
    transform: translateY(14px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rise {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .floating-menu {
    position: sticky;
    top: 18px;
    z-index: 30;
    padding: 14px;
    border-radius: 24px;
  }

  .menu-head {
    padding: 2px 4px 12px;
  }

  .menu-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .menu-list::-webkit-scrollbar {
    display: none;
  }

  .menu-item {
    min-width: 180px;
  }
}

@media (max-width: 980px) {
  .masthead {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .brand {
    gap: 14px;
    flex: 0 1 auto;
  }

  .userbox {
    align-items: stretch;
    min-width: 0;
  }

  .user-meta,
  .user-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .login-card,
  .login-highlights {
    grid-template-columns: 1fr;
  }

  .view-heading,
  .panel-headline,
  .tickets-header,
  .modal-header,
  .modal-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-heading-actions,
  .split-actions,
  .user-actions {
    width: 100%;
  }

  .view-heading-actions .btn,
  .split-actions .btn,
  .user-actions .btn {
    width: 100%;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    min-height: 100dvh;
    background: linear-gradient(180deg, #f3e4c4 0%, #ecd3a3 32%, #e8c894 58%, #dfba84 100%);
  }

  body {
    min-height: 100dvh;
    background: transparent;
  }

  .bg {
    display: block;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 100dvh;
    background-image: url('backgroundMobile.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  .masthead {
    display: none;
  }

  .app-shell {
    width: 100%;
    margin-top: 0;
  }

  .shell {
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px calc(44px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
  }

  .login-card {
    margin: auto 0;
  }

  h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .subtitle {
    max-width: none;
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.25;
  }

  .mobile-menu-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid rgba(86, 93, 108, 0.14);
    margin-bottom: 10px;
  }

  .mobile-menu-user {
    grid-column: 1 / 2;
  }

  .mobile-menu-actions {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .menu-head {
    display: none;
  }

  .floating-menu {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(179, 149, 111, 0.22);
    background: linear-gradient(180deg, rgba(255, 248, 239, 0.74), rgba(247, 239, 228, 0.66));
    box-shadow: 0 18px 34px rgba(74, 56, 39, 0.12);
    backdrop-filter: blur(18px);
    color: var(--ink);
  }

  .mobile-menu-profile {
    border-bottom: 1px solid rgba(179, 149, 111, 0.18);
  }

  .mobile-menu-copy .tag,
  .mobile-menu-user .user-greeting,
  .menu-kicker {
    color: rgba(92, 96, 107, 0.9);
  }

  .mobile-menu-copy strong,
  .mobile-menu-user .user-name,
  .menu-head strong {
    color: #1f2731;
  }

  .mobile-install-btn,
  .mobile-logout-btn {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(179, 149, 111, 0.18);
    color: #22303a;
    box-shadow: 0 8px 16px rgba(74, 56, 39, 0.08);
  }

  .menu-list {
    grid-auto-columns: 78%;
    gap: 8px;
    margin: 0 -2px;
    padding: 3px 2px 2px;
    scroll-snap-type: x proximity;
  }

  .menu-item,
  .menu-item-mobile-only {
    min-width: 0;
    width: 100%;
    padding: 10px;
    gap: 10px;
    border-radius: 16px;
    scroll-snap-align: start;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 242, 233, 0.68));
    border: 1px solid rgba(179, 149, 111, 0.14);
    color: #243041;
    box-shadow: 0 10px 22px rgba(74, 56, 39, 0.06);
  }

  .menu-item-mobile-only {
    display: grid !important;
  }

  .menu-item:hover,
  .menu-item-mobile-only:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 244, 235, 0.8));
    border-color: rgba(179, 149, 111, 0.24);
  }

  .menu-item.is-active {
    background: linear-gradient(135deg, rgba(238, 211, 190, 0.78), rgba(219, 233, 230, 0.72));
    border-color: rgba(31, 122, 140, 0.2);
    color: #1d2c36;
  }

  .menu-item.is-active .menu-icon {
    background: linear-gradient(135deg, rgba(255, 239, 224, 0.82), rgba(237, 247, 247, 0.78));
    color: #1f7a8c;
    border-color: rgba(31, 122, 140, 0.16);
  }

  .menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(248, 234, 219, 0.7), rgba(237, 244, 245, 0.66));
    color: #35515c;
    border: 1px solid rgba(179, 149, 111, 0.18);
  }

  .menu-icon svg {
    width: 20px;
    height: 20px;
  }

  .menu-copy strong {
    font-size: 14px;
  }

  .menu-copy small {
    font-size: 12px;
    color: rgba(92, 96, 107, 0.92);
  }

  .section-card,
  .login-card,
  .hero,
  .panel-card,
  .tickets-card,
  .modal-card {
    padding: 16px;
    border-radius: 20px;
  }

  .summary-grid,
  .panel-grid,
  .home-preview-grid,
  .form-grid,
  .login-highlights,
  .home-actions-grid {
    grid-template-columns: 1fr;
  }

  .view-panel {
    gap: 14px;
  }

  .view-heading {
    gap: 12px;
  }

  .section-toolbar,
  .actions,
  .tickets-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-toolbar .btn,
  .actions .btn,
  .panel-headline .btn,
  .tickets-header .btn,
  .view-heading-actions .btn,
  .view-heading-actions a,
  .split-actions .btn {
    width: 100%;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #searchInput {
    width: 100%;
    min-width: 0;
  }

  .summary-card .value {
    font-size: 26px;
  }

  .tickets-card,
  .section-card,
  .panel-card,
  .compact-panel {
    overflow: hidden;
  }

  .bar-row,
  .trend-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  #byArea .bar-row,
  #byAreaClosed .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row > div:first-child,
  .trend-row > div:first-child {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    line-height: 1.35;
  }

  .bar-row > div:last-child,
  .trend-row > div:last-child {
    text-align: left;
    font-weight: 700;
  }

  .bars,
  .trend {
    gap: 12px;
  }

  #ticketsCard .table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
    border-top: none;
  }

  #ticketsCard table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  #ticketsCard thead {
    display: none;
  }

  #ticketsBody {
    display: grid;
    gap: 10px;
  }

  #ticketsBody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fffdfa;
    padding: 10px 12px;
    box-shadow: var(--shadow-soft);
  }

  #ticketsBody tr.prio-row {
    box-shadow: inset 4px 0 var(--prio-color, transparent), var(--shadow-soft);
  }

  #ticketsBody td {
    display: grid;
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
  }

  #ticketsBody td:last-child {
    border-bottom: none;
  }

  #ticketsBody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  #ticketsBody .empty-row {
    display: block;
    border-bottom: none;
    text-align: center;
    padding: 6px 0;
  }

  #ticketsBody .empty-row::before {
    content: none;
  }

  #ticketsBody .ticket-id-link {
    justify-self: start;
  }

  #clientiView .table-wrap,
  #richiesteView .table-wrap,
  .drawer-table-wrap,
  #offerAttachmentsModal .table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
    border-top: none;
  }

  #clientiView table,
  #richiesteView table,
  .drawer-table-wrap table,
  #offerAttachmentsModal table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  #clientiView thead,
  #richiesteView thead,
  .drawer-table-wrap thead,
  #offerAttachmentsModal thead {
    display: none;
  }

  #clientsBody,
  #requestsBody,
  #offersBody,
  #offerAttachmentsBody {
    display: grid;
    gap: 10px;
  }

  #clientsBody tr,
  #requestsBody tr,
  #offersBody tr,
  #offerAttachmentsBody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fffdfa;
    padding: 10px 12px;
    box-shadow: var(--shadow-soft);
  }

  #clientsBody td,
  #requestsBody td,
  #offersBody td,
  #offerAttachmentsBody td {
    display: grid;
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
  }

  #clientsBody td:last-child,
  #requestsBody td:last-child,
  #offersBody td:last-child,
  #offerAttachmentsBody td:last-child {
    border-bottom: none;
  }

  #clientsBody td::before,
  #requestsBody td::before,
  #offersBody td::before,
  #offerAttachmentsBody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  #clientsBody .empty-row,
  #requestsBody .empty-row,
  #offersBody .empty-row,
  #offerAttachmentsBody .empty-row {
    display: block;
    border-bottom: none;
    text-align: center;
    padding: 6px 0;
  }

  #clientsBody .empty-row::before,
  #requestsBody .empty-row::before,
  #offersBody .empty-row::before,
  #offerAttachmentsBody .empty-row::before {
    content: none;
  }

  #clientsBody .table-action,
  #requestsBody .table-action,
  #offersBody .table-action,
  #offerAttachmentsBody .table-action {
    justify-self: start;
  }

  #clientsBody tr.client-row {
    cursor: pointer;
  }

  #clientsBody td:last-child,
  #clientsBody td:last-child * {
    cursor: default;
  }

  #clientsBody td:last-child .client-offers-action,
  #clientsBody td:last-child .client-offers-action:hover,
  #clientsBody td:last-child .client-offers-action * {
    cursor: pointer !important;
  }

  .table-wrap {
    margin: 0 -4px;
    padding: 0 4px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px;
  }

  .drawer-table-wrap table,
  .modal-table-wrap table {
    min-width: 640px;
  }

  .drawer-table-wrap table,
  #offerAttachmentsModal .modal-table-wrap table {
    min-width: 0;
  }

  .offers-drawer {
    width: 100vw;
    padding: 18px 14px 14px;
    gap: 14px;
  }

  .drawer-header {
    gap: 12px;
  }

  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .monitor-content-body {
    grid-template-columns: 1fr;
  }
  .modal-card,
  .modal-wide,
  .modal-narrow {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .modal-body {
    gap: 14px;
  }

  .picker-preview,
  .selection-note,
  .note-box,
  .mini-item {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .pagination-info {
    font-size: 12px;
    min-width: 0;
  }


.toast-stack {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .copy-menu {
    right: 14px;
    left: auto;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .floating-menu {
    border-radius: 18px;
  }

  .menu-list {
    grid-auto-columns: 86%;
  }

  .summary-grid {
    gap: 12px;
  }

  .summary-card,
  .panel-card,
  .section-card,
  .tickets-card {
    border-radius: 18px;
  }

  .summary-card .value {
    font-size: 24px;
  }

  .page-version {
    margin-top: 18px;
    font-size: 11px;
  }
}















