/* ===== CSS Variables (Design System - calm professional) ===== */
:root {
  --primary: #1E40AF;
  --primary-light: #3B82F6;
  --primary-dark: #1E3A8A;
  --secondary: #64748B;
  --cta: #10B981;
  --cta-hover: #059669;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --error: #EF4444;

  --font-sans: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ===== Auth Screen ===== */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
}

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

.btn-cta {
  background: var(--cta);
  color: white;
}

.btn-cta:hover {
  background: var(--cta-hover);
}

/* Плавающая кнопка добавления */
.btn-cta.floating {
  position: fixed;
  top: 120px;
  right: 24px;
  z-index: 98;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--background);
}

/* CAPTCHA */
.captcha-group {
  margin-bottom: 1rem;
}

.captcha-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.captcha-label strong {
  color: var(--primary);
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
}

.captcha-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.captcha-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.captcha-refresh {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.captcha-refresh:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.auth-lockout {
  background: #FEF2F2;
  color: var(--error);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-error {
  background: #FEF2F2;
  color: var(--error);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

/* ===== Dashboard ===== */
#dashboard {
  display: none;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

.header-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: none;
}

@media (min-width: 640px) {
  .header-status {
    display: block;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: none;
}

@media (min-width: 768px) {
  .user-info {
    display: block;
  }
}

.btn-icon {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--background);
  color: var(--text);
}

/* Navigation Tabs */
.nav-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  overflow-x: auto;
  position: sticky;
  top: 57px;
  z-index: 99;
}

.nav-tabs-container {
  display: flex;
  gap: 0.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--background);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.tab-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

/* Coming Soon Placeholder */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  padding: 2rem;
}

.coming-soon-icon {
  width: 80px;
  height: 80px;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.coming-soon h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.coming-soon p {
  color: var(--text-muted);
  max-width: 400px;
}

/* Main Content */
.main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.stat-card.primary {
  background: var(--primary);
  color: white;
}

.stat-card.primary .stat-label {
  color: rgba(255,255,255,0.8);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-card.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.stat-card.clickable.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: white;
}

.stat-card.clickable.active .stat-label {
  color: rgba(255,255,255,0.85);
}

/* Filters */
.filters {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filters-grid .filter-group {
  flex: 1;
  min-width: 120px;
}

@media (max-width: 1024px) {
  .filters-grid .filter-group {
    min-width: calc(33% - 0.75rem);
  }
}

@media (max-width: 640px) {
  .filters-grid .filter-group {
    min-width: calc(50% - 0.75rem);
  }
}

.btn-reset {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: all 0.2s;
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-reset:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.875rem;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Content Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Map */
.map-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 400px;
}

@media (min-width: 1024px) {
  .map-container {
    height: 500px;
  }
}

#map {
  width: 100%;
  height: 100%;
}

.map-legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  font-size: 0.75rem;
  z-index: 1000;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.free { background: var(--success); }
.legend-dot.paid { background: var(--error); }
.legend-dot.percent { background: #F59E0B; }

/* Table */
.table-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.table-title {
  font-weight: 600;
  font-size: 1rem;
}

.table-scroll {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .table-scroll {
    max-height: 440px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  position: sticky;
  top: 0;
  background: var(--background);
  z-index: 5;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:hover {
  background: var(--background);
  cursor: pointer;
}

.cell-jk {
  font-weight: 500;
  color: var(--primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-chat {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-messenger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.cell-messenger.telegram {
  background: #EFF6FF;
  color: #0284C7;
}

.cell-messenger.vk {
  background: #EDE9FE;
  color: #7C3AED;
}

.cell-members {
  font-family: var(--font-mono);
  font-weight: 500;
}

.cell-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.cell-type.free {
  background: #D1FAE5;
  color: #059669;
}

.cell-type.paid {
  background: #FEE2E2;
  color: #DC2626;
}

.cell-type.percent {
  background: #FEF3C7;
  color: #D97706;
}

.cell-link a {
  color: var(--primary-light);
  text-decoration: none;
}

.cell-link a:hover {
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-weight: 600;
  font-size: 1.125rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

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

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 80px;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Utilities */
.hidden { display: none !important; }

/* Responsive helpers */
@media (max-width: 639px) {
  .hide-mobile { display: none; }
}

/* Geocode Status */
.geocode-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.geocode-status.loading {
  color: var(--primary);
  background: #EFF6FF;
}

.geocode-status.success {
  color: #059669;
  background: #D1FAE5;
}

.geocode-status.error {
  color: #DC2626;
  background: #FEE2E2;
}

.geocode-status:empty {
  display: none;
}

/* Link Check Status */
.link-check-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.link-check-status.duplicate {
  color: #DC2626;
  background: #FEE2E2;
  font-weight: 500;
}

.link-check-status.unique {
  color: #059669;
  background: #D1FAE5;
}

.link-check-status:empty {
  display: none;
}

/* Preview Map in Modal */
#preview-map {
  background: var(--background);
}

#preview-map-container {
  margin-top: 0.5rem;
}

/* Action Buttons in Table */
.col-actions {
  width: 80px;
  text-align: center;
}

.cell-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
}

.btn-action {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: var(--background);
}

.btn-edit:hover {
  color: var(--primary);
  background: #EFF6FF;
}

.btn-delete:hover {
  color: var(--error);
  background: #FEE2E2;
}

/* Danger Button */
.btn-danger {
  background: var(--error);
  color: white;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

/* Edit Modal Footer */
.modal-footer.edit-footer {
  justify-content: space-between;
}

.modal-footer-right {
  display: flex;
  gap: 0.75rem;
}

/* Clickable table rows */
table tbody tr[data-id] {
  cursor: pointer;
  transition: background 0.15s ease;
}

table tbody tr[data-id]:hover {
  background: #F1F5F9;
}

/* Active row - selected for map focus */
table tbody tr.active-row {
  background: #EFF6FF !important;
  border-left: 3px solid var(--primary);
}

/* Action icons column */
.col-actions { width: 70px; }
.cell-actions {
  white-space: nowrap;
  text-align: center;
  padding: 0.25rem !important;
}
.cell-actions .btn-icon {
  padding: 4px;
  opacity: 0.4;
  transition: opacity 0.15s, color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
}
.cell-actions .btn-icon:hover {
  opacity: 1;
}
.cell-actions .btn-edit:hover {
  color: var(--primary);
}
.cell-actions .btn-delete:hover {
  color: var(--error);
}

/* ===== Auth Tabs: Сотрудник / Партнёр ===== */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab:not(:last-child) {
  border-right: 1px solid var(--border);
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
}

.auth-tab:hover:not(.active) {
  background: var(--background);
}

.tg-bot-link {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, #0088cc, #0077b5);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.tg-bot-link:hover {
  opacity: 0.85;
}

.tg-bot-link svg {
  flex-shrink: 0;
}

/* ===== Broadcast (Рассылка) ===== */
.broadcast-history {
  padding: 0 1rem;
}

.broadcast-recipients-toggle {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.recipient-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.recipient-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.recipient-search {
  width: 180px;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.recipient-list-items {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.recipient-item {
  padding: 0.375rem 0.25rem;
  border-radius: 4px;
}

.recipient-item:hover {
  background: var(--background);
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.broadcast-result {
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 4px solid var(--success, #10B981);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.broadcast-result.has-errors {
  border-left-color: var(--danger, #EF4444);
}

.broadcast-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.broadcast-result-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.broadcast-result-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  margin-bottom: 0.375rem;
}

.broadcast-result-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 4.5em;
  overflow: hidden;
}

.broadcast-result-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.broadcast-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: all 0.2s;
}

.broadcast-result:hover .broadcast-delete-btn {
  opacity: 1;
}

.broadcast-delete-btn:hover {
  color: var(--danger, #EF4444);
  background: rgba(239, 68, 68, 0.1);
}

.broadcast-result-photos {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.8rem;
  color: var(--primary);
}

.broadcast-result-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.broadcast-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.broadcast-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.broadcast-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
}

.broadcast-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.broadcast-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.broadcast-result-stats {
  flex-wrap: wrap;
}

.broadcast-result-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-danger {
  color: var(--danger, #EF4444);
}

.file-upload-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-preview-remove:hover {
  background: var(--danger, #EF4444);
}

/* ===== Partner Info Card ===== */
.partner-info-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-light);
}

.partner-info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--primary);
}

.partner-info-body {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Order Status Badges ===== */
.order-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
}
.status-success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.status-closed {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}
.status-new {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}
.status-work {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
}
.status-default {
  background: rgba(107, 114, 128, 0.1);
  color: #6B7280;
}
.order-phone-link {
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.order-phone-link:hover {
  text-decoration: underline;
}