/* electronet.al admin — shares the storefront's tokens, type and logo. */
:root {
  --en-ink: #09090b;
  --en-ink-800: #18181b;
  --en-ink-700: #27272a;
  --en-cyan: #06b6d4;
  --en-cyan-600: #0891b2;
  --en-cyan-50: #ecfeff;
  --en-cyan-100: #cffafe;
  --en-amber: #f59e0b;
  --en-amber-50: #fffbeb;
  --en-danger: #ef4444;
  --en-success: #10b981;
  --en-bg: #fafafa;
  --en-surface: #ffffff;
  --en-border: #e4e4e7;
  --en-border-strong: #d4d4d8;
  --en-text: #09090b;
  --en-text-muted: #71717a;
  --en-radius: 14px;
  --en-radius-sm: 10px;
  --en-ease: cubic-bezier(.16, 1, .3, 1);
  --en-shadow-sm: 0 1px 2px rgba(9, 9, 11, .05);
  --en-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 8px 24px -8px rgba(9, 9, 11, .1);
  --bs-body-font-family: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-border-color: var(--en-border);
}

body {
  background: var(--en-bg);
  color: var(--en-text);
  font-family: var(--bs-body-font-family);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, h5, h6, .h5, .h6 { font-weight: 600; letter-spacing: -.015em; }

/* ---- Logo (same partial as the storefront) ------------------------------- */
.logo { display: inline-flex; align-items: center; gap: .55rem; line-height: 1; }
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(8, 145, 178, .25)); }
.logo-word { font-weight: 650; font-size: 1.15rem; letter-spacing: -.035em; color: var(--en-ink); }
.logo-word span { color: var(--en-cyan-600); }

/* ---- Shell -------------------------------------------------------------- */
.admin-sidebar {
  background: var(--en-surface);
  border-right: 1px solid var(--en-border);
  min-height: 100vh;
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
}
.admin-sidebar .nav-link {
  color: var(--en-text-muted);
  font-weight: 500;
  font-size: .92rem;
  border-radius: 9px;
  padding: .55rem .8rem;
  transition: background .15s ease, color .15s ease;
}
.admin-sidebar .nav-link:hover { background: #f4f4f5; color: var(--en-ink); }
.admin-sidebar .nav-link.active { background: var(--en-ink); color: #fff; }
.admin-sidebar .nav-link.active i { color: #67e8f9; }
.admin-sidebar .nav-link i { width: 20px; }
.admin-sidebar hr { border-color: var(--en-border) !important; opacity: 1; }

.admin-topbar {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--en-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.admin-wrap { display: flex; }
.admin-content { flex: 1; min-width: 0; }

.card-admin { background: var(--en-surface); border: 1px solid var(--en-border); border-radius: var(--en-radius); box-shadow: var(--en-shadow-sm); }
.stat-card { background: var(--en-surface); border: 1px solid var(--en-border); border-radius: var(--en-radius); padding: 1.25rem; box-shadow: var(--en-shadow-sm); }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--en-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.table-admin thead th { font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--en-text-muted); border-bottom-width: 1px; }
.table-admin td { vertical-align: middle; }
.thumb-sm { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; background: var(--en-bg); border: 1px solid var(--en-border); }

/* ---- Forms & buttons ------------------------------------------------------ */
.form-control, .form-select { border-color: var(--en-border); border-radius: var(--en-radius-sm); box-shadow: var(--en-shadow-sm); }
.form-control:focus, .form-select:focus { border-color: var(--en-cyan); box-shadow: 0 0 0 4px rgba(6, 182, 212, .15); }
.form-check-input:checked { background-color: var(--en-ink); border-color: var(--en-ink); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(6, 182, 212, .15); border-color: var(--en-cyan); }

.btn { border-radius: var(--en-radius-sm); font-weight: 500; }
.btn-en-primary {
  background: var(--en-ink);
  border: 1px solid var(--en-ink);
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(9, 9, 11, .2);
  transition: transform .15s var(--en-ease), background .15s ease, box-shadow .15s ease;
}
.btn-en-primary:hover, .btn-en-primary:focus-visible { background: var(--en-ink-700); border-color: var(--en-ink-700); color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px -6px rgba(9, 9, 11, .45); }
.btn-en-primary:active { transform: translateY(0); }

/* Legacy dropzone (product/category forms) */
.image-drop {
  border: 1.5px dashed var(--en-border-strong);
  border-radius: var(--en-radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--en-text-muted);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.image-drop:hover, .image-drop.is-dragover { border-color: var(--en-cyan); background: var(--en-cyan-50); }
.image-preview { width: 100%; max-width: 220px; border-radius: var(--en-radius); border: 1px solid var(--en-border); }

/* ---- Settings: dropzone with live preview --------------------------------- */
.dz-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.dz-label { font-size: .82rem; font-weight: 600; color: var(--en-ink); display: inline-flex; align-items: center; gap: .4rem; }
.dz-size {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #f4f4f5;
  border: 1px solid var(--en-border);
  color: var(--en-ink-700);
  white-space: nowrap;
}
.dz-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px dashed var(--en-border-strong);
  border-radius: 12px;
  background:
    linear-gradient(45deg, #f4f4f5 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #f4f4f5 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #f4f4f5 75%) 0 0 / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #f4f4f5 75%) 0 0 / 16px 16px,
    #fff;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--en-ease);
}
.dz-frame:hover { border-color: var(--en-cyan); box-shadow: 0 0 0 4px rgba(6, 182, 212, .1); }
.dz-frame.is-dragover { border-color: var(--en-cyan); background: var(--en-cyan-50); transform: scale(1.01); }
.dz-frame--mobile { max-height: 260px; width: auto; max-width: 100%; margin-inline: auto; }
.dz-frame:focus-within { border-color: var(--en-cyan); box-shadow: 0 0 0 4px rgba(6, 182, 212, .18); }

.dz-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dz-frame.is-new .dz-img { animation: dzIn .45s var(--en-ease); }
@keyframes dzIn { from { opacity: 0; transform: scale(1.04); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.dz-empty { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-align: center; padding: .75rem; pointer-events: none; }
.dz-empty-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--en-surface); border: 1px solid var(--en-border); box-shadow: var(--en-shadow-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--en-ink); margin-bottom: .25rem; }
.dz-empty-title { font-size: .8rem; font-weight: 600; color: var(--en-ink); }
.dz-empty-sub { font-size: .72rem; color: var(--en-text-muted); }
.dz-frame.has-image { border-style: solid; border-color: var(--en-border); }
.dz-frame.has-image .dz-empty { display: none; }

.dz-change {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .6rem;
  border-radius: 8px;
  background: rgba(9, 9, 11, .78);
  color: #fff;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s var(--en-ease);
  pointer-events: none;
}
.dz-frame.has-image:hover .dz-change { opacity: 1; transform: none; }
.dz-frame:not(.has-image) .dz-change { display: none; }

.dz-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-top: .4rem; min-height: 1.4rem; }
.dz-hint { font-size: .74rem; color: var(--en-text-muted); line-height: 1.35; }
.dz-hint.is-ok { color: #047857; }
.dz-hint.is-warn { color: #b45309; }
.dz-hint.is-error { color: var(--en-danger); font-weight: 500; }
.dz-remove { border: 0; background: none; padding: 0; font-size: .74rem; font-weight: 500; color: var(--en-danger); white-space: nowrap; }
.dz-remove:hover { text-decoration: underline; }

/* ---- Settings: slide cards ------------------------------------------------ */
.slide-counter {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .8rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--en-ink);
  color: #fff;
}
.slide-list { display: grid; gap: .9rem; }
.slide-card {
  border: 1px solid var(--en-border);
  border-radius: var(--en-radius);
  padding: 1rem;
  background: linear-gradient(180deg, #fff, #fcfcfd);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.slide-card:hover { box-shadow: var(--en-shadow); }
.slide-card.has-error { border-color: rgba(239, 68, 68, .5); box-shadow: 0 0 0 4px rgba(239, 68, 68, .08); }
.slide-card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; flex-wrap: wrap; }
.slide-num { font-weight: 600; font-size: .9rem; }
.slide-badge { font-size: .68rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--en-cyan-50); color: var(--en-cyan-600); border: 1px solid var(--en-cyan-100); }
.slide-actions { display: flex; gap: .3rem; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--en-border);
  background: var(--en-surface);
  color: var(--en-ink-700);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.icon-btn:hover:not(:disabled) { background: #f4f4f5; border-color: var(--en-border-strong); color: var(--en-ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #fecaca; color: var(--en-danger); }
.slide-errors { font-size: .8rem; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: .5rem .75rem; margin-bottom: .85rem; display: grid; gap: .15rem; }

.slide-media { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 1rem; align-items: start; }
@media (max-width: 767.98px) {
  .slide-media { grid-template-columns: 1fr; }
}

.slide-empty { display: flex; align-items: center; gap: .75rem; padding: 1.25rem; border: 1.5px dashed var(--en-border-strong); border-radius: var(--en-radius); color: var(--en-text-muted); font-size: .88rem; }
.slide-empty i { font-size: 1.5rem; color: var(--en-ink); }

.btn-add-slide {
  width: 100%;
  padding: .75rem;
  border-radius: var(--en-radius);
  border: 1.5px dashed var(--en-border-strong);
  background: transparent;
  color: var(--en-ink);
  font-weight: 600;
  font-size: .9rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-add-slide:hover:not(:disabled) { border-color: var(--en-cyan); background: var(--en-cyan-50); color: var(--en-cyan-600); }
.btn-add-slide:disabled { opacity: .45; cursor: not-allowed; }

.settings-savebar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: .75rem 0;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0), var(--en-bg) 35%);
}

/* ---- Login ----------------------------------------------------------------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(600px circle at 50% 0%, rgba(6, 182, 212, .14), transparent 60%),
    var(--en-bg);
}
.login-card { background: var(--en-surface); border: 1px solid var(--en-border); border-radius: 18px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 24px 48px -16px rgba(9, 9, 11, .16); }

@media (max-width: 991.98px) {
  .admin-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .25s var(--en-ease); height: 100vh; }
  .admin-sidebar.is-open { left: 0; box-shadow: 0 24px 48px rgba(9, 9, 11, .2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.logo-lg { gap: .7rem; margin-bottom: .5rem; }
.logo-lg .logo-mark { width: 42px; height: 42px; }
.logo-lg .logo-word { font-size: 1.6rem; }

/* ---- Language switcher (shared markup with the storefront) ---------------- */
.lang-switch-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  height: 36px; padding: 0 .65rem;
  border-radius: 10px; border: 1px solid var(--en-border); background: #fff;
  color: var(--en-ink); font-size: .8rem; font-weight: 600;
}
.lang-switch-btn:hover, .lang-switch-btn[aria-expanded="true"] { background: #f4f4f5; }
.lang-switch-code { font-family: "Geist Mono", ui-monospace, monospace; }
.lang-switch-caret { font-size: .65rem; opacity: .6; }
.lang-switch-menu { min-width: 11rem; padding: .35rem; border: 1px solid var(--en-border); border-radius: 12px; box-shadow: var(--en-shadow); font-size: .9rem; }
.lang-switch-menu .dropdown-item { display: flex; align-items: center; gap: .6rem; border-radius: 8px; padding: .5rem .6rem; color: var(--en-ink); }
.lang-switch-menu .dropdown-item:hover, .lang-switch-menu .dropdown-item.active { background: #f4f4f5; color: var(--en-ink); }
.lang-switch-menu .dropdown-item.active { font-weight: 600; }
.lang-switch-flag { font-family: "Geist Mono", ui-monospace, monospace; font-size: .68rem; font-weight: 600; width: 26px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; background: var(--en-ink); color: #67e8f9; }
.min-w-0 { min-width: 0; }

/* ---- English translation fields ------------------------------------------ */
.translation-card { border: 1px dashed var(--en-border-strong); background: linear-gradient(180deg, #fff, #fafafa); }
div.translation-card:not(.card-admin) { border-radius: 12px; padding: .9rem 1rem; }
.lang-chip {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .68rem; font-weight: 600;
  padding: .12rem .42rem;
  border-radius: 6px;
  background: var(--en-ink); color: #67e8f9;
}
.lang-chip-sm { font-size: .6rem; padding: .05rem .32rem; vertical-align: 1px; }
