/* app.kemp.gr — ένα αρχείο, χωρίς CDN, χωρίς framework. */

:root {
  --ink:     #16324F;
  --cyan:    #2A9FC4;
  --red:     #DC4A45;
  --green:   #57AE4E;
  --yellow:  #EDAF1B;
  --orange:  #E9782F;

  --bg:      #F2F6F9;
  --surface: #FFFFFF;
  --line:    #DDE5EC;
  --muted:   #6B7F92;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

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

.ribbon { display: flex; height: 4px; }
.ribbon span { flex: 1; }
.ribbon .r1 { background: var(--cyan); }
.ribbon .r2 { background: var(--red); }
.ribbon .r3 { background: var(--green); }
.ribbon .r4 { background: var(--yellow); }
.ribbon .r5 { background: var(--orange); }

/* =====================================================================
   Οθόνες χωρίς σύνδεση (login, activate)
   ===================================================================== */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22,50,79,.06), 0 12px 32px rgba(22,50,79,.10);
  overflow: hidden;
}

.card-body { padding: 32px 28px 28px; }

.brand { display: block; max-width: 230px; height: auto; margin: 0 auto 22px; }

.brand-text { text-align: center; margin: 0 0 22px; line-height: 1.25; }
.brand-text b { display: block; font-size: 18px; letter-spacing: .04em; }
.brand-text i { display: block; font-style: normal; font-size: 18px; font-weight: 700;
                letter-spacing: .04em; color: var(--cyan); }

h1 {
  font-size: 15px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
  text-align: center; margin: 0 0 22px;
}

.lead { font-size: 14px; color: var(--muted); margin: -12px 0 20px; text-align: center; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;              /* <16px κάνει zoom στο iOS */
  color: var(--ink);
  background: #FBFDFE;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input:focus {
  outline: none; background: #fff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(42,159,196,.18);
}

input.code {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 19px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 16px; }
.hint  { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

button, .btn {
  display: block; width: 100%;
  margin-top: 8px; padding: 12px;
  font: inherit; font-size: 15px; font-weight: 600;
  color: #fff; background: var(--ink);
  border: none; border-radius: 9px;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .08s;
}
button:hover, .btn:hover { background: #1E4368; }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(42,159,196,.5); outline-offset: 2px;
}

.msg {
  padding: 11px 13px; margin-bottom: 18px;
  font-size: 14px; border-radius: 0 8px 8px 0;
}
.msg-error { background: #FDF0EF; border-left: 3px solid var(--red);   color: #8C2E2A; }
.msg-ok    { background: #EFF7EE; border-left: 3px solid var(--green); color: #2F6A29; }
.msg-info  { background: #EDF6FA; border-left: 3px solid var(--cyan);  color: #14566B; }

.alt {
  margin: 18px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted); text-align: center;
}

.foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* =====================================================================
   Οθόνη προγράμματος
   ===================================================================== */

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }

.topbar-in {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
}

.topbar img { height: 34px; width: auto; }

.who { flex: 1; min-width: 0; }
.who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { display: block; font-size: 12px; color: var(--muted); }

.logout {
  flex: none; width: auto; margin: 0; padding: 7px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--ink); background: transparent;
  border: 1.5px solid var(--line); border-radius: 8px;
  text-decoration: none;
}
.logout:hover { background: #F6FAFC; color: var(--ink); }

main { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }

/* Πλοήγηση εβδομάδας */
.weeknav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.weeknav .range {
  flex: 1; text-align: center;
  font-size: 15px; font-weight: 600;
}
.weeknav .range small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

.nav-btn {
  width: 42px; height: 42px; flex: none; margin: 0; padding: 0;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 600;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px;
  text-decoration: none;
}
.nav-btn:hover { background: #F6FAFC; color: var(--ink); }
.nav-btn.off { opacity: .35; pointer-events: none; }

.today-link {
  display: inline-block; width: auto; margin: 0 0 14px; padding: 0;
  background: none; color: var(--cyan);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.today-link:hover { background: none; text-decoration: underline; }

/* Ημέρα */
.day { margin-bottom: 18px; }

.day-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 0 2px 7px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.day.is-today .day-head { color: var(--cyan); }
.day-head .count { margin-left: auto; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* Ραντεβού */
.appt {
  display: flex; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 11px;
  padding: 11px 13px;
  margin-bottom: 7px;
}

.appt .time {
  flex: none; width: 52px;
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.appt .time small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

.appt .body { flex: 1; min-width: 0; }
.appt .who-name { font-size: 15.5px; font-weight: 600; }
.appt .meta { font-size: 13px; color: var(--muted); margin-top: 1px; }

.tag {
  display: inline-block; margin-top: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.tag-done { background: #EFF7EE; color: #2F6A29; }
.tag-off  { background: #FDF0EF; color: #8C2E2A; }

.appt.is-done   { border-left-color: var(--green); }
.appt.is-off    { border-left-color: var(--red); background: #FCFDFD; }
.appt.is-off .who-name,
.appt.is-off .time,
.appt.is-off .meta { text-decoration: line-through; color: var(--muted); }
.appt.is-off .who-name { font-weight: 500; }

.empty {
  padding: 11px 13px; margin-bottom: 7px;
  font-size: 14px; color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line); border-radius: 11px;
}

.synced { margin-top: 26px; font-size: 12.5px; color: var(--muted); text-align: center; }

@media (min-width: 560px) {
  .card-body { padding: 36px 34px 32px; }
  .appt .time { width: 58px; }
}

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