/* =====================================================
   StableOSX – Public CSS
   Öffentliche Besucheransicht
===================================================== */

:root {
    --bg:           #0E0C07;
    --bg-2:         #130F07;
    --bg-card:      #1C1208;
    --bg-card-2:    #221508;
    --border:       #2C1F0E;
    --border-mid:   #5A3E10;
    --gold:         #C49A28;
    --gold-light:   #E8BF5A;
    --text-primary: #F5E6C0;
    --text-muted:   #8B6914;
    --text-dim:     #5A3E10;

    --green:        #1D9E75;
    --green-bg:     #0D3D2A;
    --green-border: #1D9E7560;
    --yellow:       #EF9F27;
    --yellow-bg:    #3A2C0A;
    --yellow-border:#EF9F2760;
    --red:          #E24B4A;
    --red-bg:       #2A0E0E;
    --red-border:   #E24B4A60;
    --purple:       #7F77DD;
    --purple-bg:    #1A1535;
    --purple-border:#7F77DD60;

    --radius:       6px;
    --radius-lg:    10px;
    --font:         Georgia, 'Times New Roman', serif;
    --font-ui:      system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- HEADER ---- */
.site-header {
    background: #0A0805;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-center { flex: 1; text-align: center; }
.header-right { display: flex; align-items: center; }

.back-btn {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: color 0.15s;
}
.back-btn:hover { color: var(--gold); }

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.logo-name {
    font-size: 17px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.logo-name em {
    font-style: normal;
    color: var(--gold);
}

.stable-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-login-btn {
    font-family: var(--font-ui);
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--border-mid);
    color: var(--gold);
    padding: 5px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    letter-spacing: 1px;
    transition: background 0.15s;
}
.admin-login-btn:hover { background: var(--bg-card); }

/* ---- HERO ---- */
.hero {
    background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-stats {
    display: flex;
    gap: 12px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    text-align: center;
    min-width: 80px;
}
.stat-card.stat-green { border-color: var(--green-border); background: var(--green-bg); }
.stat-card.stat-yellow { border-color: var(--yellow-border); background: var(--yellow-bg); }
.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card.stat-green .stat-num { color: var(--green); }
.stat-card.stat-yellow .stat-num { color: var(--yellow); }
.stat-label {
    font-family: var(--font-ui);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-muted);
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}
.dot-green   { background: var(--green); }
.dot-yellow  { background: var(--yellow); }
.dot-red     { background: var(--red); }
.dot-purple  { background: var(--purple); }

/* ---- MAIN CONTENT ---- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ---- SECTION ---- */
.stall-section { margin-top: 40px; }

.section-title {
    font-size: 13px;
    font-family: var(--font-ui);
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ---- BOX GRID ---- */
.box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* ---- BOX CARD ---- */
.box {
    border-radius: var(--radius-lg);
    border: 1px solid;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: default;
}
.box:hover { transform: translateY(-2px); }

.box-available   { background: var(--green-bg);  border-color: var(--green-border); }
.box-soon        { background: var(--yellow-bg); border-color: var(--yellow-border); }
.box-unavailable { background: var(--red-bg);    border-color: var(--red-border); }
.box-reserved    { background: var(--purple-bg); border-color: var(--purple-border); }

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.box-number {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.box-available   .box-number { color: var(--green); }
.box-soon        .box-number { color: var(--yellow); }
.box-unavailable .box-number { color: var(--red); }
.box-reserved    .box-number { color: var(--purple); }

.box-status-badge {
    font-family: var(--font-ui);
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.box-available   .box-status-badge { background: #1D9E7522; color: var(--green); }
.box-soon        .box-status-badge { background: #EF9F2722; color: var(--yellow); }
.box-unavailable .box-status-badge { background: #E24B4A22; color: var(--red); }
.box-reserved    .box-status-badge { background: #7F77DD22; color: var(--purple); }

.box-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.box-description {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ---- PRICING ---- */
.box-pricing {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-muted);
}
.price-base  { }
.price-extra { font-size: 11px; }
.price-total {
    border-top: 1px solid var(--border);
    padding-top: 4px;
    margin-top: 2px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.box-available-from {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--yellow);
}
.box-reserved-note {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--purple);
    font-style: italic;
}

/* ---- BUTTONS ---- */
.btn-contact {
    font-family: var(--font-ui);
    font-size: 12px;
    background: var(--gold);
    color: #0A0805;
    border: none;
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    width: 100%;
    margin-top: auto;
    transition: background 0.15s, transform 0.1s;
}
.btn-contact:hover { background: var(--gold-light); }
.btn-contact:active { transform: scale(0.97); }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}
.empty-state svg { margin-bottom: 20px; opacity: 0.5; }
.empty-state p { font-family: var(--font-ui); font-size: 14px; }

.no-boxes { font-family: var(--font-ui); font-size: 13px; color: var(--text-dim); }

/* ---- MODAL ---- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(2px);
}
.modal-box {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: var(--text-primary);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: color 0.15s;
}
.modal-close:hover { color: var(--text-primary); }

#contactFormWrap { padding: 20px; }

.contact-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-card-2);
    border-radius: var(--radius);
}
.contact-info a {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--gold);
    text-decoration: none;
}
.contact-info a:hover { text-decoration: underline; }

/* ---- FOOTER ---- */
.site-footer {
    background: #0A0805;
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-left { display: flex; gap: 16px; }
.footer-link {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
}
.footer-link:hover { color: var(--text-muted); }
.footer-right {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}
.footer-right a { color: var(--gold); text-decoration: none; }

/* ---- FORMS (shared) ---- */
.setup-form { display: flex; flex-direction: column; gap: 14px; }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-row    { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

label {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea {
    background: var(--bg);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    width: 100%;
    transition: border-color 0.15s;
}
input:focus, textarea:focus {
    border-color: var(--gold);
}
textarea { resize: vertical; min-height: 80px; }

.btn-primary {
    background: var(--gold);
    color: #0A0805;
    border: none;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.3px;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

#contactMsg {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 13px;
}
#contactMsg.success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
#contactMsg.error   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-border); }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .hero-inner { flex-direction: column; align-items: flex-start; }
    .header-center { display: none; }
    .form-row { flex-direction: column; }
    .box-grid { grid-template-columns: 1fr 1fr; }
}
/* Theme-Überschreibungen (durch Admin konfigurierbar) */
