/* ============================
   ADMIN PANEL — CSS COMPLET
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #c9a84c;
  --gold-light:  #e2bc6a;
  --gold-dark:   #9a7530;
  --gold-pale:   #fdf8ee;
  --dark:        #0f0f0f;
  --sidebar-bg:  #141414;
  --sidebar-w:   250px;
  --header-h:    58px;
  --bg:          #f2efe8;
  --white:       #ffffff;
  --border:      #e0d8c8;
  --text:        #1e1e1e;
  --text-muted:  #888;
  --danger:      #d32f2f;
  --danger-bg:   #fdecea;
  --success:     #2e7d32;
  --success-bg:  #e8f5e9;
  --info:        #1565c0;
  --info-bg:     #e3f2fd;
  --radius:      9px;
  --radius-lg:   14px;
  --shadow:      0 1px 6px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 18px rgba(0,0,0,0.10);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.15);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
body { background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ============================
   LAYOUT
   ============================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid #1f1f1f;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.25s;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.sidebar-logo .cross { font-size: 1.6rem; color: var(--gold); filter: drop-shadow(0 0 6px rgba(201,168,76,0.35)); }
.sidebar-logo h2 { font-size: 0.92rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-logo small { display: block; font-size: 0.62rem; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 10px 8px; }

.nav-section {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 1.4px; color: #444; font-weight: 700;
  padding: 12px 8px 5px; margin-top: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 7px;
  font-size: 0.85rem; color: #888; cursor: pointer;
  transition: background 0.13s, color 0.13s;
  margin-bottom: 1px; font-weight: 500;
  user-select: none;
}
.nav-item svg { flex-shrink: 0; opacity: 0.6; transition: opacity 0.13s; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #ccc; }
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }
.nav-item.active { background: rgba(201,168,76,0.14); color: var(--gold); }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid #1f1f1f;
  flex-shrink: 0;
}
.btn-logout {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px; background: none;
  border: 1px solid #2a2a2a; border-radius: 7px;
  color: #666; font-size: 0.82rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ============================
   MAIN
   ============================ */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

.admin-topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 1rem; font-weight: 700; }
.topbar-breadcrumb { font-size: 0.8rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user {
  font-size: 0.8rem; color: var(--text-muted);
  background: var(--bg); padding: 5px 11px;
  border-radius: 20px; border: 1px solid var(--border);
}

.admin-content { padding: 26px 26px 60px; flex: 1; }

/* ============================
   PAGE HEADER
   ============================ */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 1.25rem; font-weight: 700; }
.page-header p  { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================
   STATS GRID
   ============================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px; margin-bottom: 24px;
}

.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-icon { font-size: 1.4rem; margin-bottom: 10px; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }

/* ============================
   CARDS
   ============================ */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}

.card + .card { margin-top: 16px; }

.card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.card-header h3 { font-size: 0.92rem; font-weight: 700; }
.card-body { padding: 20px; }

.search-inline {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 12px;
}
.search-inline svg { flex-shrink: 0; color: var(--text-muted); }
.search-inline input {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: 0.85rem; color: var(--text);
  width: 200px;
}

/* ============================
   TABLE
   ============================ */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left; padding: 10px 16px;
  background: #faf8f4; color: var(--text-muted);
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.7px; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 11px 16px; border-bottom: 1px solid #f0ece4;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #faf8f4; }

.td-name { font-weight: 500; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px;
  font-size: 0.83rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  font-family: inherit; white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-light); opacity: 1; }

.btn-dark { background: #1e1e1e; color: #fff; }
.btn-dark:hover { background: #333; opacity: 1; }

.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: #aaa; background: var(--bg); opacity: 1; }

.btn-ghost { background: none; border: none; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); opacity: 1; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-lg { padding: 11px 22px; font-size: 0.95rem; }
.btn-icon { padding: 7px; border-radius: 7px; }
.btn-icon-sm { padding: 5px; border-radius: 6px; }

.btn-table-edit   { background: none; border: 1px solid var(--border); color: #555; font-size: 0.77rem; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: border-color 0.15s, color 0.15s; font-family: inherit; font-weight: 500; }
.btn-table-edit:hover { border-color: var(--gold); color: var(--gold); }
.btn-table-del    { background: none; border: 1px solid #f0cccc; color: var(--danger); font-size: 0.77rem; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: background 0.15s; font-family: inherit; font-weight: 500; }
.btn-table-del:hover { background: var(--danger-bg); }

/* ============================
   FORMS
   ============================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }

label { font-size: 0.78rem; font-weight: 600; color: var(--text); }

.form-input, .form-select, .form-textarea {
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 7px; font-family: inherit; font-size: 0.875rem;
  color: var(--text); background: var(--white); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.13);
}
.form-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); }

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #ddd;
  border-radius: 21px; cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 15px; height: 15px; left: 3px; top: 3px;
  background: white; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(17px); }

/* Color picker */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] {
  width: 42px; height: 36px; padding: 2px;
  border: 1px solid var(--border); border-radius: 7px; cursor: pointer;
  background: none;
}

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 9px 18px; font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================
   MODAL
   ============================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 200; display: flex; align-items: center;
  justify-content: center; padding: 16px;
  backdrop-filter: blur(3px); animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.18s ease;
  max-height: 92vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.modal.modal-lg { max-width: 780px; }
.modal.modal-xl { max-width: 1000px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--text-muted); padding: 0 6px;
  border-radius: 5px; line-height: 1; transition: background 0.15s;
}
.modal-close:hover { background: var(--bg); }

.modal-body { padding: 20px 22px; flex: 1; overflow-y: auto; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 22px 18px; border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ============================
   TOAST
   ============================ */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-md); animation: slideInRight 0.2s ease;
  min-width: 240px; max-width: 360px;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { background: var(--success-bg); color: var(--success); border: 1px solid #c8e6c9; }
.toast.error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #ffcdd2; }
.toast.info    { background: var(--info-bg);    color: var(--info);    border: 1px solid #bbdefb; }

/* ============================
   BADGES
   ============================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; }
.badge-gray   { background: #f0f0f0; color: #888; }
.badge-gold   { background: var(--gold-pale); color: var(--gold-dark); border: 1px solid rgba(201,168,76,0.3); }
.badge-red    { background: #fdecea; color: var(--danger); }

/* ============================
   EMPTY STATE
   ============================ */
.empty-admin { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-admin .empty-icon { font-size: 2.8rem; margin-bottom: 12px; opacity: 0.35; display: block; }
.empty-admin h4 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-admin p { font-size: 0.875rem; }

/* ============================
   MEDIA LIBRARY
   ============================ */
.media-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg); margin-bottom: 20px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold); background: var(--gold-pale);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 10px; }
.upload-zone p { font-size: 0.9rem; color: var(--text-muted); }
.upload-zone strong { color: var(--gold); }
.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}


.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; padding: 16px;
}

.media-item {
  border: 2px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}
.media-item:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.media-item.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.2); }

.media-thumb {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block; background: var(--bg);
}
.media-thumb-icon {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; background: var(--bg);
}
.media-name {
  padding: 6px 8px; font-size: 0.72rem;
  color: var(--text-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid var(--border);
}
.media-actions {
  position: absolute; top: 6px; right: 6px;
  display: none; gap: 4px;
}
.media-item:hover .media-actions { display: flex; }
.media-del-btn {
  background: rgba(0,0,0,0.7); border: none;
  color: #fff; border-radius: 5px; padding: 4px 7px;
  cursor: pointer; font-size: 0.75rem;
  transition: background 0.15s;
}
.media-del-btn:hover { background: var(--danger); }

/* ============================
   NAVIGATION BUILDER
   ============================ */
.nav-builder-list { display: flex; flex-direction: column; gap: 8px; padding: 16px; }

.nav-builder-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow);
}
.nav-builder-item.sortable-ghost { opacity: 0.4; }
.nav-builder-item.sortable-chosen { box-shadow: var(--shadow-md); }

.drag-handle {
  cursor: grab; color: var(--text-muted); font-size: 1.1rem;
  padding: 2px 4px; flex-shrink: 0;
}
.drag-handle:active { cursor: grabbing; }

.nav-item-fields { flex: 1; display: flex; gap: 10px; }
.nav-item-fields input { flex: 1; }

/* ============================
   UI CONSTRUCTOR
   ============================ */
.element-type-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.type-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; background: var(--white);
}
.type-card:hover, .type-card.selected { border-color: var(--gold); background: var(--gold-pale); }
.type-card .type-icon { font-size: 1.8rem; margin-bottom: 5px; }
.type-card .type-label { font-size: 0.8rem; font-weight: 700; }
.type-card .type-desc { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

.element-list { display: flex; flex-direction: column; gap: 8px; }
.element-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow); transition: box-shadow 0.15s;
}
.element-card.sortable-ghost { opacity: 0.4; }
.element-card:hover { box-shadow: var(--shadow-md); }
.el-icon { font-size: 1.4rem; flex-shrink: 0; }
.el-body { flex: 1; min-width: 0; }
.el-label { font-weight: 600; font-size: 0.9rem; }
.el-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }

/* ============================
   RICH TEXT EDITOR (Quill)
   ============================ */
.ql-container { font-family: 'Inter', sans-serif; font-size: 0.9rem; }
.ql-editor { min-height: 220px; }
.ql-toolbar { border-radius: var(--radius) var(--radius) 0 0; border-color: var(--border) !important; background: var(--bg); }
.ql-container.ql-snow { border-radius: 0 0 var(--radius) var(--radius); border-color: var(--border) !important; }

/* ============================
   DASHBOARD CHART
   ============================ */
.chart-wrap { padding: 20px; position: relative; height: 260px; }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ============================
   ANNOUNCEMENT BAR (admin preview)
   ============================ */
.ann-preview {
  padding: 10px 16px; border-radius: var(--radius);
  font-size: 0.87rem; font-weight: 500;
  margin-top: 12px; text-align: center;
}

/* ============================
   SEO FIELDS
   ============================ */
.seo-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-top: 14px;
}
.seo-box h4 { font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Google preview */
.google-preview {
  background: var(--white); border: 1px solid #ddd;
  border-radius: 8px; padding: 14px; margin-top: 12px;
  font-size: 0.85rem;
}
.google-preview .g-title { color: #1a0dab; font-size: 1rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.google-preview .g-url { color: #006621; font-size: 0.78rem; margin: 2px 0; }
.google-preview .g-desc { color: #545454; font-size: 0.83rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================
   LOGIN PAGE
   ============================ */
.login-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, #1a1510 0%, #0d0d0d 100%);
  padding: 20px;
}
.login-box {
  background: var(--white); border-radius: 18px;
  padding: 40px 36px; width: 100%; max-width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .cross { font-size: 2.6rem; color: var(--gold); display: block; margin-bottom: 8px; filter: drop-shadow(0 0 10px rgba(201,168,76,0.4)); }
.login-logo h1 { font-size: 1.2rem; font-weight: 700; }
.login-logo p  { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.login-box .form-group { margin-bottom: 14px; }
.login-btn {
  width: 100%; padding: 12px; background: var(--gold); color: white;
  border: none; border-radius: 9px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; margin-top: 8px; font-family: inherit;
  transition: background 0.15s;
}
.login-btn:hover { background: var(--gold-light); }
.login-error {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #ffcdd2; border-radius: 7px;
  padding: 10px 14px; font-size: 0.83rem; margin-top: 12px; display: none;
}

/* ============================
   RESPONSIVE
   ============================ */
#sidebarToggle { display: none; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #sidebarToggle { display: inline-flex !important; }
  .sidebar { transform: translateX(-100%); z-index: 999; box-shadow: 4px 0 25px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .admin-topbar {
    padding: 10px 14px !important;
    height: auto !important;
    min-height: var(--header-h) !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-width: 100vw !important;
  }
  .topbar-right {
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-left: auto;
  }
  .admin-content {
    padding: 14px 12px 40px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .form-grid, .modal-grid, [class*="modal-grid"] {
    grid-template-columns: 1fr !important;
  }
  .form-group.span-2 { grid-column: span 1; }
  .element-type-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .nav-item-fields { flex-direction: column; gap: 6px; }

  /* Previne zoom-ul automat enervant al browserului pe mobil la tastare */
  input, select, textarea, .form-input, .filter-select, .multi-input-wrap input {
    font-size: 16px !important;
  }

  /* MODALE FULL-SCREEN NATIVE PE TELEFON (FĂRĂ SPAȚIU EXTERIOR UNDE SĂ APASĂ DIN GREȘEALĂ) */
  .modal-overlay {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: rgba(0, 0, 0, 0.75) !important;
  }

  .modal, .modal.modal-lg, .modal.modal-xl, .batch-modal-window {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .modal-header, .batch-header {
    padding: 12px 14px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #fff !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.06) !important;
    flex-shrink: 0 !important;
  }

  .modal-header h3, .batch-header h3 {
    font-size: 1rem !important;
  }

  .modal-close {
    font-size: 1.8rem !important;
    padding: 4px 10px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-body {
    padding: 14px 14px 28px !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer, .batch-footer {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    background: #faf8f5 !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.08) !important;
    flex-shrink: 0 !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .modal-footer .btn, .batch-footer .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 11px 16px !important;
    font-size: 0.92rem !important;
    min-height: 44px !important;
  }

  .modal-footer > div, .batch-footer > div {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Multi-input and tags on mobile */
  .multi-input-wrap {
    min-height: 44px !important;
    padding: 6px 10px !important;
  }
  .multi-input-wrap .mtag {
    padding: 4px 9px !important;
    font-size: 0.83rem !important;
  }
}

.sidebar-img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; box-shadow: 0 0 6px rgba(201,168,76,0.35); margin-right: 10px; }
.login-img { width: 80px; height: 80px; object-fit: contain; margin: 0 auto 12px; display: block; border-radius: 6px; box-shadow: 0 0 10px rgba(201,168,76,0.4); }
