/* ===================== Admin Theme (Light / Dark) ===================== */
/* Tokens */
:root{
  --accent: #f59e0b;         /* gold */
}

html[data-admin-theme="light"]{
  --text:   #0f172a;
  --muted:  #64748b;
  --panel-bg: rgba(255,255,255,.88);
  --panel-border: #e8edf2;
  --panel-shadow: 0 8px 24px rgba(0,0,0,.08);
  --cta-bg: #111827;
  --cta-text:#ffffff;
  --chip-bg: rgba(255,255,255,.85);
  --chip-text:#111827;
  --field-bg:#ffffff;
  --field-bd:#e5e7eb;
  --field-ph:#94a3b8;
}

html[data-admin-theme="dark"]{
  --text:   #e5e7eb;
  --muted:  #9aa6b2;
  --panel-bg: rgba(17,24,39,.78);
  --panel-border: #334155;
  --panel-shadow: 0 8px 24px rgba(0,0,0,.5);
  --cta-bg: #22c55e;
  --cta-text:#062a12;
  --chip-bg: rgba(17,24,39,.7);
  --chip-text:#e5e7eb;
  --field-bg:#0b1220;
  --field-bd:#334155;
  --field-ph:#95a0af;
}

/* Διακριτικό σκοτείνιασμα μόνο στο Dark πάνω από την εικόνα του dashboard */
html[data-admin-theme="dark"] body::before{
  content:""; position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  pointer-events:none; z-index:0;
}
html[data-admin-theme="dark"] body>*{ position:relative; z-index:1; }

/* Τίτλοι/κείμενα */
h1,h2,h3{ color: var(--text); }
em,strong,mark{ color: var(--accent); }

/* Panels / Cards – εφαρμόζεται σε υπάρχουσες containers */
.dashboard-container,
.product-management-container,
.orders-container,
.reviews-container,
.search-orders-container,
.card,.panel{
  background: var(--panel-bg);
  border:1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(4px);
}

/* Inputs / Selects / Textareas */
input[type="text"],input[type="search"],input[type="number"],
select, textarea{
  background: var(--field-bg);
  color: var(--text);
  border:1px solid var(--field-bd);
  border-radius:10px;
  padding:10px 12px;
}
::placeholder{ color: var(--field-ph); }
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:#6abf69;
  box-shadow: 0 0 0 4px rgba(16,185,129,.15);
}

/* Buttons (defaults) */
button, input[type="submit"]{
  background: var(--cta-bg);
  color: var(--cta-text);
  border:1px solid transparent;
  border-radius:10px;
  padding:10px 14px;
  cursor:pointer;
  transition:filter .15s ease, transform .06s ease;
}
button:hover, input[type="submit"]:hover{ filter:brightness(1.03); }
button:active, input[type="submit"]:active{ transform: translateY(1px); }

/* Tables (ενιαία αισθητική) */
table{ width:100%; border-collapse:separate; border-spacing:0; }
thead th{
  background: color-mix(in hsl, var(--panel-bg) 85%, #000 6%);
  color: var(--text); font-weight:700;
  border-bottom:1px solid var(--panel-border);
}
tbody tr:nth-child(even) td{
  background: color-mix(in hsl, var(--panel-bg) 92%, #000 6%);
}
td,th{ padding:12px 14px; }
tbody tr + tr td{ border-top:1px solid var(--panel-border); }

/* Chip (κουμπί theme) */
.theme-toggle{
  position:fixed; top:16px; right:16px; z-index:9999;
  display:inline-flex; align-items:center; gap:6px;
  background: var(--chip-bg); color: var(--chip-text);
  border:1px solid color-mix(in hsl, var(--chip-bg) 60%, #000 20%);
  border-radius:999px; padding:8px 10px; user-select:none; backdrop-filter:blur(4px);
}
.theme-toggle .icon{ font-size:14px; }

/* Notices */
.notice{ padding:10px 14px; border-radius:8px; margin:10px 0; }
.notice--success{ background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46; }
.notice--error{   background:#fef2f2; border:1px solid #fecaca; color:#991b1b; }

.theme-toggle { gap: 0; padding: 6px 8px; }

/* --- Fix: Theme toggle πάντα πάνω-δεξιά --- */
html .theme-toggle{
  position: fixed !important;   /* αγνοεί τα layout της σελίδας */
  top: 12px !important;
  right: 16px !important;
  left: auto !important;         /* ακυρώνει τυχόν κανόνες left */
  transform: none !important;
  z-index: 99999;                /* πάνω απ’ όλα */
}

/* (προαιρετικό) μόνο εικονίδιο, χωρίς κείμενο */
html .theme-toggle #themeLabel{
  display: none !important;
}

/* (προαιρετικό) responsive μικρό περιθώριο σε κινητά */
@media (max-width: 640px){
  html .theme-toggle{ top: 10px !important; right: 10px !important; }
}
/* === Πάντα πάνω-δεξιά: κουμπί theme + σπίτι === */

/* Κουμπί Dark/Light – σταθερό, λίγο αριστερά από το σπίτι */
html .theme-toggle{
  position: fixed !important;
  top: 12px !important;
  right: 64px !important;      /* αφήνουμε χώρο για το σπίτι δεξιά */
  left: auto !important;
  transform: none !important;
  z-index: 99998;
}

/* Προαιρετικά: μόνο εικονίδιο (χωρίς label) */
html .theme-toggle #themeLabel{ display:none !important; }

/* Σπίτι – πάντα πιο δεξιά από το κουμπί, ίδιο ύψος */
html .admin-home,
html .home-link{                 /* αν ήδη χρησιμοποιείς .home-link */
  position: fixed !important;
  top: 12px !important;
  right: 16px !important;       /* πιο δεξιά από το theme-toggle */
  z-index: 99999 !important;
  text-decoration: none;
  line-height: 1;
  font-size: 24px;              /* ρύθμισε αν θες μεγαλύτερο/μικρότερο */
}

/* Μικρή προσαρμογή για κινητά */
@media (max-width: 640px){
  html .theme-toggle{ top: 10px !important; right: 56px !important; }
  html .admin-home, html .home-link{ top: 10px !important; right: 10px !important; }
}
/* Πάντα πάνω απ’ όλα και κλικαριστό */
.theme-toggle{
  position: fixed;
  top: 12px;
  right: 64px;                 /* αφήνει χώρο για το σπίτι δεξιά */
  z-index: 2147483647 !important; /* maximum stacking */
  pointer-events: auto;
  transform: translateZ(0);    /* αποφυγή GPU layers που “σκεπάζουν” */
}

/* Αν έχεις σταθερό εικονίδιο "σπίτι" δίπλα του */
.admin-home-fixed{
  position: fixed;
  top: 12px;
  right: 12px;                 /* δεξιά από το toggle */
  z-index: 2147483647 !important;
  pointer-events: auto;
  transform: translateZ(0);
}
/* -------- Fix for inputs in DARK so text is visible -------- */
html[data-admin-theme="dark"] input,
html[data-admin-theme="dark"] select,
html[data-admin-theme="dark"] textarea {
  background-color: #0f172a !important;  /* σκοτεινό bg για φόρμες */
  color: #e5e7eb !important;             /* ανοιχτό κείμενο */
  border-color: #374151 !important;
}

/* placeholders να φαίνονται σε dark */
html[data-admin-theme="dark"] input::placeholder,
html[data-admin-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* readonly/disabled να μην «σβήνουν» */
html[data-admin-theme="dark"] input[readonly],
html[data-admin-theme="dark"] input:disabled,
html[data-admin-theme="dark"] textarea[readonly],
html[data-admin-theme="dark"] textarea:disabled {
  background-color: #111827 !important;
  color: #cbd5e1 !important;
}

/* (προαιρετικό) κουμπί submit να είναι ευανάγνωστο σε dark */
html[data-admin-theme="dark"] input[type="submit"],
html[data-admin-theme="dark"] button[type="submit"] {
  color: #0b1220 !important;
  background: #22c55e !important;
  border-color: transparent !important;
}

