/* =====================================================================
   Holistic Horizons — κοινό stylesheet
   ===================================================================== */

:root {
  --ink:         #14201e;
  --ink-soft:    #33433f;
  --paper:       #faf8f3;
  --surface:     #ffffff;
  --accent:      #a8762c;
  --accent-tint: #f3ead8;
  --muted:       #6b7975;
  --line:        #e4e1d7;
  --line-strong: #cfcabb;
  --danger:      #9c3226;
  --danger-tint: #fbeeec;
  --ok:          #2e6b4f;

  --display: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

/* --- Λογότυπο / κεφαλίδα ------------------------------------------- */

.brand {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.brand em {
  font-style: normal;
  color: var(--accent);
}

/* --- Auth σελίδες --------------------------------------------------- */

.auth-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 56px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-head {
  text-align: center;
  margin-bottom: 28px;
}

.auth-head .brand { font-size: 22px; }

.auth-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}

/* --- Καρτέλες σύνδεσης / εγγραφής ----------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  margin-bottom: 20px;
}

.tabs button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  font: 500 14px/1 var(--sans);
  color: var(--muted);
  padding: 9px 0;
  border-radius: 7px;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 32, 30, 0.09);
}

/* --- Φόρμες --------------------------------------------------------- */

.field { margin-bottom: 15px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  font: 16px/1.4 var(--sans);   /* 16px = δεν κάνει zoom το iOS Safari */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 12px;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 6px 0 0;
}

button.primary {
  width: 100%;
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: 600 15px/1 var(--sans);
  padding: 13px 0;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
}

button.primary:hover { background: #0c1513; }

button.primary:disabled {
  opacity: 0.5;
  cursor: default;
}

button.link {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent);
  font: 14px/1 var(--sans);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.below {
  text-align: center;
  margin: 16px 0 0;
  font-size: 14px;
}

/* --- Μηνύματα ------------------------------------------------------- */

.msg {
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.msg.show { display: block; }

.msg.error {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid #f0d5d1;
}

.msg.ok {
  background: #eef5f1;
  color: var(--ok);
  border: 1px solid #cfe4d8;
}

.msg.info {
  background: var(--accent-tint);
  color: #6d4b17;
  border: 1px solid #e6d6b8;
}

/* --- Turnstile ------------------------------------------------------ */

.captcha {
  margin: 4px 0 16px;
  min-height: 66px;
  display: flex;
  justify-content: center;
}

/* --- Εφαρμογή (app.html) -------------------------------------------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-in {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.who {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 70px;
}

h2.course {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 34px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

h2.course:first-of-type { margin-top: 6px; }

/* --- Λίστα μαθημάτων ------------------------------------------------ */

.lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}

.lessons li + li { border-top: 1px solid var(--line); }

.lesson {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 15px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.lesson:hover { background: #fcfbf8; }

/* Η γραμμή προόδου ζει ΜΕΣΑ στη γραμμή του μαθήματος,
   ως λεπτή ώχρα βάση — όχι ως ξεχωριστό στοιχείο. */
.lesson .bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.lesson .idx {
  flex: none;
  width: 26px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

.lesson .body { flex: 1; min-width: 0; }

.lesson .title {
  font-size: 15px;
  font-weight: 500;
  display: block;
}

.lesson .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  display: block;
}

.lesson .tick {
  flex: none;
  font-size: 15px;
  color: var(--ok);
  width: 18px;
  text-align: center;
}

/* --- Player --------------------------------------------------------- */

.player-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.player-head h1 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  flex: 1;
}

.frame {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: 11px;
  overflow: hidden;
}

.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-foot {
  margin-top: 13px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* --- Καταστάσεις ---------------------------------------------------- */

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}

.empty strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
}

.loading {
  color: var(--muted);
  font-size: 14px;
  padding: 30px 0;
  text-align: center;
}

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