:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-input: #2a2a2a;
    --gold: #d4af37;
    --gold-hover: #b5952f;
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --danger: #e53935;
    --success: #43a047;
    --radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 50px;
    overflow-x: hidden;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 15px;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 10px 18px;
    border-bottom: 1px solid #333;
    margin-bottom: 18px;
}

.lang-minimal {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.lang-minimal button {
    background: transparent;
    border: none;
    padding: 2px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lang-divider {
    color: #3a3a3a;
    font-size: 0.68rem;
    user-select: none;
}

header h1,
header p,
#ui-shop-address-badge {
    width: fit-content;
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    color: var(--gold);
    font-size: clamp(1.3rem, 5vw, 1.95rem);
    letter-spacing: clamp(1.2px, 0.4vw, 2px);
    padding-left: 2px;
    line-height: 1.25;
    text-transform: uppercase;
    word-break: normal;
    overflow-wrap: break-word;
    margin-top: 0;
}

header p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
    line-height: 1.4;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid #333;
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #2c2c2c;
}

details.card {
    padding: 0;
    overflow: hidden;
}

details.card summary {
    padding: 15px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    gap: 10px;
}

details.card summary::-webkit-details-marker {
    display: none;
}

details.card summary::after {
    content: "▼";
    font-size: 0.78rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

details.card[open] summary::after {
    transform: rotate(180deg);
}

details.card[open] summary {
    border-bottom: 1px solid #2c2c2c;
}

.card-body {
    padding: 16px;
}

h2 {
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding-left: 10px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="number"],
select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 44px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid #444;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.2;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}

input[type="date"],
input[type="time"] {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
    text-align: center;
    margin: 0 auto;
}

.card-body > div,
.form-group {
    min-width: 0;
    max-width: 100%;
}

input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #333;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.service-item:hover {
    border-color: #555;
}

.service-item.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
}

.service-info strong {
    display: block;
    font-size: 0.98rem;
}

.service-info span {
    font-size: 0.83rem;
    color: var(--text-muted);
}

.service-price {
    font-weight: bold;
    color: #ffffff;
    font-size: 1.05rem;
    white-space: nowrap;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.slot-btn {
    padding: 10px 6px;
    background: var(--bg-input);
    border: 1px solid #444;
    color: var(--text-main);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
    transition: 0.15s;
}

.slot-btn:hover:not(:disabled) {
    border-color: var(--gold);
}

.slot-btn.selected {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.slot-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #1a1a1a;
}

.days-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.day-chk {
    background: var(--bg-input);
    padding: 8px 6px;
    border-radius: 6px;
    border: 1px solid #444;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-main);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--gold-hover);
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.2;
}

.btn-wa {
    background: #25D366;
    color: #000;
}

.btn-del {
    background: var(--danger);
    color: #fff;
}

.gdpr-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.gdpr-box input {
    margin-top: 3px;
}

.gdpr-link {
    color: var(--gold);
    text-decoration: underline;
    cursor: pointer;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.alert-success {
    background: rgba(67, 160, 71, 0.2);
    border: 1px solid var(--success);
    color: #a5d6a7;
}

.alert-error {
    background: rgba(229, 57, 53, 0.2);
    border: 1px solid var(--danger);
    color: #ef9a9a;
}

.hidden {
    display: none !important;
}

.booking-card {
    background: var(--bg-input);
    padding: 13px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.booking-info strong {
    display: block;
    color: var(--gold);
}

.booking-info span {
    font-size: 0.84rem;
    color: var(--text-main);
    display: block;
}

.booking-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rank-box {
    background: #262626;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #383838;
    text-align: center;
}

.insight-box {
    background: #232018;
    border: 1px solid #524520;
    border-left: 4px solid var(--gold);
    padding: 11px 13px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #eee;
    line-height: 1.55;
}

.history-list {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #444;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #222;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 15px;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    padding: 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    header h1 {
        font-size: 1.45rem;
    }
    .card-body {
        padding: 12px;
    }
    .filter-bar {
        grid-template-columns: 1fr;
    }
    .days-checkbox-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .booking-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .booking-actions {
        width: 100%;
    }
    .booking-actions .btn-small {
        flex: 1;
    }
}
