* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    color: #fff;
    background: url('assets/bg.jpg') center/cover fixed no-repeat, #1a1a2e;
}

.overlay {
    position: fixed; inset: 0;
    background: rgba(10, 10, 30, 0.55);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.container.wide { max-width: 1100px; }

.hero { text-align: center; margin-bottom: 28px; }
.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    margin: 0 0 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.subtitle, .description {
    font-size: 15px;
    line-height: 1.6;
    color: #eaeaf5;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.description { margin-top: 12px; }

.card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
.card h2 { margin: 0 0 16px; font-size: 20px; font-weight: 600; }

label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: #d5d5e8;
}
input, select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.92);
    color: #111;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
    border-color: #7c5cff;
    box-shadow: 0 0 0 3px rgba(124,92,255,0.35);
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    color: #fff;
    transition: transform .12s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #7c5cff, #b06cff); }
.btn.danger  { background: linear-gradient(135deg, #e74c5c, #ff7a5c); }
.btn.small   { padding: 6px 12px; font-size: 13px; }

.result { margin-top: 14px; font-size: 15px; min-height: 22px; }
.result.ok    { color: #9be89b; }
.result.error { color: #ff9b9b; }
.result .small { font-size: 13px; color: #ccc; }

.hint { font-size: 13px; color: #c2c2dd; margin: 0 0 12px; }
.footer { text-align: center; margin-top: 30px; color: #c2c2dd; font-size: 14px; }
.footer a { color: #b8a6ff; }

body.admin { background: #14141f; }
body.admin .overlay { display: none; }

.admin-bar {
    display: flex; flex-wrap: wrap; gap: 10px;
    align-items: center; margin-bottom: 16px;
}
.admin-bar input { width: auto; flex: 1 1 200px; margin: 0; }
.stats { margin-left: auto; color: #c2c2dd; font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
th { background: rgba(255,255,255,0.06); font-weight: 600; }
tr.row-cancelled td { color: #888; text-decoration: line-through; text-decoration-color: #555; }
tr.row-cancelled td button { text-decoration: none; }
.small { font-size: 12px; color: #aaa; }

@media (max-width: 500px) {
    .card { padding: 18px; }
    th, td { padding: 8px; font-size: 13px; }
}

.nowrap { white-space: nowrap; }
a { color: #b8a6ff; word-break: break-all; }

.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-backdrop[hidden] {
    display: none !important;
}
.modal {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal h3 { margin: 0 0 16px; font-size: 20px; }
.modal-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 18px;
}
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px;
}
.checkbox-label input[type="checkbox"] {
    width: auto; margin: 0;
}
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.92);
    color: #111;
    resize: vertical;
}
