/* ============================================================
   Samiii Official - Comtreffen 2027
   Beige/Braun, warm und einfach, mobil zuerst
   ============================================================ */

:root {
    --bg:        #efe6d6;
    --card:      #fdf9f1;
    --line:      #e0d3bd;
    --ink:       #4a3626;
    --ink-soft:  #5a4634;
    --muted:     #8a755e;
    --accent:    #6b4f3a;
    --accent-hi: #8a6547;
    --ok-bg:     #eaf0e2;
    --ok-ink:    #4c6236;
    --err-bg:    #f6e4dc;
    --err-ink:   #8c4a32;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(circle at 20% 0%, #f6efe1 0%, var(--bg) 60%);
    color: var(--ink-soft);
    font: 16px/1.7 Verdana, Geneva, Arial, sans-serif;
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Kopf */
.site-head { text-align: center; padding: 16px 0 24px; }
.site-head .logo { max-width: 180px; height: auto; }
.eyebrow {
    margin: 12px 0 0;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

/* Karte */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 10px 30px rgba(74, 54, 38, 0.08);
}
.card.center { text-align: center; }

h1 {
    margin: 0 0 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 30px;
    line-height: 1.25;
    color: var(--ink);
    font-weight: normal;
}
h2 {
    margin: 28px 0 8px;
    font-family: Georgia, serif;
    font-size: 20px;
    color: var(--ink);
    font-weight: normal;
}
.intro { font-size: 17px; }

/* Formular */
form { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 540px) { .grid-2 { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; text-align: left; }
.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--ink);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--accent-hi);
    outline-offset: 1px;
    border-color: var(--accent-hi);
}
.field textarea { resize: vertical; }

fieldset.companion {
    margin: 0 0 18px;
    padding: 14px 16px 0;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: #faf5ea;
}
fieldset.companion legend {
    padding: 0 8px;
    font-family: Georgia, serif;
    font-size: 15px;
    color: var(--muted);
}

.field-check label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
}
.field-check input { margin-top: 3px; flex: none; }

.err { margin: 6px 0 0; font-size: 13px; color: var(--err-ink); }
.hint { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Honeypot unsichtbar, aber nicht display:none (manche Bots erkennen das) */
.hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Buttons: einheitliche Hoehe fuer <button> und <a>, egal ob gefuellt
   oder Ghost. Alle Varianten tragen denselben 1px-Rand, die Ausrichtung
   uebernimmt inline-flex. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: #fdf9f1;
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s ease, border-color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-ghost {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-ghost:hover, .btn-ghost:focus-visible { background: rgba(107, 79, 58, 0.08); border-color: var(--accent); }

/* Abstand nur dort, wo Buttons direkt aufeinander folgen */
.btn + .btn { margin-left: 8px; }
.card.center form + .btn-ghost,
.card.center .countdown + .btn-ghost { margin-top: 12px; }

/* Hinweise */
.notice {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 0 0 18px;
    font-size: 15px;
}
.notice-ok  { background: var(--ok-bg);  color: var(--ok-ink); }
.notice-error { background: var(--err-bg); color: var(--err-ink); }

/* Countdown */
.countdown { margin: 32px 0 24px; }
.countdown-label {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}
.countdown-units {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.countdown-units div {
    min-width: 74px;
    padding: 12px 8px;
    background: #f5eddd;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.countdown-units span {
    display: block;
    font-family: Georgia, serif;
    font-size: 30px;
    color: var(--ink);
}
.countdown-units small { color: var(--muted); font-size: 12px; }

/* Fusszeile */
.site-foot { text-align: center; margin-top: 28px; font-size: 13px; }
.site-foot a { color: var(--muted); }

/* ============================================================
   Administration
   ============================================================ */

.wrap-wide { max-width: 1180px; }

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.admin-bar h1 { font-size: 24px; margin: 0; }
.admin-bar .who { font-size: 13px; color: var(--muted); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}
.stat b { display: block; font-family: Georgia, serif; font-size: 26px; color: var(--ink); }
.stat small { color: var(--muted); }
.stat-hi { background: #f5eddd; border-color: var(--accent-hi); }
.stat-hi b { color: var(--accent); font-size: 30px; }

.section-head {
    margin: 32px 0 4px;
    font-family: Georgia, serif;
    font-size: 22px;
    color: var(--ink);
    font-weight: normal;
}
.section-note { margin: 0 0 14px; font-size: 14px; color: var(--muted); }

.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.toolbar input[type="text"], .toolbar select {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}
.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
    font-family: inherit;
    border-radius: 8px;
}
.btn-danger { background: #9a4a32; border-color: #9a4a32; }
.btn-danger:hover, .btn-danger:focus-visible { background: #b05a3e; border-color: #b05a3e; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f5eddd; color: var(--ink); font-weight: normal; font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td .msg { max-width: 220px; font-size: 13px; color: var(--muted); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}
.badge-reg  { background: #f0e4cc; color: #7d6640; }
.badge-mail { background: #e2ecf4; color: #3d617e; }
.badge-att  { background: var(--ok-bg); color: var(--ok-ink); }
.badge-acc  { background: var(--ok-bg); color: var(--ok-ink); }
.badge-dec  { background: var(--err-bg); color: var(--err-ink); }
.badge-pen  { background: #f0e4cc; color: #7d6640; }
.badge-unsub { background: #e8e2d6; color: #756a58; text-decoration: line-through; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; display: inline-flex; }
.btn-xs {
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    border-radius: 7px;
    white-space: nowrap;
}

/* Login */
.login-card { max-width: 420px; margin: 0 auto; }

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