:root {
  /* Temno modra shema (Marcelino Technologies) */
  --gold: #1b4fa0;   /* poudarjena modra */
  --gold-d: #143a73; /* temno modra – gumbi, naslovi */
  --green: #0d2a52;  /* najtemnejša modra – glava */
  --orange: #f37021; /* poudarek (kot ševroni v logu) */
  --bg: #eef2f7;
  --ink: #16233a; --muted: #6b7890; --line: #d8e0ec; --card: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
}
header {
  background: linear-gradient(120deg, var(--green), var(--gold-d));
  color: #fff; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between;
}
header h1 { margin: 0; font-family: Georgia, serif; font-size: 22px; letter-spacing: .5px; }
.brand { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.logo { height: 40px; width: auto; background: #fff; padding: 13px 32px; border-radius: 10px; display: block; box-shadow: 0 2px 12px rgba(0,0,0,.14); }
.logo.logo-admin { height: 40px; padding: 13px 32px; }
header .sub { opacity: .85; font-size: 13px; }
/* Jezikovni izbirnik (glava): odprt spustni meni temno moder, da je beli tekst viden. */
#uiLang option { background: var(--green); color: #fff; }
#uiLang:focus { outline: 2px solid var(--orange); }
/* Gumb v glavi (Nastavitve / Nazaj) */
.admin-link {
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
  padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background .2s, transform .1s; white-space: nowrap;
}
.admin-link:hover { background: rgba(255,255,255,.3); }
.admin-link:active { transform: translateY(1px); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 24px; }

.steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.steps button {
  flex: 1; min-width: 140px; border: none; background: #ece6d8; color: var(--muted);
  padding: 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.steps button.active { background: var(--gold-d); color: #fff; }
.steps button:disabled { opacity: .5; cursor: not-allowed; }

/* Izbirnik kanalov (E-pošta / SMS / Viber / Telegram …) */
.chrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.chbtn {
  border: 1px solid var(--line); background: #fbf9f3; color: var(--ink);
  padding: 9px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.chbtn.active { background: var(--gold-d); color: #fff; border-color: var(--gold-d); }
.chbtn:disabled { opacity: .45; cursor: not-allowed; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.card h2 { margin: 0 0 4px; font-family: Georgia, serif; color: var(--gold-d); }
.card p.hint { color: var(--muted); margin: 0 0 16px; font-size: 14px; }

label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=number], input[type=password], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }

.btn {
  background: var(--gold-d); color: #fff; border: none; padding: 13px 22px;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--gold); }
.btn.ghost { background: #ece6d8; color: var(--gold-d); }
.btn:disabled { opacity: .5; cursor: progress; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }

.dropzone {
  border: 2px dashed var(--gold); border-radius: 12px; padding: 28px; text-align: center;
  color: var(--muted); cursor: pointer; background: #fbf9f3;
}
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.preview iframe { width: 100%; height: 560px; border: none; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.tag { background: #e7eefb; color: var(--gold-d); padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.status-sent { color: var(--green); font-weight: 600; }
.status-error { color: #b1432f; font-weight: 600; }
.status-odjavljen { color: #8a8475; font-weight: 600; }

.log { font-family: ui-monospace, monospace; font-size: 13px; background: #1c1b17; color: #d8e8c0;
  padding: 14px; border-radius: 10px; min-height: 60px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff6; border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }

/* ----- Uvodna animacija (splash) ----- */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(120deg, #0b2444, #143a73 60%, #1b4fa0);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  animation: splashOut 1.1s ease 5.2s forwards;
}
#splash .si { text-align: center; }
#splash .slogo {
  position: relative; overflow: hidden;
  display: inline-block; background: #fff; padding: 24px 40px; border-radius: 16px;
  box-shadow: 0 14px 50px rgba(0,0,0,.4); opacity: 0; transform: scale(.92);
  animation: sCard 1s cubic-bezier(.2,.8,.2,1) .3s forwards;
}
/* Pravi logo se razkrije od leve proti desni (počasi, elegantno) */
#splash .mlogo {
  height: 64px; display: block;
  -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0);
  animation: sWipe 2.2s cubic-bezier(.25,.8,.25,1) .8s forwards;
}
/* Svetlobni odsev, ki potuje čez logo */
#splash .shine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%);
  transform: translateX(-160%); opacity: 0;
  animation: sShine 1.4s ease 2.6s forwards;
}
#splash .sline { height: 3px; width: 0; background: #f37021; margin: 24px auto 0; border-radius: 3px; animation: sLine 1.1s ease 3.4s forwards; }
#splash .stag { color: #fff; opacity: 0; margin-top: 18px; letter-spacing: 3px; font-size: 14px; text-transform: uppercase; animation: sFade 1.1s ease 4.1s forwards; }
#splash .sskip { display: none; }

@keyframes sCard { to { opacity: 1; transform: scale(1); } }
@keyframes sWipe { to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } }
@keyframes sShine { 0% { transform: translateX(-160%); opacity: .9; } 100% { transform: translateX(320%); opacity: 0; } }
@keyframes sLine { to { width: 240px; } }
@keyframes sFade { to { opacity: .92; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
#splash.gone { display: none; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--green); color: #fff;
  padding: 14px 20px; border-radius: 10px; box-shadow: 0 6px 20px #0003; }
.checkcell { width: 36px; text-align: center; }
small.muted { color: var(--muted); }

/* ----- Mobilna odzivnost ----- */
@media (max-width: 680px) {
  header { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  header > div { flex-wrap: wrap; gap: 8px !important; }
  .logo { height: 28px; padding: 8px 14px; }
  #uiLang { padding: 7px 8px !important; font-size: 12px !important; }
  .wrap { padding: 14px; }
  .steps button { min-width: 0; flex: 1 1 46%; font-size: 13px; padding: 10px 6px; }
  .card { padding: 16px; }
  .preview iframe { height: 420px; }
  .row { gap: 8px; }
  /* tabele naj se vodoravno premikajo namesto da prelijejo postavitev */
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-link { padding: 7px 10px; font-size: 12px; }
  input, textarea, select { font-size: 16px; } /* prepreči zoom na iOS */
}
