/* Shared styles for the public page and the staff (admin) page.
   Kurban Travel branding: navy #002060, Kurban blue #0f76bc, Roboto. */
:root {
  --bg: #f3f6fa;
  --card: #ffffff;
  --text: #14213d;
  --muted: #5b6678;
  --line: #dbe2ec;
  --brand: #002060;
  --brand-dark: #001a52;
  --accent: #0f76bc;
  --brand-ink: #ffffff;
  --link: #0f76bc;
  --entry: #b42318;
  --entry-bg: #fdecea;
  --ok: #157f3b;
  --ok-bg: #e7f6ec;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151a;
    --card: #1a2027;
    --text: #e8edf2;
    --muted: #9aa7b4;
    --line: #2c3540;
    --brand: #002060;
    --brand-dark: #001a52;
    --accent: #3d9ad8;
    --link: #6cb6ea;
    --entry: #ff8a80;
    --entry-bg: #3a1d1b;
    --ok: #6fd393;
    --ok-bg: #16301f;
    --warn: #ffc266;
    --warn-bg: #352812;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
a { color: var(--link); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* Header */
.top { background: var(--brand); color: var(--brand-ink); border-bottom: 4px solid var(--accent); }
.logo { height: 34px; width: auto; display: block; }
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--brand-ink); text-decoration: none; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { font-weight: 700; font-size: 18px; }
.brand span { display: block; font-weight: 400; font-size: 13px; opacity: .85; }
.top a, .top button.linkish { color: var(--brand-ink); }
.top-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }

h1 { font-size: 26px; margin: 28px 0 6px; color: var(--brand); font-weight: 700; }
@media (prefers-color-scheme: dark) { h1 { color: var(--text); } }
h2 { font-size: 18px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.meta { font-size: 14px; color: var(--muted); }

/* Cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 10px; }
.item { border-left-color: var(--accent); }
.item.entry { border-left-color: var(--entry); }
.item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.item-name { font-weight: 700; font-size: 16px; }
.item-time { color: var(--muted); font-size: 13px; }
.item-note { margin: 6px 0 8px; }
.item-links { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--entry-bg); color: var(--entry); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 20px 0 16px; }
.controls input[type="search"] { flex: 1 1 260px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { min-height: 70px; resize: vertical; }
label.check { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.controls select { width: auto; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
button {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px;
  padding: 8px 16px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
}
button.secondary { background: transparent; color: var(--link); border-color: var(--line); }
button.danger { background: transparent; color: var(--entry); border-color: var(--line); }
button.linkish { background: none; border: none; padding: 0; font-weight: 400; text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
input:disabled, textarea:disabled, select:disabled { opacity: .75; }

.msg { font-size: 14px; padding: 8px 12px; border-radius: 8px; margin-top: 10px; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.err { background: var(--entry-bg); color: var(--entry); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }

/* Status tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 16px; font-weight: 700; }
.tile .value.ok { color: var(--ok); }
.tile .value.bad { color: var(--entry); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 600; }

.login { max-width: 380px; margin: 48px auto; }
.foot { color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
.mt { margin-top: 14px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.off { display: none !important; }
a.button {
  display: inline-block; font-weight: 600; text-decoration: none; border-radius: 8px;
  padding: 8px 16px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
}
.choices label.check { display: flex; margin: 4px 0; white-space: normal; }
.tagline { font-size: 13px; opacity: .85; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.35); }
@media (max-width: 520px) { .tagline { display: none; } }
