/* =========================================================
   MYNU ADMIN PANEL - CLEAN FLAT DESIGN SYSTEM
   Dark Teal (#12201d, #1b3833), Ochre Gold (#d49c54)
   ========================================================= */

:root {
  --bg-primary: #182c25;
  --bg-header: #1f3830;
  --bg-surface: #234037;
  --bg-surface-hover: #2c4d43;
  --bg-darker: #13241e;
  --border-subtle: #2d4e43;

  --accent-gold: #d49c54;
  --accent-gold-hover: #e2ab63;

  --text-white: #ffffff;
  --text-muted: #8ca39d;

  --success: #22c55e;
  --danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-family: 'Noto Kufi Arabic', 'Cairo', 'Titillium Web', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-numbers: 'Titillium Web', 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 156, 84, 0.45) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 156, 84, 0.4);
  border-radius: 999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body.admin-body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  line-height: 1.4;
}

/* ==================== PIN LOGIN SCREEN ==================== */
.login-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}

.login-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-darker);
  color: var(--accent-gold);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.login-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* PIN Dots */
.pin-display-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-darker);
  border: 2px solid var(--text-muted);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.login-error-text {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Phone Keypad */
.phone-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto 24px;
}

.key-btn {
  background-color: var(--bg-darker);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  height: 60px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.key-btn:active {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
}

.backspace-key, .clear-key {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.back-to-menu-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.back-to-menu-link:hover {
  color: var(--accent-gold);
}

/* ==================== ADMIN APP WRAPPER ==================== */
.admin-wrapper {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
}

/* Top Bar */
.admin-top-bar {
  background-color: var(--bg-surface);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-logo-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-darker);
}

.admin-rest-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.admin-live-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-menu-btn {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-darker);
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Navigation Tabs */
.admin-tab-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: var(--bg-darker);
  padding: 6px 12px;
  gap: 6px;
  position: relative;
  z-index: 5;
}

.admin-tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--accent-gold);
}

/* Content Area */
.admin-content-area {
  padding: 16px;
  flex: 1;
}

.tab-pane {
  display: none;
}

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

.section-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-actions-bar h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.admin-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-primary-add {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary {
  background-color: var(--bg-surface);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.search-box-admin {
  flex: 1;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box-admin input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
}

/* Category Filter Chips */
.admin-cat-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}

.chip-btn {
  background-color: var(--bg-surface);
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.chip-btn.active {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
}

/* Items List */
.admin-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-darker);
  flex-shrink: 0;
}

.admin-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-item-price-tag {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.admin-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stock-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch-input { display: none; }

.switch-slider {
  width: 38px;
  height: 20px;
  background-color: #4b5563;
  border-radius: var(--radius-full);
  position: relative;
  transition: 0.2s;
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background-color: white;
  transition: 0.2s;
}

.switch-input:checked + .switch-slider {
  background-color: var(--success);
}

.switch-input:checked + .switch-slider::before {
  transform: translateX(18px);
}

.stock-label {
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-btn-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.item-action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-darker);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
}

.item-action-icon-btn.delete-btn:hover {
  background-color: var(--danger);
}

/* Categories List */
.admin-categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-cat-row {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s ease;
}

.admin-cat-row:hover {
  border-color: rgba(212, 156, 84, 0.4);
}

.admin-cat-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cat-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  border-radius: 8px;
  background-color: rgba(212, 156, 84, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 156, 84, 0.28);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-numbers);
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.cat-icon-svg-badge {
  width: 30px;
  height: 30px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.cat-titles {
  min-width: 0;
}

.cat-titles h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-titles span {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.admin-cat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cat-order-select,
.dish-order-select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-darker);
  background-image: 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='%23D49C54' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 11px;
  border: 1px solid rgba(212, 156, 84, 0.35);
  color: var(--accent-gold);
  font-family: var(--font-numbers);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 5px 24px 5px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  height: 32px;
  transition: all 0.15s ease;
}

[dir="rtl"] .cat-order-select,
[dir="rtl"] .dish-order-select {
  background-position: left 8px center;
  padding: 5px 8px 5px 24px;
}

.cat-order-select:hover,
.dish-order-select:hover,
.cat-order-select:focus,
.dish-order-select:focus {
  border-color: var(--accent-gold);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 2px rgba(212, 156, 84, 0.2);
}

.reorder-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.reorder-arrow-btn:hover:not(:disabled) {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  border-color: var(--accent-gold);
}

.reorder-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Banners */
.admin-banners-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-banner-card {
  position: relative;
  width: 100%;
  max-height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.admin-banner-card img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.banner-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(230, 57, 70, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  z-index: 10;
}

.banner-delete-btn:hover {
  background-color: #e63946;
  transform: scale(1.08);
}

/* Forms */
.admin-form-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.form-group select {
  width: 100%;
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-darker);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D49C54' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
  padding: 11px 36px 11px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[dir="rtl"] .form-group select {
  background-position: left 14px center;
  padding: 11px 14px 11px 36px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 156, 84, 0.25);
}

.form-group select:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 156, 84, 0.25);
}

/* Styled Options Inside Dropdowns */
select option,
.form-group select option,
.cat-order-select option,
.dish-order-select option {
  background-color: #182c25;
  color: #ffffff;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 0.9rem;
}

select option:checked,
.form-group select option:checked,
.cat-order-select option:checked,
.dish-order-select option:checked {
  background-color: var(--accent-gold);
  color: #182c25;
  font-weight: 700;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-subheading {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Visual Layout Editor Hero Launch Card in Branding Tab */
.visual-editor-launch-banner {
  background: linear-gradient(135deg, #18352b 0%, #0e2019 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.5);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.visual-editor-launch-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 220px;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 156, 84, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.launch-banner-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
  position: relative;
  z-index: 1;
}

.launch-banner-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 156, 84, 0.28) 0%, rgba(212, 156, 84, 0.1) 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-gold);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(212, 156, 84, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-launch-editor {
  background: linear-gradient(180deg, #fce0a2 0%, #d49c54 100%);
  color: #0b1a14;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-top: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 0 #9c6c2e, 0 8px 22px rgba(212, 156, 84, 0.45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.btn-launch-editor i {
  font-size: 1.05rem;
  color: #0b1a14;
}

.btn-launch-editor:hover {
  background: linear-gradient(180deg, #fff0c7 0%, #e0aa62 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #9c6c2e, 0 12px 28px rgba(212, 156, 84, 0.6);
}

.btn-launch-editor:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #9c6c2e, 0 4px 10px rgba(212, 156, 84, 0.3);
}

@media (max-width: 650px) {
  .visual-editor-launch-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .btn-launch-editor {
    width: 100%;
  }
}

/* Header Brand Config Card */
.brand-config-card {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.header-mode-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mode-select-pill {
  cursor: pointer;
}

.mode-select-pill input {
  display: none;
}

.mode-pill-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.2s ease;
  text-align: center;
}

.mode-pill-content i {
  font-size: 1.1rem;
}

.mode-select-pill input:checked + .mode-pill-content {
  border-color: var(--accent-gold);
  background-color: rgba(212, 156, 84, 0.12);
  color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 156, 84, 0.15);
}

/* Slider Controls */
.slider-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.slider-val-badge {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.admin-range-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--bg-surface);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 6px 0 10px;
}

.admin-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.1s ease;
}

.admin-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.preset-sizes-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.preset-size-btn {
  flex: 1;
  min-width: 70px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-size-btn:hover {
  background-color: var(--bg-surface-hover);
  color: #fff;
}

.preset-size-btn.active {
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  border-color: var(--accent-gold);
  font-weight: 800;
}

/* Header Live Simulation Box */
.header-sim-box {
  background-color: #182c25;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 4px;
}

.sim-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.sim-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8EA6A0;
  font-size: 0.9rem;
}

.sim-brand-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 0 10px;
  text-align: center;
}

.sim-logo {
  max-width: 180px;
  height: 42px;
  object-fit: contain;
  transition: height 0.15s ease;
}

.sim-logo.hidden, .sim-text.hidden {
  display: none !important;
}

.sim-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.3px;
}

.image-uploader-control {
  display: flex;
  gap: 12px;
  align-items: center;
}

.img-preview-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-darker);
  overflow: hidden;
  flex-shrink: 0;
}

.img-preview-box.cover-preview { width: 90px; }
.img-preview-box img { width: 100%; height: 100%; object-fit: cover; }

.uploader-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-file-upload {
  background-color: var(--bg-darker);
  color: var(--accent-gold);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: block;
}

.form-checkboxes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

/* Dynamic Call & WhatsApp Contact Rows */
.dynamic-phone-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.dynamic-phone-row {
  display: grid !important;
  grid-template-columns: 130px 1fr 38px !important;
  align-items: center !important;
  gap: 8px !important;
  background-color: var(--bg-darker) !important;
  padding: 8px 10px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-subtle) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.form-group .dynamic-phone-row select.admin-phone-type-select {
  width: 100% !important;
  min-width: 0 !important;
  padding: 9px 24px 9px 10px !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: #fff !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.form-group .dynamic-phone-row input.admin-phone-input {
  width: 100% !important;
  min-width: 0 !important;
  margin-bottom: 0 !important;
  font-family: var(--font-numbers, sans-serif) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.3px !important;
  padding: 9px 12px !important;
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: #fff !important;
  box-sizing: border-box !important;
}

.dynamic-phone-row button.phone-remove-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: var(--radius-sm) !important;
  background-color: rgba(230, 57, 70, 0.15) !important;
  border: 1px solid rgba(230, 57, 70, 0.3) !important;
  color: #e63946 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  font-size: 0.85rem !important;
  box-sizing: border-box !important;
}

.dynamic-phone-row button.phone-remove-btn:hover {
  background-color: #e63946 !important;
  color: #fff !important;
}

.btn-add-phone-row {
  width: 100%;
  background-color: var(--bg-darker);
  color: var(--accent-gold);
  border: 1.5px dashed var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-add-phone-row:hover {
  border-color: var(--accent-gold);
  background-color: rgba(212, 156, 84, 0.1);
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.custom-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
}

.btn-save-primary {
  width: 100%;
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-overlay.hidden,
.fullscreen-editor-modal.hidden,
.elements-drawer-popup.hidden,
.editor-inspector-tray.hidden,
.editor-video-inspector-tray.hidden,
.login-screen.hidden,
.admin-app.hidden,
.hidden {
  display: none !important;
}

.modal-sheet {
  background-color: var(--bg-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  max-height: 88vh;
  overflow-y: auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 156, 84, 0.45) transparent;
}

.modal-sheet::-webkit-scrollbar {
  width: 5px;
}

.modal-sheet::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.modal-sheet::-webkit-scrollbar-thumb {
  background: rgba(212, 156, 84, 0.4);
  border-radius: 999px;
}

.modal-sheet::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

.modal-form-body {
  padding: 16px 20px;
}

/* ==================== TAB 5: QR CODE STUDIO & PRINT CENTER ==================== */
.qr-studio-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border-subtle);
}

.qr-studio-header-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.qr-studio-title-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(212, 156, 84, 0.15);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  border: 1px solid rgba(212, 156, 84, 0.3);
}

/* 2 Sub-Tabs Segmented Switch */
.qr-subtabs-nav {
  display: flex;
  gap: 8px;
  background: var(--bg-darker);
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 22px;
  border: 1px solid var(--border-subtle);
}

.qr-subtab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qr-subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.qr-subtab-btn.active {
  background: var(--accent-gold);
  color: #12221c;
  box-shadow: 0 4px 12px rgba(212, 156, 84, 0.3);
}

/* Sub-Tab 1: Single QR Code Layout */
.qr-single-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .qr-single-layout {
    grid-template-columns: 1fr;
  }
}

.qr-single-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qr-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.qr-input-row input {
  flex: 1;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.qr-input-row input:focus, .admin-text-input:focus {
  border-color: var(--accent-gold);
}

.admin-text-input {
  width: 100%;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
  margin-top: 6px;
}

.setting-header-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.btn-text-clear {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-text-clear:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.qr-text-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.qr-text-pill, .single-header-pill, .single-subtext-pill, .multi-header-pill, .multi-template-pill, .multi-subtext-pill {
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.qr-text-pill:hover, .single-header-pill:hover, .single-subtext-pill:hover, .multi-header-pill:hover, .multi-template-pill:hover, .multi-subtext-pill:hover,
.qr-text-pill.active, .single-header-pill.active, .single-subtext-pill.active, .multi-header-pill.active, .multi-template-pill.active, .multi-subtext-pill.active {
  background: rgba(212, 156, 84, 0.2);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.qr-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn-qr-action {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Live Single QR Card Preview (Bigger & High Res) */
.qr-single-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--bg-darker);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.qr-preview-card {
  background: #ffffff;
  padding: 20px 22px 18px 22px;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  overflow: hidden;
}

.qr-card-header-top {
  font-size: 0.85rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
  line-height: 1.2;
}

.qr-card-header-top.hidden, .qr-subtext-under.hidden, .qr-label-under.hidden {
  display: none !important;
}

.qrcode-canvas-wrap {
  width: 100%;
  max-width: 250px;
  height: auto;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qrcode-canvas-wrap canvas, .qrcode-canvas-wrap img {
  width: 100% !important;
  max-width: 250px !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  display: block !important;
  border-radius: 6px;
  box-sizing: border-box;
}

.qr-label-under {
  color: #111827;
  font-weight: 900;
  font-size: 1.1rem;
  margin-top: 10px;
  font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.qr-subtext-under {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  text-align: center;
  line-height: 1.3;
  font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
}

/* Sub-Tab 2: Multi-Table A4 Studio */
.multi-qr-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .multi-qr-settings-grid {
    grid-template-columns: 1fr;
  }
}

.multi-setting-card {
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* Hide browser default number input spinner buttons globally */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.admin-num-input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.admin-num-input:focus {
  border-color: var(--accent-gold);
  background-color: var(--bg-darker);
  box-shadow: 0 0 0 2px rgba(212, 156, 84, 0.25);
}

.multi-setting-card.full-width {
  grid-column: 1 / -1;
}

.multi-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: flex-end;
  margin-top: 6px;
}

.multi-field-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.range-sublabel {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-count-banner {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212, 156, 84, 0.16) 0%, rgba(212, 156, 84, 0.06) 100%);
  border: 1px solid rgba(212, 156, 84, 0.35);
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

.count-banner-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-banner-label {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.2px;
}

.multi-count-badge {
  color: var(--accent-gold);
  background: rgba(212, 156, 84, 0.15);
  border: 1px solid rgba(212, 156, 84, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.4px;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.a4-size-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.btn-a4-preset {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-a4-preset:hover {
  border-color: var(--accent-gold);
}

.btn-a4-preset.active {
  background: rgba(212, 156, 84, 0.2);
  border-color: var(--accent-gold);
}

.btn-a4-preset .preset-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.btn-a4-preset.active .preset-title {
  color: var(--accent-gold);
}

.btn-a4-preset .preset-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Custom Size Controls Panel */
.custom-size-controls-panel {
  margin-top: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.custom-size-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-size-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.custom-fit-indicator {
  font-size: 0.76rem;
  font-weight: 800;
  color: #12221c;
  background: var(--accent-gold);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.custom-dimension-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .custom-dimension-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.custom-dim-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dim-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dim-label-row label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dim-num-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.dim-input-num {
  width: 48px !important;
  height: 22px !important;
  background: transparent !important;
  border: none !important;
  color: var(--accent-gold) !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-align: right !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.dim-unit {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
}

.custom-quick-sizes-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.custom-quick-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-custom-quick {
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-custom-quick:hover {
  background: rgba(212, 156, 84, 0.15);
  border-color: var(--accent-gold);
  color: #fff;
}

.smart-fit-summary-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-darker);
  border: 1px dashed rgba(212, 156, 84, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.smart-fit-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.smart-fit-stat .stat-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.smart-fit-stat strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.a4-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(212, 156, 84, 0.08);
  border: 1px solid rgba(212, 156, 84, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.a4-stats-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.a4-btn-group {
  display: flex;
  gap: 10px;
}

.a4-preview-container {
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.a4-pager-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.a4-pager-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.a4-pager-btn:hover:not(:disabled) {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.a4-pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.a4-page-indicator {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-gold);
  min-width: 100px;
  text-align: center;
}

/* Realistic A4 Simulator Sheet */
.a4-sheet-stage {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 210 / 297;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  padding: 12px;
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  align-content: stretch;
  transition: all 0.2s ease;
  overflow: hidden;
}

.a4-grid-compact {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.a4-grid-standard {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.a4-grid-large {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.a4-grid-xl {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, 1fr);
}

.a4-qr-badge {
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  background: #ffffff;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.a4-badge-rest-name {
  font-size: 0.65rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 2px;
}

.a4-badge-qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 2px;
}

.a4-badge-qr-box canvas, .a4-badge-qr-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.a4-badge-label {
  font-weight: 900;
  color: #0f172a;
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
}

.a4-badge-subtext {
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', sans-serif;
}

/* Feedback Inbox */
.admin-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-feedback-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 14px;
}

.feedback-top-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.feedback-table-tag {
  background-color: var(--bg-darker);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.feedback-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.feedback-scores-row {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--accent-gold);
}

.feedback-body-comment {
  font-size: 0.85rem;
  color: #fff;
  background-color: var(--bg-darker);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-gold);
  color: var(--bg-darker);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  z-index: 999;
}

/* ==================== SOCIAL, PHONE & GPS CONTROLS ==================== */
.social-channel-card {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.social-channel-card:focus-within {
  border-color: rgba(212, 156, 84, 0.5);
}

.social-header-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.social-header-toggle-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

/* Toggle Switch Pill */
.toggle-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-pill input {
  display: none !important;
}

.toggle-slider {
  position: relative;
  width: 38px;
  height: 20px;
  background-color: #3b5a51;
  border-radius: 12px;
  transition: background-color 0.25s ease;
  display: inline-block;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-switch-pill input:checked + .toggle-slider {
  background-color: var(--accent-gold);
}

.toggle-switch-pill input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background-color: var(--bg-darker);
}

.toggle-label-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.toggle-switch-pill input:checked ~ .toggle-label-text {
  color: var(--accent-gold);
}

/* Dynamic Phone List */
.dynamic-phone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.dynamic-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dynamic-phone-row input {
  flex: 1;
}

.phone-remove-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.phone-remove-btn:hover {
  background-color: var(--danger);
  color: #fff;
}

.btn-add-phone-row {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1.5px dashed var(--border-subtle);
  color: var(--accent-gold);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-phone-row:hover {
  border-color: var(--accent-gold);
  background-color: rgba(212, 156, 84, 0.08);
}

/* Maps Live GPS Button */
.maps-input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-location-gps {
  background: linear-gradient(135deg, rgba(212, 156, 84, 0.18) 0%, rgba(212, 156, 84, 0.08) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-location-gps:hover {
  background: var(--accent-gold);
  color: var(--bg-darker);
}

.btn-location-gps:active {
  transform: scale(0.98);
}

/* Admin PIN Management Card */
.admin-pin-card {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

/* =========================================================
   FULLSCREEN VISUAL LAYOUT EDITOR & STUDIO STYLES
   ========================================================= */

/* Top bar Layout Editor button */
.layout-editor-header-btn {
  background: linear-gradient(135deg, rgba(212, 156, 84, 0.25) 0%, rgba(212, 156, 84, 0.1) 100%) !important;
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  font-weight: 800 !important;
}

.layout-editor-header-btn:hover {
  background: var(--accent-gold) !important;
  color: var(--bg-darker) !important;
}


/* Fullscreen Modal Shell */
.fullscreen-editor-modal {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100000 !important;
  background-color: #0b1411;
  background-image: radial-gradient(rgba(212, 156, 84, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Top Glassmorphic Toolbar */
.editor-top-bar {
  height: 56px;
  min-height: 56px;
  background: rgba(18, 34, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(212, 156, 84, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 10px;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.editor-bar-left, .editor-bar-center, .editor-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-title-group {
  display: flex;
  flex-direction: column;
}

.editor-main-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.editor-live-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 5px;
}

.editor-nav-btn {
  background: linear-gradient(180deg, #28473c 0%, #172c24 100%);
  border: 1px solid rgba(212, 156, 84, 0.35);
  color: #fff;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 #0d1a15, 0 6px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.editor-nav-btn:hover {
  background: linear-gradient(180deg, #32584a 0%, #1e382e 100%);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #0d1a15, 0 8px 16px rgba(0,0,0,0.5);
}

.editor-nav-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0d1a15, 0 2px 4px rgba(0,0,0,0.3);
}

.editor-tool-btn {
  background: linear-gradient(180deg, #28473c 0%, #172c24 100%);
  border: 1px solid rgba(212, 156, 84, 0.3);
  color: #fff;
  padding: 7px 11px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 #0d1a15, 0 6px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.editor-tool-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #32584a 0%, #1e382e 100%);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #0d1a15, 0 8px 16px rgba(0,0,0,0.5);
}

.editor-tool-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0d1a15, 0 2px 4px rgba(0,0,0,0.3);
}

.editor-tool-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: transparent;
  box-shadow: none;
}

.editor-tool-separator {
  width: 1px;
  height: 22px;
  background-color: var(--border-subtle);
  margin: 0 2px;
}

.editor-save-btn {
  background: linear-gradient(180deg, #fce0a2 0%, #d49c54 100%);
  color: #0b1a14;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 3px 0 #9c6c2e, 0 6px 16px rgba(212, 156, 84, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.editor-save-btn:hover {
  background: linear-gradient(180deg, #fff0c7 0%, #e0aa62 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #9c6c2e, 0 10px 22px rgba(212, 156, 84, 0.6);
}

.editor-save-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #9c6c2e, 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Manage Elements Dropdown */
.editor-dropdown-container {
  position: relative;
}

.elements-drawer-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 250px;
  background: #182c25;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  padding: 8px 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.drawer-popup-header {
  padding: 6px 14px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-elem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.84rem;
  color: #fff;
  font-weight: 600;
}

.drawer-elem-row:hover {
  background: var(--bg-surface-hover);
}

.drawer-elem-row.elem-hidden {
  opacity: 0.55;
}

.drawer-elem-toggle {
  font-size: 0.95rem;
  color: var(--accent-gold);
}

.drawer-elem-row.elem-hidden .drawer-elem-toggle {
  color: #6c757d;
}

/* Canvas Viewport Stage */
.editor-stage-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  position: relative;
  background: #0b1411;
}

/* Phone Simulator Device Frame */
.editor-phone-frame {
  width: 375px;
  max-width: 100%;
  height: 760px;
  max-height: calc(100vh - 88px);
  aspect-ratio: 9 / 19.5;
  background: #000;
  border-radius: 40px;
  border: 5px solid #203e33;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(212, 156, 84, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin: auto;
}

/* Responsive Phone & Toolbar Styles */
@media (max-width: 768px) {
  .editor-title-group {
    display: none !important;
  }
  .editor-top-bar {
    padding: 0 8px;
    gap: 6px;
  }
}

@media (max-width: 650px) {
  .editor-stage-viewport {
    padding: 0 !important;
  }
  .editor-phone-frame {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}

@media (max-width: 520px) {
  .editor-tool-btn span,
  .editor-nav-btn span {
    display: none !important;
  }
  .editor-tool-btn,
  .editor-nav-btn {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 8px;
  }
  .editor-save-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Background Layer */
.editor-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.editor-bg-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-scrim-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

/* Interactive Elements Canvas */
.editor-elements-canvas {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  padding: 20px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Widget Boxes */
.editor-widget-box {
  position: relative;
  cursor: grab;
  touch-action: none;
  transition: box-shadow 0.15s ease;
  transform-origin: center center;
  border-radius: var(--radius-md);
}

.editor-widget-box.is-dragging {
  cursor: grabbing !important;
  z-index: 99 !important;
}

.editor-widget-box.widget-hidden {
  display: none !important;
}

.widget-content {
  pointer-events: none; /* Let box handle dragging */
  width: 100%;
  height: 100%;
}

/* Transform & Selection Handles Overlay */
.widget-transform-handles {
  position: absolute;
  inset: -6px;
  border: 2px dashed transparent;
  border-radius: calc(var(--radius-md) + 4px);
  pointer-events: none;
  transition: all 0.15s ease;
}

.editor-widget-box:hover .widget-transform-handles {
  border-color: rgba(212, 156, 84, 0.45);
}

.editor-widget-box.is-selected .widget-transform-handles {
  border-color: var(--accent-gold);
  background: rgba(212, 156, 84, 0.05);
  box-shadow: 0 0 12px rgba(212, 156, 84, 0.35);
  pointer-events: auto;
}

/* Widget Top Tag */
.widget-label-tag {
  position: absolute;
  top: -24px;
  left: 0;
  background: var(--accent-gold);
  color: #12221c;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.15s ease;
  pointer-events: none;
}

.editor-widget-box.is-selected .widget-label-tag {
  opacity: 1;
  transform: translateY(0);
}

/* Delete Button on Selected Widget */
.widget-delete-handle {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e63946;
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  z-index: 20;
}

.editor-widget-box.is-selected .widget-delete-handle {
  opacity: 1;
  transform: scale(1);
}

.widget-delete-handle:hover {
  background: #ff4d5e;
  transform: scale(1.15) !important;
}

/* Drag indicator center icon */
.widget-drag-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(24, 44, 37, 0.85);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: all 0.15s ease;
  pointer-events: none;
}

.editor-widget-box.is-selected:not(.is-dragging) .widget-drag-indicator {
  opacity: 0.75;
}

/* Resize Handle Dots (Corner Handles) */
.widget-resize-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent-gold);
  border: 2px solid #12221c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  z-index: 15;
}

.editor-widget-box.is-selected .widget-resize-dot {
  opacity: 1;
}

.widget-resize-dot.dot-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.widget-resize-dot.dot-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.widget-resize-dot.dot-se { bottom: -7px; right: -7px; cursor: nwse-resize; }
.widget-resize-dot.dot-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }

.widget-resize-dot:hover {
  transform: scale(1.35);
  background: #fff;
}

/* Widget Mock Specifics for 1:1 Customer Screen Parity */
.editor-top-bar-canvas {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px !important;
  position: relative;
  z-index: 5;
}

/* 1:1 Landing Top Pills & Badges */
.landing-top-pill {
  background: linear-gradient(180deg, #2a4c40 0%, #1a332a 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.4);
  border-radius: var(--radius-md);
  color: var(--text-white);
  padding: 8px 15px;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 0 #0d1a15, 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  user-select: none;
  white-space: nowrap;
  font-family: 'Noto Kufi Arabic', 'Cairo', 'Plus Jakarta Sans', sans-serif;
  box-sizing: border-box;
}

.landing-top-pill svg {
  display: block;
  flex-shrink: 0;
}

/* Landing Phones Group (Call & WhatsApp 3D Action Pills) */
.landing-phones-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

[dir="rtl"] .landing-phones-group {
  align-items: flex-start;
}

.landing-top-pill.phone-action-btn {
  padding: 8px 14px;
  font-family: var(--font-numbers, 'Titillium Web', 'Plus Jakarta Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  gap: 8px;
  direction: ltr;
}

.landing-top-pill.phone-action-btn.whatsapp-action {
  background: linear-gradient(180deg, #1d4631 0%, #10291d 100%);
  border-color: rgba(37, 211, 102, 0.55);
  box-shadow: 0 4px 0 #081710, 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(37, 211, 102, 0.35);
}

.landing-top-pill.phone-action-btn.call-action {
  border-color: rgba(212, 156, 84, 0.5);
}

.phone-btn-num {
  direction: ltr;
  unicode-bidi: embed;
  color: #ffffff;
  font-family: var(--font-numbers, 'Titillium Web', 'Plus Jakarta Sans', sans-serif);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 1:1 Center Brand (Logo Frame & Glowing Gold Typography) */
#widget_centerBrand {
  margin: auto 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  text-align: center !important;
}

.mock-brand-layout, .landing-center-brand {
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.brand-logo-frame {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #254439 0%, #152922 100%);
  margin-bottom: 12px;
  border: 2px solid rgba(212, 156, 84, 0.5);
  box-shadow: 0 8px 0 #0d1a15, 0 16px 32px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.brand-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-rest-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  font-family: 'Noto Kufi Arabic', 'Cairo', 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  line-height: 1.25;
}

/* 1:1 Bottom Section: 3D Language Choice & Social Bar */
.editor-bottom-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  position: relative;
  z-index: 5;
}

.landing-bottom-controls, .mock-lang-layout {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.landing-lang-btn {
  background: linear-gradient(180deg, #2c4e41 0%, #1a3229 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.45);
  border-radius: var(--radius-md);
  color: var(--text-white);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  box-shadow: 0 5px 0 #0e1c17, 0 10px 22px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  user-select: none;
  box-sizing: border-box;
  font-family: 'Noto Kufi Arabic', 'Cairo', 'Plus Jakarta Sans', sans-serif;
}

.landing-lang-btn.english-btn {
  width: 100%;
  background: linear-gradient(180deg, #305548 0%, #1c362d 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.6);
}

.landing-lang-duo-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.duo-btn {
  flex: 1;
}

/* 1:1 Social Bar & 5 Square Buttons */
.landing-social-bar, .mock-social-layout {
  width: 100% !important;
  margin-top: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.social-sq-btn {
  flex: 1;
  height: 48px;
  background: linear-gradient(180deg, #28473c 0%, #192f26 100%);
  border: 1.5px solid rgba(212, 156, 84, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 0 #0d1a15, 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
  cursor: pointer;
}

.social-sq-btn svg {
  display: block;
}

/* Floating Element Inspector Tray (Bottom) */
.editor-inspector-tray {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 44, 37, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 156, 84, 0.4);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 156, 84, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
  min-width: 300px;
  max-width: 94vw;
  animation: traySlideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes traySlideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.inspector-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  gap: 10px;
}

.inspector-drag-handle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  flex: 1;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  touch-action: none;
}

.inspector-drag-handle:hover {
  background: rgba(212, 156, 84, 0.12);
}

.inspector-drag-handle:active {
  cursor: grabbing;
}

.inspector-drag-handle .fa-grip-vertical {
  color: var(--accent-gold);
  opacity: 0.7;
  font-size: 0.88rem;
}

.inspector-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inspector-btn-dock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inspector-btn-dock:hover {
  background: var(--accent-gold);
  color: #12221c;
  border-color: var(--accent-gold);
}

.editor-inspector-tray.is-tray-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  transition: none !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 156, 84, 0.4) !important;
}

.inspector-opacity-group {
  background: rgba(19, 36, 30, 0.6);
  border: 1px solid rgba(212, 156, 84, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.inspector-target-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.inspector-btn-delete {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.35);
  color: #ff4d5e;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.inspector-btn-delete:hover {
  background: #e63946;
  color: #fff;
}

.inspector-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .editor-inspector-tray {
    width: calc(100% - 16px);
    min-width: 0;
    bottom: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    gap: 8px;
  }
  .inspector-controls-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.inspector-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspector-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspector-control-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0;
}

.inspector-val-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(212, 156, 84, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.inspector-preset-scales {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.btn-preset-scale-x,
.btn-preset-scale-y,
.btn-preset-opacity,
.btn-preset-scale {
  flex: 1;
  background: linear-gradient(180deg, #254439 0%, #172c24 100%);
  border: 1px solid rgba(212, 156, 84, 0.25);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 0 #0d1a15, 0 4px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.12s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
}

.btn-preset-scale-x:hover,
.btn-preset-scale-y:hover,
.btn-preset-opacity:hover,
.btn-preset-scale:hover {
  background: linear-gradient(180deg, #2f5447 0%, #1c352c 100%);
  color: #fff;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #0d1a15, 0 6px 12px rgba(0,0,0,0.4);
}

.btn-preset-scale-x.active,
.btn-preset-scale-y.active,
.btn-preset-opacity.active,
.btn-preset-scale.active {
  background: linear-gradient(180deg, #E8B46D 0%, #C48E47 100%);
  color: #12221c;
  border-color: #ffe0a3;
  font-weight: 800;
  box-shadow: 0 2px 0 #7e5722, 0 4px 10px rgba(212, 156, 84, 0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-preset-scale-x:active,
.btn-preset-scale-y:active,
.btn-preset-scale:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 transparent, 0 1px 3px rgba(0,0,0,0.3);
}

.inspector-align-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector-tool-btn {
  background: linear-gradient(180deg, #28473c 0%, #172c24 100%);
  border: 1px solid rgba(212, 156, 84, 0.35);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 #0d1a15, 0 5px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.12s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.inspector-tool-btn:hover {
  background: linear-gradient(180deg, #32584a 0%, #1e382e 100%);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #0d1a15, 0 8px 14px rgba(0,0,0,0.45);
}

.inspector-tool-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0d1a15, 0 2px 4px rgba(0,0,0,0.3);
}

/* Editor In-App Toast */
.editor-toast {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 44, 37, 0.95);
  border: 1.5px solid var(--accent-gold);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  animation: toastPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.editor-toast i {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   VIDEO BACKGROUND AUTO-FIT & NUMBERED SLIDERS STYLES
   ========================================================= */

.video-fit-config-card {
  border-left: 3px solid var(--accent-gold);
}

.video-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.video-presets-grid.compact-presets {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 500px) {
  .video-presets-grid.compact-presets {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-video-preset {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-video-preset i {
  font-size: 1.2rem;
  color: var(--accent-gold);
  margin-bottom: 2px;
}

.btn-video-preset .preset-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.btn-video-preset .preset-desc {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-video-preset:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-video-preset.active {
  background: rgba(212, 156, 84, 0.15);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 156, 84, 0.25);
}

.btn-video-preset.active .preset-name {
  color: var(--accent-gold);
}

/* Number Input next to Slider Label */
.slider-num-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.slider-direct-num {
  width: 54px !important;
  height: 24px !important;
  background: transparent !important;
  border: none !important;
  color: var(--accent-gold) !important;
  font-family: var(--font-numbers, sans-serif) !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  text-align: right !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.slider-unit {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Video Scale Chips */
.btn-video-scale-chip {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-video-scale-chip:hover, .btn-video-scale-chip.active {
  background: var(--accent-gold);
  color: #12221c;
  border-color: var(--accent-gold);
}

.btn-reset-video-fit {
  width: 100%;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  margin-top: 8px;
}

/* Dedicated A4 Print Container (Hidden on Screen) */
.a4-print-container {
  display: none;
}

/* ==================== PRINT STYLES ==================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    font-family: 'Plus Jakarta Sans', 'Noto Kufi Arabic', 'Cairo', sans-serif !important;
  }

  /* When printing, hide all main admin interactive screen UI elements */
  .admin-top-bar,
  .admin-tab-nav,
  .admin-header,
  .admin-header-actions,
  .login-container,
  .login-card,
  .fullscreen-editor-modal,
  .modal-overlay,
  .admin-toast,
  .editor-toast,
  .qr-studio-header-wrap,
  .qr-subtabs-nav,
  .qr-single-controls,
  .multi-qr-settings-grid,
  .a4-action-bar,
  .a4-pager-controls,
  .section-actions-bar,
  .admin-footer,
  #mynuPrintFrame {
    display: none !important;
  }
}

.hidden { display: none !important; }
