/* ============================================================
   VUZKO ADMIN DASHBOARD — admin_styles.css
   ============================================================ */

/* CSS VARIABLES */
:root {
  --primary: #0084d1;
  --primary-dark: #0056b3;
  --teal: #00bcd4;
  --lime: #c9e265;
  --danger: #dc3545;
  --text-primary: #2c3e50;
  --text-secondary: #666;
  --border: #ddd;
  --border-light: rgba(43, 176, 230, 0.18);
  --bg-light: #f8f9fa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  height: 100dvh;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: linear-gradient(
    180deg,
    rgba(43, 176, 230, 0.07) 0%,
    rgba(201, 226, 101, 0.05) 45%,
    var(--bg-light) 100%
  );
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* iPhone notch/safe area */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* Prevent iOS auto-zoom on input focus */
input,
select,
textarea {
  font-size: 16px;
  font-size: max(16px, 1rem);
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}
@media (min-width: 768px) {
  .container {
    padding: 2rem;
  }
}

#app {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ───────────────────────────────────────────────── */
header {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.25rem 1rem;
  border-radius: 0.9rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(43, 176, 230, 0.1);
  position: relative;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--teal), var(--lime));
}
.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}
@media (min-width: 768px) {
  header h1 {
    font-size: 1.875rem;
  }
}
@media (max-width: 480px) {
  header h1 {
    font-size: 1.25rem;
  }
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.header-right > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── TABS ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--teal);
  font-weight: 600;
}
.tab-btn:hover {
  color: var(--text-primary);
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.section {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .section {
    padding: 1.5rem;
  }
}
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* ── FORMS ────────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .form-row.full {
    grid-template-columns: 1fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input,
select,
textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 132, 209, 0.1);
}
textarea {
  resize: vertical;
  min-height: 100px;
}

.hint {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
}
.req {
  color: var(--danger);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
button {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
}
@media (min-width: 640px) {
  button {
    min-height: auto;
  }
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  background: #f0f0f0;
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: #e0e0e0;
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #c82333;
}
.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  min-height: auto;
}
.btn-active {
  background: var(--primary);
  color: white;
}
.btn-active:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-inactive {
  background: #f0f0f0;
  color: var(--text-primary);
}
.btn-inactive:hover {
  background: #e0e0e0;
}

/* ── TAGS ─────────────────────────────────────────────────── */
.tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  min-height: auto;
}
.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* ── ADVANCED TOGGLE ──────────────────────────────────────── */
.advanced-toggle-btn {
  width: 100%;
  border: 1px dashed #3b82f6;
  background: #f4f8ff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  margin: 16px 0;
}
.advanced-toggle-btn.open {
  background: #eef4ff;
  border-color: #1f7aff;
}
.advanced-toggle-text {
  display: flex;
  flex-direction: column;
}
.advanced-title {
  font-weight: 600;
  color: #1f4fd8;
}
.advanced-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.section-card {
  margin: 12px 0;
}

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.modal-overlay.active {
  display: block;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow-y: hidden;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
  align-items: flex-end;
  justify-content: center;
}
.modal.active {
  display: flex;
}
@media (min-width: 640px) {
  .modal.active {
    align-items: center;
  }
}
.modal-content {
  background: white;
  border-radius: 1rem 1rem 0 0;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 640px) {
  .modal {
    padding: 0;
  }
  .modal-content {
    max-height: 92vh;
    border-radius: 1rem 1rem 0 0;
  }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  flex-shrink: 0;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
  min-height: auto;
}
.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 10;
  flex-shrink: 0;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .modal-footer {
    flex-direction: column;
  }
  .modal-footer button {
    width: 100%;
  }
}

/* ── SUBCATEGORY PILLS ────────────────────────────────────── */
.subcat-group {
  margin: 18px 0 22px;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 12px;
}
.category-title {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-transform: none;
}
.category-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .subcat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.subcat-pill {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
  touch-action: manipulation;
}
.subcat-pill:hover {
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.subcat-pill:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.subcat-pill.selected {
  border-color: rgba(0, 140, 255, 0.45);
  background: rgba(0, 140, 255, 0.08);
}
.subcat-pill.selected .subcat-check {
  border-color: rgba(0, 140, 255, 0.65);
  color: rgba(0, 140, 255, 0.95);
}
.subcat-text {
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  word-break: break-word;
}
.subcat-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  font-weight: 900;
  line-height: 1;
  color: transparent;
}

/* ── ALERT ────────────────────────────────────────────────── */
.alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  border-left: 4px solid transparent;
}
.alert-success {
  background: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}
.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-left-color: var(--danger);
}

/* ── SWITCH TOGGLE ────────────────────────────────────────── */
.switch {
  width: 44px;
  height: 24px;
  background: #cfd8dc;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
}
.switch.on {
  background: #25d366;
}
.switch .knob {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}
.switch.on .knob {
  transform: translateX(20px);
}

.whatsapp-card {
  background: #f6fbff;
  border: 1px solid #d9ecff;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.toggle-text strong {
  font-size: 14px;
}
.whatsapp-details {
  margin-top: 12px;
}

/* ── SMS CARD ─────────────────────────────────────────────── */
.sms-card {
  background: #f0fff4;
  border: 1px solid #c3f0d4;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}
.sms-card .switch.on {
  background: #0084d1;
}

/* ── COMPANY CARDS ────────────────────────────────────────── */
.company-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .company-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.company-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
}
.company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.company-thumbnail {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  background: var(--bg-light);
}
.company-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.company-title-link {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
  cursor: pointer;
  transition: color 0.2s;
}
.company-title-link:hover {
  color: var(--primary-dark);
}
.company-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  background: #d4edda;
  color: #155724;
}
.company-id-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-light);
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.company-modified {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.5rem;
}
.company-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
  word-break: break-word;
}
.company-info strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.company-info a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}
.company-info a:hover {
  text-decoration: underline;
}
.company-categories {
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.company-category-item {
  margin-bottom: 0.75rem;
}
.category-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.card-actions button {
  flex: 1;
  min-width: 70px;
  font-size: 0.75rem;
}

/* ── SEARCH FILTERS ───────────────────────────────────────── */
.search-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-filters input,
.search-filters select {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

/* ── STATES ───────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}
.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 132, 209, 0.2);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ── FORM SECTIONS ────────────────────────────────────────── */
.form-section {
  padding: 1.5rem 0;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.form-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-section.images {
  border-left-color: var(--teal);
}
.form-section.images .form-section-title {
  color: var(--teal);
}
.form-section.locations {
  border-left-color: var(--lime);
}
.form-section.locations .form-section-title {
  color: var(--lime);
}
.form-section.advanced {
  border-left-color: #9c27b0;
}
.form-section.advanced .form-section-title {
  color: #9c27b0;
}

/* ── IMAGE UPLOAD UX ──────────────────────────────────────── */
.image-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
}
.image-upload-zone:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}
.image-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.image-upload-zone .upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.image-upload-zone .upload-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.image-upload-zone .upload-specs {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.image-spec-box {
  background: #f0f7ff;
  border: 1px solid #d0e8ff;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #0c4a7a;
}
.image-spec-box strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.image-preview-container {
  margin-top: 0.75rem;
  position: relative;
  display: inline-block;
}
.image-preview-container img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  object-fit: cover;
}
.image-preview-container .btn-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  min-height: auto;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.image-uploading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

/* ── GALLERY ──────────────────────────────────────────────── */
.gallery-upload-area {
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.gallery-upload-area.drag-over {
  border-color: var(--primary);
  background: #f0f7ff;
}
.drag-over {
  border-color: var(--primary) !important;
  background: #f0f7ff !important;
}

/* ── EDIT BANNER + FORM BUTTONS ───────────────────────────── */
.edit-banner {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 123, 255, 0.08);
  border-radius: 0.75rem;
  margin-top: 1rem;
}
.form-buttons {
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-buttons button {
  min-height: 44px;
}

/* ── LOGIN ────────────────────────────────────────────────── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1rem;
  width: 100%;
}
.login-box {
  background: white;
  border-radius: 0.9rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.login-box h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── UTILITY ──────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.hidden {
  display: none !important;
}

/* ── WEB PROFILE TOGGLE ── */
.web-profile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-light);
  background: #f9f9f9;
  transition: background 0.15s;
}
.web-profile-toggle:hover {
  background: #f0f4ff;
}
.toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── QR MODAL ── */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.qr-modal {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.qr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.qr-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.qr-modal-body {
  text-align: center;
}
.qr-image {
  width: 220px;
  height: 220px;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.qr-url {
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 0.375rem;
}

/* ══ CARD REDESIGN — overrides old form-section ══ */
.form-section {
  background: #fff !important;
  border-radius: 12px !important;
  border: 1px solid #e8edf2 !important;
  border-top: 4px solid var(--primary) !important;
  border-left: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  padding: 1.25rem 1.5rem 1.5rem !important;
  margin-bottom: 1.25rem !important;
}
.form-section.images {
  border-top-color: var(--teal) !important;
}
.form-section.locations {
  border-top-color: #27ae60 !important;
}
.form-section.advanced {
  border-top-color: #9c27b0 !important;
}
.form-section.identity {
  border-top-color: #f59e0b !important;
}
.form-section.offer {
  border-top-color: #ea580c !important;
}
.form-section.description {
  border-top-color: #64748b !important;
}
.form-section.contact {
  border-top-color: #0ea5e9 !important;
}

.form-section-title {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  color: var(--primary) !important;
  margin-bottom: 1.1rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px solid #f0f4f8 !important;
}
.form-section.images .form-section-title {
  color: var(--teal) !important;
}
.form-section.locations .form-section-title {
  color: #27ae60 !important;
}
.form-section.advanced .form-section-title {
  color: #9c27b0 !important;
}
.form-section.identity .form-section-title {
  color: #f59e0b !important;
}
.form-section.offer .form-section-title {
  color: #ea580c !important;
}
.form-section.description .form-section-title {
  color: #64748b !important;
}
.form-section.contact .form-section-title {
  color: #0ea5e9 !important;
}

/* ── IMAGES SIDE BY SIDE ── */
.images-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 600px) {
  .images-row {
    grid-template-columns: 1fr;
  }
}

/* ── OFFER FIELDS GRID ── */
.offer-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .offer-fields-grid {
    grid-template-columns: 1fr;
  }
}
/* ── CUSTOM BLOCKS ADMIN ── */
.custom-block-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 1rem;
}
.custom-block-admin-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.custom-block-admin-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.custom-block-admin-title {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-block-admin-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-danger {
  background: rgba(220, 53, 69, 0.08);
  color: var(--danger);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ── CUSTOM BLOCK MODAL ── */
.custom-block-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.custom-block-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.custom-block-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.custom-block-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.custom-block-modal-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0 4px;
}
.custom-block-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

