:root {
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --teal-dark: #0f766e;
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #d1e7e5;
  --danger: #e11d48;
  --phone-bg: #fff1f2;
  --phone-border: #fecdd3;
  --sidebar-width: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f8fafc;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(13, 148, 136, 0.18);
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.layout {
  display: flex;
  min-height: 100vh;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.875rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding: 0 0.5rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.brand-mark .icon-brand {
  width: 1.35rem;
  height: 1.35rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--sidebar-text-active);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--sidebar-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 0.1rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  padding: 0 0.25rem;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  padding: 0.25rem 0.75rem 0.6rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.85;
}

.nav-item.active .nav-icon-wrap {
  color: var(--teal-light);
  opacity: 1;
}

.nav-label {
  flex: 1;
  min-width: 0;
}

.badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
  line-height: 1.2;
}

.count-pill {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item.active .count-pill {
  background: rgba(13, 148, 136, 0.25);
  color: #99f6e4;
  border-color: rgba(13, 148, 136, 0.3);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.68rem;
  color: var(--teal-light);
  font-weight: 500;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--sidebar-text);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fca5a5;
}

.main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-select-wrap {
  display: flex;
  align-items: center;
}

.toolbar-select {
  min-width: 11rem;
  max-width: 16rem;
  padding: 0.48rem 2rem 0.48rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  appearance: none;
  font-size: 0.9rem;
  color: #0f172a;
  cursor: pointer;
}

.toolbar-select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: var(--accent, #0f766e);
}

.listings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  text-align: center;
}

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.filter-active-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
}

.segmented {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.segment {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.segment.active {
  background: var(--teal);
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { border-color: var(--teal); }

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.btn-primary:hover { background: var(--teal-dark); }

.btn-block { width: 100%; }

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

.btn-danger {
  color: var(--danger);
  border-color: #fecdd3;
}

.btn-phone {
  background: var(--phone-bg);
  border-color: var(--phone-border);
  color: #be123c;
}

.select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 0.88rem;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.alert-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
  position: relative;
}

.alert-card-new {
  animation: listing-card-enter 0.55s ease-out;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12), var(--shadow);
}

@keyframes listing-card-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.favorite-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.favorite-btn:hover {
  transform: scale(1.08);
  background: #fff;
}

.favorite-btn .icon-star {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.75;
  stroke-linejoin: round;
}

.favorite-btn.is-favorite .icon-star {
  fill: #f59e0b;
  stroke: #f59e0b;
}

.favorite-btn.is-favorite:hover .icon-star {
  fill: #d97706;
  stroke: #d97706;
}

.alert-image {
  width: 140px;
  min-width: 140px;
  height: 105px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.alert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.alert-body { flex: 1; min-width: 0; }

.listing-summary {
  margin: 0.45rem 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

.listing-summary-text {
  margin: 0;
  white-space: pre-line;
}

.listing-summary-loading {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}

.listing-summary-loading::after {
  content: "";
  display: inline-block;
  width: 0.9rem;
  animation: listing-summary-pulse 1.2s ease-in-out infinite;
}

@keyframes listing-summary-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.listing-summary-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.82rem;
}

.alert-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--teal-dark);
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
}

.alert-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag-visits {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e0f2fe;
  color: #0369a1;
}

.tag-visits .icon-eye {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.tag-buy { background: #fef3c7; color: #b45309; }

.alert-title {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-meta {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.alert-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.searches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.search-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.search-card-header h3 { margin: 0; font-size: 1rem; flex: 1; min-width: 0; }

.alert-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.toggle-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toggle-label-off {
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  left: 0.15rem;
  top: 0.15rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--teal);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(1.1rem);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-card.is-disabled {
  opacity: 0.72;
}

.search-card.is-disabled .search-card-header h3 {
  color: var(--muted);
}

.criteria-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.search-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.unread-label {
  margin-right: auto;
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-panel {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.settings-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.lang-switch { display: flex; gap: 0.5rem; }

.lang-btn {
  padding: 0.55rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 500;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.lang-btn:hover {
  border-color: #cbd5e1;
  background: #fafbfc;
}

.lang-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.api-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.api-list li { margin-bottom: 0.35rem; }

.api-list code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.info-section p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.channels-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.channels-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.channel-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.form-hint a {
  color: var(--teal-dark);
  font-weight: 500;
}

.channel-status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.channel-status-warn {
  color: #b45309;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-field .field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="url"],
.settings-form input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.settings-form input:hover {
  border-color: #cbd5e1;
}

.settings-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.settings-form input::placeholder {
  color: #94a3b8;
}

.setup-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.setup-steps li + li {
  margin-top: 0.35rem;
}

.telegram-start-command {
  display: block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  background: #f1f5f9;
  border-radius: 0.35rem;
  font-size: 0.9em;
  word-break: break-all;
}

.settings-form .field-hint {
  margin: -0.15rem 0 0;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  user-select: none;
}

.settings-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-toggle input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.save-status {
  font-size: 0.85rem;
  color: var(--teal-dark);
  font-weight: 500;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #fafbfc;
}

.form-section legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-dark);
  padding: 0 0.35rem;
}

.dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.dialog:not([open]) {
  display: none;
}

.dialog::backdrop { background: rgba(15, 23, 42, 0.4); }

.dialog-wide {
  max-width: 560px;
}

.dialog-brands {
  max-width: 720px;
}

.dialog-summary {
  width: min(96vw, 1280px);
  max-width: none;
  max-height: calc(100vh - 1.5rem);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.dialog-summary[open] {
  display: flex;
  flex-direction: column;
}

.dialog-summary-header {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.dialog-summary-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.summary-modal-body {
  overflow-y: auto;
  padding: 1.1rem;
  background: #f8fafc;
}

.summary-gallery {
  position: relative;
  margin: -1.1rem -1.1rem 1rem;
  background: #0f172a;
  user-select: none;
}

.summary-gallery.is-empty .summary-gallery-stage {
  background: #e2e8f0;
}

.summary-gallery-stage {
  position: relative;
  height: min(480px, 58vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.summary-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

.summary-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.summary-gallery-nav:hover {
  transform: translateY(-50%) scale(1.05);
  background: #fff;
}

.summary-gallery-nav svg {
  width: 1.35rem;
  height: 1.35rem;
}

.summary-gallery-prev { left: 0.85rem; }
.summary-gallery-next { right: 0.85rem; }

.summary-gallery-counter {
  position: absolute;
  right: 0.85rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.summary-intro {
  margin-bottom: 1rem;
}

.summary-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent, #0f766e);
  margin-bottom: 0.35rem;
}

.summary-headline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.summary-highlights {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.45;
}

.summary-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.summary-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.summary-columns-main {
  display: grid;
  gap: 0.75rem;
}

.summary-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.summary-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.summary-spec-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.summary-spec-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

.summary-description {
  margin: 0;
  white-space: pre-line;
  line-height: 1.55;
  color: #334155;
  font-size: 0.94rem;
}

.summary-equipment {
  margin-top: 0.85rem;
}

.summary-equipment-heading {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: #0f172a;
}

.summary-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.summary-equipment-group h4 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: #0f766e;
}

.summary-equipment-group ul {
  margin: 0;
  padding-left: 1rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.summary-equipment-group li::marker {
  color: #22c55e;
}

.summary-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f766e;
}

.summary-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.summary-loading-block {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-style: italic;
}

@media (max-width: 768px) {
  .summary-gallery-stage {
    height: min(280px, 42vh);
  }

  .summary-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-equipment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .summary-gallery-nav {
    width: 2.25rem;
    height: 2.25rem;
  }

  .summary-spec-grid {
    grid-template-columns: 1fr;
  }
}

.dialog-preview {
  width: min(96vw, 1200px);
  height: min(92vh, 900px);
  max-width: none;
  overflow: hidden;
}

.dialog-preview[open] {
  display: flex;
  flex-direction: column;
}

.dialog-preview-header {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.dialog-preview-header h2 {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.dialog-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dialog-preview-toolbar {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fafcfc;
}

.dialog-preview-toolbar .form-hint {
  margin: 0 0 0.5rem;
}

.dialog-preview-phone-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.listing-preview-phone-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.dialog-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--bg);
}

.listing-preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

.brand-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brand-picker-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-picker-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-search {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.brand-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.25rem;
}

.brand-picker-summary {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--teal-dark);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--teal);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.15rem 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafcfc;
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.15rem 0;
  line-height: 1.3;
}

.brand-option input {
  flex-shrink: 0;
  margin: 0;
}

.brand-option-name {
  flex: 1;
  min-width: 0;
}

.brand-option-count {
  color: var(--teal-dark);
  font-size: 0.82rem;
  white-space: nowrap;
}

.brand-option:has(input:checked) .brand-option-name {
  font-weight: 600;
  color: var(--teal-dark);
}

.brand-picker--combobox {
  gap: 0.45rem;
}

.brand-picker--combobox .brand-picker-label {
  margin: 0;
}

.brand-combobox-wrap {
  position: relative;
}

.brand-combobox-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-combobox-wrap.is-open .brand-combobox-control,
.brand-combobox-control:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.brand-combobox-tags {
  display: contents;
}

.brand-combobox-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.2;
}

.brand-combobox-tag-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-combobox-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.brand-combobox-tag-remove:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.brand-combobox-input {
  flex: 1 1 6rem;
  min-width: 5rem;
  padding: 0.2rem 0.15rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.brand-combobox-clear-all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.brand-combobox-clear-all svg {
  width: 1rem;
  height: 1rem;
}

.brand-combobox-clear-all:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.brand-combobox-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.brand-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.brand-combobox-option:last-child {
  border-bottom: none;
}

.brand-combobox-option:hover,
.brand-combobox-option:focus-visible {
  background: #eff6ff;
  outline: none;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.brand-combobox-option.is-selected {
  background: #eff6ff;
}

.brand-combobox-option.is-selected .brand-option-name {
  font-weight: 600;
  color: #1e40af;
}

.brand-picker--combobox .brand-option-count {
  flex-shrink: 0;
  min-width: 1.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted, #64748b);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.brand-combobox-option.is-selected .brand-option-count {
  background: #dbeafe;
  color: #1d4ed8;
}

@media (max-width: 700px) {
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dialog form {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.dialog h2 { margin: 0; font-size: 1.1rem; }

.dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.dialog-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.dialog-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

.channel-option {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.channel-option:hover {
  border-color: #cbd5e1;
}

.dialog label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.dialog input[type="text"],
.dialog input[type="number"] {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  font-weight: 400 !important;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--bg) 50%, #ecfeff 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(15, 118, 110, 0.1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.login-brand .brand-name {
  color: var(--text);
}

.login-brand .brand-sub {
  color: var(--muted);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.login-subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.login-form input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.login-lang {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.lang-link { color: var(--muted); }
.lang-link.active { color: var(--teal-dark); font-weight: 600; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 1000;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text-active);
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.flash-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.admin-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.users-table-wrap { overflow-x: auto; }

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.users-table th,
.users-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.muted-cell { color: var(--muted); font-size: 0.82rem; }

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--muted);
}

.role-admin {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.status-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.status-on { color: var(--teal-dark); }
.status-off { color: var(--muted); }

.presence-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.presence-label::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-online { color: var(--teal-dark); }
.presence-online::before { background: #22c55e; }

.presence-offline { color: var(--muted); }
.presence-offline::before { background: #94a3b8; }

.tag-you {
  background: #e0f2fe;
  color: #0369a1;
  margin-left: 0.35rem;
}

.user-row-expired {
  background: #fff1f2;
}

.user-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.user-actions-cell form {
  margin: 0;
}

.password-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.password-field-row input {
  flex: 1;
}

.dialog label .form-hint {
  margin-top: 0.25rem;
}

.form-hint-inline {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.duration-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duration-field .field-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.duration-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.duration-option {
  position: relative;
  cursor: pointer;
}

.duration-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.duration-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.duration-option:hover span {
  border-color: #cbd5e1;
  background: #fff;
}

.duration-option input:checked + span {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal);
}

.duration-option input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-form select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--card);
}

.mobile-header {
  display: none;
}

/* ── Tablet: stack sidebar above content ── */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .alert-card { flex-direction: column; }
  .alert-image {
    width: 100%;
    min-width: 0;
    height: 180px;
  }
  .main { padding: 1.25rem 1.25rem; }
  .page-header h1 { font-size: 1.45rem; }
}

/* ── Smartphone: bottom nav + compact layout ── */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 0.65rem 1rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
  }

  .mobile-brand .brand-name {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-brand .brand-mark {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
  }

  .mobile-brand .brand-mark .icon-brand {
    width: 1.1rem;
    height: 1.1rem;
  }

  .mobile-user {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .mobile-user .user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.72rem;
  }

  .layout {
    flex-direction: column;
    min-height: calc(100vh - 3.25rem);
    padding-bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    z-index: 100;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--sidebar-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .sidebar .brand,
  .sidebar .nav-section,
  .sidebar .sidebar-footer {
    display: none;
  }

  .nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 0.35rem 0.25rem 0.45rem;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.15rem;
    font-size: 0.62rem;
    border-radius: 8px;
    min-width: 0;
    min-height: 2.75rem;
  }

  .nav-item.active::before {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    border-radius: 0 0 3px 3px;
  }

  .nav-icon-wrap {
    width: 1.5rem;
    height: 1.5rem;
  }

  .nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.15;
  }

  .count-pill,
  .nav-item .badge {
    position: absolute;
    top: 0.1rem;
    right: 0.15rem;
    margin-left: 0;
    font-size: 0.55rem;
    padding: 0.05rem 0.35rem;
    min-width: 0.95rem;
  }

  .nav-item {
    position: relative;
  }

  .main {
    flex: 1;
    padding: 1rem;
    padding-bottom: 0.5rem;
    overflow-x: hidden;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar .btn,
  .page-header > .btn {
    flex: 1;
    min-width: 0;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
  }

  .alert-card {
    flex-direction: column;
    padding: 0.75rem;
  }

  .alert-image {
    width: 100%;
    min-width: 0;
    height: 160px;
  }

  .favorite-btn {
    top: 0.5rem;
    right: 0.5rem;
  }

  .price {
    font-size: 1.2rem;
  }

  .alert-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .search-card-header {
    flex-wrap: wrap;
  }

  .search-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-card-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .searches-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .duration-picker {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dialog-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .password-field-row {
    flex-direction: column;
  }

  .password-field-row .btn {
    width: 100%;
    justify-content: center;
  }

  .dialog-preview-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .dialog-preview-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dialog-preview-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .dialog-preview-phone-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(0.5rem);
    white-space: normal;
    text-align: center;
    max-width: calc(100% - 2rem);
  }

  .toast.is-visible {
    transform: translateX(0) translateY(0);
  }

  .login-page {
    padding: 1rem;
    align-items: flex-start;
    padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
  }

  .login-card {
    padding: 1.5rem;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}
