/* ==========================================================================
   DIGIMOZO CMS ADMIN PANEL - MODERN LIGHT THEME DESIGN SYSTEM
   Color Palette: Clean Off-White, Botanical Emerald, Mint Accent, Slate Charcoal
   ========================================================================== */

:root {
  /* Canvas & Surfaces */
  --admin-bg: #F8FAF9;
  --admin-sidebar-bg: #FFFFFF;
  --admin-card: #FFFFFF;
  --admin-card-hover: #F4F8F6;
  --admin-card-subtle: #F2F6F4;
  --admin-card-border: rgba(18, 95, 80, 0.10);
  --admin-card-border-hover: rgba(18, 95, 80, 0.22);
  --admin-card-border-active: rgba(0, 208, 156, 0.6);

  /* Primary Palette (Forest Emerald & Mint) */
  --emerald: #125F50;
  --emerald-dark: #07251F;
  --emerald-light: #1A7866;
  --mint: #00D09C;
  --mint-light: #EBF7F3;
  --mint-hover: #00b887;
  --mint-dark: #052e22;
  --mint-glow: rgba(0, 208, 156, 0.18);

  /* Typography Colors */
  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;

  /* Status Colors */
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-border: rgba(239, 68, 68, 0.25);
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --warning-border: rgba(245, 158, 11, 0.25);
  --info: #0284C7;
  --info-bg: #F0F9FF;
  --info-border: rgba(2, 132, 199, 0.25);

  /* Geometry & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(18, 95, 80, 0.06);
  --shadow-lg: 0 12px 32px rgba(18, 95, 80, 0.10);

  --sidebar-w: 260px;
  --header-h: 68px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body, button, input, textarea, select, h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--admin-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   AUTH / LOGIN SCREEN (Light Theme)
   ========================================================================== */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background: radial-gradient(circle at 50% 15%, rgba(0, 208, 156, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(18, 95, 80, 0.08) 0%, transparent 50%),
              var(--admin-bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald), var(--mint));
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-brand .brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--emerald-dark);
}

.auth-brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  display: inline-block;
}

.auth-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--mint-light);
  color: var(--emerald);
  border: 1px solid rgba(0, 208, 156, 0.3);
  margin-left: auto;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================================
   APP SHELL LAYOUT (Light Theme)
   ========================================================================== */

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

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--admin-card-border);
}

.sidebar-brand .brand-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--emerald-dark);
  letter-spacing: -0.3px;
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--mint-light);
  color: var(--emerald);
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  padding: 14px 14px 4px;
}

.nav-item.active {
  background: var(--mint-light);
  color: var(--emerald);
  border-color: rgba(0, 208, 156, 0.3);
  font-weight: 700;
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
}

.nav-item.active .nav-count {
  background: var(--emerald);
  color: #FFFFFF;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAFCFB;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mint-light);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(0, 208, 156, 0.3);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Main Content Area */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header Bar */
.admin-topbar {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--admin-card-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-card-border);
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.topbar-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.draft-status-pill.saved {
  background: var(--mint-light);
  color: var(--emerald);
  border-color: rgba(0, 208, 156, 0.3);
}

.draft-status-pill.dirty {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.draft-status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.draft-status-pill.dirty .pulse-dot {
  animation: pulse-warn 1.5s infinite;
}

@keyframes pulse-warn {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Page Body Container */
.admin-body {
  padding: 32px;
  flex: 1;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS (Light Theme)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.btn-primary {
  background: var(--mint);
  color: #052e22;
  border-color: var(--mint);
  box-shadow: 0 4px 14px rgba(0, 208, 156, 0.3);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--mint-hover);
  box-shadow: 0 6px 20px rgba(0, 208, 156, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #F8FAF9;
  border-color: var(--emerald);
  color: var(--emerald);
}

.btn-outline-mint {
  background: transparent;
  color: var(--emerald);
  border-color: rgba(18, 95, 80, 0.3);
}

.btn-outline-mint:hover {
  background: var(--mint-light);
  border-color: var(--emerald);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Inputs & Labels */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .helper-text {
  font-size: 11px;
  text-transform: none;
  font-weight: 400;
  color: var(--text-dim);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(0, 208, 156, 0.2);
  background: #FFFFFF;
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

/* Image Field Group with Picker */
.image-field-wrapper {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.image-preview-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  background: #F4F8F6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

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

.image-preview-box .placeholder-icon {
  color: var(--text-dim);
  font-size: 20px;
}

.image-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   CARDS & GRIDS (Light Theme)
   ========================================================================== */

.content-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-card-border);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .title-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--mint-light);
  color: var(--emerald);
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Overview Stat Cards */
.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--admin-card-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--mint-light);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* ==========================================================================
   SUB-TABS NAVIGATION (For Section Switcher)
   ========================================================================== */

.subtabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.subtab-btn {
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  color: var(--text-secondary);
  border: 1px solid var(--admin-card-border);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.subtab-btn:hover {
  background: var(--mint-light);
  color: var(--emerald);
}

.subtab-btn.active {
  background: var(--emerald);
  color: #FFFFFF;
  border-color: var(--emerald);
  box-shadow: 0 4px 12px rgba(18, 95, 80, 0.25);
}

.subtab-pane {
  display: none;
}

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

/* ==========================================================================
   REPEATABLE ACCORDION / LIST ITEMS (Tabs, FAQ, Team, Journey)
   ========================================================================== */

.repeatable-item {
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.repeatable-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: #FFFFFF;
}

.repeatable-header:hover {
  background: #F8FAF9;
}

.repeatable-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.repeatable-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--mint-light);
  color: var(--emerald);
  font-weight: 700;
}

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

.repeatable-body {
  padding: 18px;
  border-top: 1px solid var(--admin-card-border);
  background: #F8FAF9;
  display: none;
}

.repeatable-item.open .repeatable-body {
  display: block;
}

/* ==========================================================================
   MEDIA LIBRARY GRID & DROPZONE (Light Theme)
   ========================================================================== */

.upload-dropzone {
  border: 2px dashed rgba(18, 95, 80, 0.25);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  background: var(--mint-light);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--emerald);
  background: #E0F2EC;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--emerald);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.media-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.media-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.media-thumb-wrapper {
  width: 100%;
  height: 130px;
  background: #E2E8F0;
  overflow: hidden;
  position: relative;
}

.media-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card:hover .media-thumb-wrapper img {
  transform: scale(1.05);
}

.media-info {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #FFFFFF;
}

.media-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.media-meta {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.media-overlay-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.media-card:hover .media-overlay-actions {
  opacity: 1;
}

/* ==========================================================================
   MODALS (Light Theme)
   ========================================================================== */

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.admin-modal-backdrop.active {
  display: flex;
}

.admin-modal-container {
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.admin-modal-container.modal-lg {
  max-width: 1100px;
}

.admin-modal-container.modal-preview {
  max-width: 95vw;
  height: 92vh;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #FAFCFB;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.06);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: #F8FAF9;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: #FAFCFB;
}

/* Device Preview Viewport Container */
.preview-viewport-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.device-btn.active {
  background: var(--emerald);
  color: #FFFFFF;
  border-color: var(--emerald);
}

.preview-frame-wrapper {
  width: 100%;
  height: 100%;
  background: #E2E8F0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow: auto;
}

.preview-iframe {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: width 0.3s ease;
  background: #FFFFFF;
  height: 100%;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (Light Theme)
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #FFFFFF;
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
  max-width: 400px;
}

.toast.toast-success {
  border-left: 4px solid var(--mint);
}
.toast.toast-success .toast-icon {
  color: var(--emerald);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}
.toast.toast-error .toast-icon {
  color: var(--danger);
}

.toast.toast-info {
  border-left: 4px solid var(--info);
}
.toast.toast-info .toast-icon {
  color: var(--info);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: block;
  }
  .admin-body {
    padding: 20px 16px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    padding: 0 16px;
  }
}

/* Security & Account Settings UI */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-input {
  padding-right: 40px !important;
}

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-toggle-pw:hover {
  color: var(--mint);
  background: rgba(0, 240, 181, 0.08);
}
