:root {
  --primary-emerald: #0b4619;
  --primary-dark: #072a10;
  --emerald-light: #167936;
  --emerald-subtle: #e8f5ec;
  --accent-gold: #c59b27;
  --accent-gold-light: #f7e7b4;
  --bg-main: #f5f8f6;
  --card-bg: #ffffff;
  --text-primary: #1a2e22;
  --text-secondary: #526659;
  --border-color: #dce7df;
  --shadow-sm: 0 2px 4px rgba(7, 42, 16, 0.05);
  --shadow-md: 0 4px 12px rgba(7, 42, 16, 0.08);
  --shadow-lg: 0 10px 25px rgba(7, 42, 16, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-emerald) 100%);
  color: #ffffff;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--accent-gold);
}

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

.logo-badge {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.crescent-icon {
  width: 24px;
  height: 24px;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-admin {
  font-size: 11px;
  text-transform: uppercase;
  background: var(--accent-gold);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.app-subtitle {
  font-size: 13px;
  color: #b8dec4;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.firebase-status-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  transition: all 0.2s ease;
}

.firebase-status-chip:hover {
  background: rgba(255, 255, 255, 0.22);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}

.status-dot.red {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Layout */
.main-layout {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
}

.nav-item.active {
  background: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(11, 70, 25, 0.25);
}

.count-pill {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
}

.nav-item.active .count-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Mobile Preview Box inside Sidebar */
.mobile-preview-box {
  background: #f8faf8;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: auto;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-emerald);
  margin-bottom: 10px;
}

.phone-card-preview {
  background: #ffffff;
  border: 1.5px solid #c7e0cf;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.preview-star-badge {
  width: 32px;
  height: 32px;
  background: #fdf5e2;
  border: 1.5px solid var(--accent-gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-emerald);
  font-size: 14px;
  flex-shrink: 0;
}

.preview-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: #0b3d20;
  line-height: 1.35;
  margin-bottom: 4px;
}

.preview-subject {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 600;
  background: #fff9e6;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.preview-content p {
  font-size: 11px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.preview-hint {
  font-size: 11px;
  color: #798d80;
  margin-top: 8px;
  text-align: center;
}

/* Content Area */
.content-area {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

/* Statistics Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.emerald { background: #e8f5ec; color: #167936; }
.stat-icon.gold { background: #fdf5e2; color: #c59b27; }
.stat-icon.blue { background: #e6f4fe; color: #0284c7; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Panel Header */
.panel-header {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 2px solid var(--border-color);
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-emerald);
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7faf8;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  width: 280px;
  color: var(--text-secondary);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
}

.form-select {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

/* Data Table */
.table-container {
  background: var(--card-bg);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #f8faf8;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1.5px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid #edf2ee;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #f6fbf7;
}

.hadith-no-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
  font-weight: 700;
  border: 1px solid #bfe3cc;
}

.hadith-title-cell {
  font-weight: 600;
  color: #0d421d;
  line-height: 1.35;
}

.hadith-des-cell {
  color: #4b5e52;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 450px;
}

.subject-badge {
  background: #eef6f0;
  color: var(--primary-emerald);
  border: 1px solid #c9e4d1;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.action-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
  border-color: var(--primary-emerald);
}

.btn-icon.delete:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #f87171;
}

/* Pagination */
.pagination-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.current-page-display {
  font-size: 14px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--primary-dark);
  font-weight: 700;
}

.btn-primary:hover {
  background: #b58d20;
  box-shadow: 0 3px 8px rgba(197, 155, 39, 0.35);
}

.btn-outline {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
  background: var(--emerald-subtle);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 25, 10, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-emerald);
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-emerald));
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.modal-close:hover { opacity: 1; }

.modal-body {
  padding: 24px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.required {
  color: #dc2626;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px rgba(11, 70, 25, 0.12);
}

.textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-help {
  font-size: 12px;
  color: #798d80;
  margin-top: 4px;
  display: block;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.module-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.module-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-emerald);
}

.module-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.module-badge {
  font-size: 11px;
  font-weight: 700;
  background: #f2f7f4;
  color: #3b5244;
  padding: 4px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-top: auto;
}

/* Sync Section */
.sync-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.sync-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-key {
  width: 180px;
  font-weight: 600;
  color: var(--text-secondary);
}

.code-pill {
  background: #edf5f0;
  color: var(--primary-emerald);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
}

.sync-action-box {
  background: #fdfaf2;
  border: 1px solid #fae8c0;
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.sync-action-box p {
  font-size: 13px;
  color: #785a12;
  line-height: 1.4;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary-dark);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Tab hide/show */
.tab-content {
  display: none;
}

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

.text-right { text-align: right; }
.loading-state {
  text-align: center;
  padding: 40px !important;
  color: var(--text-secondary);
}

/* Red Stat Icon & Alert Badge */
.stat-icon.red {
  background: #fef2f2;
  color: #ef4444;
}

.count-pill.alert {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 700;
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
}

.btn-outline-danger {
  background: #ffffff;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}

.btn-outline-danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
}

/* Modal Large for Module Editor */
.modal-lg {
  max-width: 900px;
}

/* Module Editor Tabs */
.module-edit-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.btn-tab {
  background: none;
  border: none;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tab.active {
  color: var(--primary-emerald);
  background: var(--emerald-subtle);
  border-bottom: 3px solid var(--primary-emerald);
  font-weight: 700;
}

.json-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.code-textarea {
  width: 100%;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 14px;
  resize: vertical;
  tab-size: 2;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.code-textarea:focus {
  border-color: var(--accent-gold);
}

.visual-items-list {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
}

.visual-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
}

.visual-item-card h5 {
  font-size: 14px;
  color: var(--primary-emerald);
  margin-bottom: 4px;
}

.visual-item-card p {
  color: #475569;
  font-size: 12.5px;
  line-height: 1.4;
}

/* Filter Pill Group for Reports */
.filter-pill-group {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: #ffffff;
  color: var(--primary-emerald);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.submitted {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.status-badge.reviewing {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.status-badge.resolved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-badge.rejected {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Report Review Modal Details */
.report-meta-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
}

.meta-row strong {
  color: var(--text-secondary);
}

.user-desc-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1e293b;
  max-height: 140px;
  overflow-y: auto;
}

/* Announcements Tab Styles */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--text-primary);
}

.switch-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-emerald);
  cursor: pointer;
}

.notice-preview-box {
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 14px;
  margin-top: 18px;
}

.notice-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.notice-preview-card {
  background: #fefce8;
  border: 1.5px solid #fde047;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #713f12;
}

.notice-preview-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #854d0e;
}

.notice-preview-card p {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

/* Backup & Restore Grid */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.backup-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.backup-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}

.backup-icon.gold {
  background: #fef3c7;
  color: #d97706;
}

.backup-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.backup-box p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* Firebase Guide Card */
.firebase-guide-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.guide-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #9a3412;
}

.firebase-guide-card p {
  font-size: 13.5px;
  color: #431407;
  line-height: 1.5;
  margin-bottom: 14px;
}

.code-terminal {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 16px;
  color: #a1a1aa;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.code-terminal code {
  color: #22c55e;
}

.guide-note {
  font-size: 12.5px !important;
  color: #78716c !important;
  margin-top: 8px;
}

/* Arabic Text Display */
.arabic-text {
  font-family: 'Amiri', serif !important;
  font-size: 17px !important;
  direction: rtl;
  text-align: right;
  line-height: 1.8;
}

/* Module card badge & actions */
.module-card .module-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.module-action-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-emerald);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.module-action-btn:hover {
  background: var(--emerald-subtle);
  border-color: var(--primary-emerald);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-preview-box {
    display: none;
  }
}

/* ============================================================
   ADVANCED ADMIN UI EXTENSIONS
   Phone Simulator, Waqt Clock, Rakah Matrix, Universal Editor
   ============================================================ */

/* Top Header Quick Action Buttons */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-phone-toggle {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
}

.btn-phone-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.35);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-phone-toggle.active {
  background: #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Layout with Phone Simulator */
.admin-layout-wrapper {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Floating / Docked Phone Simulator */
.phone-simulator-panel {
  width: 380px;
  min-width: 380px;
  background: #0f172a;
  border-left: 1px solid #1e293b;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.phone-simulator-panel.hidden {
  display: none;
}

.simulator-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 16px;
  padding: 0 6px;
}

.sim-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sim-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sim-close-btn:hover {
  color: #f1f5f9;
  background: #1e293b;
}

/* Realistic Smartphone Frame */
.smartphone-device {
  width: 340px;
  background: #09090b;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px #27272a, inset 0 0 0 2px #3f3f46;
  position: relative;
  display: flex;
  flex-direction: column;
}

.smartphone-screen {
  background: #f8fafc;
  border-radius: 36px;
  overflow: hidden;
  height: 640px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #000;
}

/* Phone Status Bar */
.phone-status-bar {
  height: 38px;
  background: var(--primary-emerald);
  color: #ffffff;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 10;
}

.phone-notch {
  width: 110px;
  height: 22px;
  background: #09090b;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.camera-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #334155;
}

.sensor-bar {
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: #1e293b;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Phone App Header */
.phone-app-header {
  background: var(--primary-emerald);
  color: #ffffff;
  padding: 8px 16px 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent-gold);
}

.phone-app-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-mode-selector {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 8px;
  gap: 4px;
  overflow-x: auto;
}

.phone-mode-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.phone-mode-btn.active {
  background: #ffffff;
  color: var(--primary-emerald);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Phone Body Content Container */
.phone-screen-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Phone Bottom Tab Bar */
.phone-tab-bar {
  height: 52px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.phone-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.phone-tab-item.active {
  color: var(--primary-emerald);
}

/* ==================== WAQT & PRAYER CLOCK DASHBOARD ==================== */

.waqt-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.waqt-hero-card {
  background: linear-gradient(135deg, #072a10 0%, #0b4619 60%, #167936 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--accent-gold);
}

.waqt-hero-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(197, 155, 39, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.waqt-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.district-picker-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.district-select-custom {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.district-select-custom option {
  background: #ffffff;
  color: #1e293b;
}

.current-date-badge {
  font-size: 13px;
  color: #b8dec4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.waqt-active-banner {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(0, 0, 0, 0.22);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.active-waqt-name {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.countdown-val {
  font-size: 28px;
  font-weight: 700;
  color: #fde047;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 1px;
}

.countdown-label {
  font-size: 12px;
  color: #cbd5e1;
}

.alert-ending-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.alert-ending-pill.normal {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.alert-ending-pill.warning {
  background: rgba(245, 158, 11, 0.25);
  color: #fde047;
  border: 1px solid #f59e0b;
  animation: pulse 1.5s infinite;
}

.alert-ending-pill.urgent {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border: 1px solid #ef4444;
  animation: pulse 1s infinite;
}

/* 5 Waqt Timetable Strip */
.waqt-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.waqt-time-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.waqt-time-card.current {
  background: rgba(197, 155, 39, 0.25);
  border: 1.5px solid var(--accent-gold);
  transform: scale(1.03);
}

.waqt-name-sm {
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.waqt-time-val {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 4px 0 2px 0;
}

.waqt-status-tag {
  font-size: 10.5px;
  color: #a7f3d0;
  font-weight: 600;
}

/* Prohibited Times Banner */
.prohibited-times-section {
  background: #fff;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
}

.prohibited-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c2410c;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.prohibited-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.prohibited-card {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid #ea580c;
  border-radius: 8px;
  padding: 12px 16px;
}

.prohibited-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 4px;
}

.prohibited-card .p-time {
  font-size: 16px;
  font-weight: 700;
  color: #c2410c;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.prohibited-card p {
  font-size: 12px;
  color: #7c2d12;
  margin-top: 4px;
}

/* Waqt Rules Visual Editor Grid */
.waqt-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.waqt-rule-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.waqt-rule-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.waqt-rule-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==================== ILLUSTRATED NAMAZ & RAKAH STUDIO ==================== */

.rakah-matrix-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.rakah-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}

.rakah-table th {
  background: #f8fafc;
  padding: 12px 14px;
  text-align: center;
  font-weight: 700;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.rakah-table td {
  padding: 12px 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
  font-weight: 500;
}

.rakah-table td:first-child {
  text-align: left;
  font-weight: 700;
  color: var(--primary-emerald);
}

.rakah-badge-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
}

.rakah-badge-pill.farz {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.rakah-badge-pill.sunnah {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.rakah-badge-pill.wajib {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.rakah-badge-pill.nafol {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.rakah-badge-pill.total {
  background: #0f172a;
  color: #f8fafc;
}

/* Prayer Steps Cards */
.namaz-steps-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gender-switch-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.gender-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.gender-btn.active {
  background: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
  box-shadow: 0 4px 10px rgba(11, 70, 25, 0.2);
}

.prayer-step-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.prayer-step-card:hover {
  border-color: #94d3a2;
  box-shadow: var(--shadow-md);
}

.prayer-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.step-num-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-order-badge {
  width: 34px;
  height: 34px;
  background: var(--emerald-subtle);
  border: 1.5px solid var(--primary-emerald);
  color: var(--primary-emerald);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.step-title-text {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.step-farz-tag {
  font-size: 12px;
  font-weight: 600;
  background: #fdf5e2;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 10px;
  border-radius: 12px;
}

.step-content-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

/* ==================== UNIVERSAL MODULE VISUAL STUDIO ==================== */

.module-category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.mod-cat-chip {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.mod-cat-chip.active {
  background: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
  box-shadow: 0 2px 6px rgba(11, 70, 25, 0.2);
}

.module-workspace-header {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

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

.module-item-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.module-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #94d3a2;
}

.module-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.module-item-no {
  font-size: 12px;
  font-weight: 700;
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
  padding: 2px 8px;
  border-radius: 6px;
}

.module-item-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.arabic-preview-block {
  background: #fdfcf7;
  border: 1px solid #f1ece1;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Amiri', serif;
  font-size: 18px;
  direction: rtl;
  text-align: right;
  color: #0f172a;
  line-height: 1.8;
}

.pronounce-block {
  font-size: 13px;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.4;
}

.desc-block {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}

.item-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* Universal Visual Modal */
.modal-lg-extended {
  max-width: 900px;
  width: 95%;
}

/* ==================== Admin login & publish state ==================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-emerald) 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  text-align: center;
}

.login-card h2 {
  font-size: 21px;
  color: var(--primary-emerald);
  margin: 14px 0 6px;
}

.login-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.login-logo {
  margin: 0 auto;
}

.btn-google {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.btn-google svg {
  background: #fff;
  border-radius: 50%;
  padding: 1px;
}

.login-error {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  text-align: left;
}

.admin-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: middle;
}

.source-badge.cloud {
  background: #fef3c7;
  color: #92400e;
}

.source-badge.builtin {
  background: var(--emerald-subtle);
  color: var(--primary-emerald);
}

#univ-fields code {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 4px;
}

#univ-fields textarea[readonly],
#univ-fields input[readonly] {
  background: #f1f5f9;
  color: #64748b;
}

.login-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.header-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==================== Phone & tablet ==================== */
@media (max-width: 900px) {
  .content-area {
    min-width: 0;
    width: 100%;
  }
  .table-container {
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }
  .app-subtitle,
  .btn-phone-toggle {
    display: none;
  }
  .header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-user-chip {
    flex: 1 1 auto;
    min-width: 0;
  }
  .content-area {
    padding: 16px;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .panel-actions {
    flex-wrap: wrap;
  }
  .search-box {
    width: 100% !important;
  }
  .sidebar .nav-menu {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
  }
  .phone-simulator-panel {
    display: none !important;
  }
  .main-layout {
    width: 100%;
    overflow-x: hidden;
  }
  .sidebar .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .modal-card {
    max-height: 92vh;
    overflow-y: auto;
  }
}
