* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f0eb;
    color: #2d2d2d;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    font-size: 28px;
    color: #4a3728;
    margin-top: 30px;
}

.subtitle {
    text-align: center;
    color: #8b7355;
    margin: 8px 0 30px;
    font-size: 16px;
}

/* Day groups */
.day-group {
    margin-bottom: 20px;
}

.day-title {
    font-size: 16px;
    font-weight: 600;
    color: #4a3728;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #d4c5b2;
}

.day-title .weekday {
    color: #8b7355;
    font-weight: 400;
}

.slots-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-btn {
    padding: 12px 24px;
    border: 2px solid #c4a882;
    border-radius: 12px;
    background: white;
    color: #4a3728;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    text-align: center;
}

.slot-btn:hover {
    background: #4a3728;
    color: white;
    border-color: #4a3728;
}

.slot-btn.booked {
    background: #e8e0d8;
    color: #b0a090;
    border-color: #d8d0c8;
    cursor: not-allowed;
    text-decoration: line-through;
}

.slot-btn.selected {
    background: #4a3728;
    color: white;
    border-color: #4a3728;
}

/* Form */
.hidden { display: none; }

#booking-form {
    margin-top: 30px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#booking-form h2 {
    font-size: 20px;
    color: #4a3728;
    margin-bottom: 16px;
}

.selected-time {
    background: #f5f0eb;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #4a3728;
    margin-bottom: 16px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 14px;
    color: #8b7355;
    margin-bottom: 4px;
}

.field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d4c5b2;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus {
    border-color: #4a3728;
}

button[type="submit"], #booking-form button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button[type="submit"] {
    background: #4a3728;
    color: white;
    margin-top: 6px;
}

button[type="submit"]:hover { opacity: 0.9; }

.btn-cancel {
    background: #e8e0d8;
    color: #4a3728;
    margin-top: 8px;
}

/* Success */
#success {
    text-align: center;
    margin-top: 60px;
}

.success-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: #5a8f5a;
    color: white;
    font-size: 40px;
    margin: 0 auto 20px;
}

#success h2 {
    color: #4a3728;
    margin-bottom: 10px;
}

#success p {
    color: #8b7355;
    margin-bottom: 24px;
}

#success button {
    padding: 12px 32px;
    background: #4a3728;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

/* No slots */
.no-slots {
    text-align: center;
    padding: 40px;
    color: #8b7355;
    font-size: 18px;
}

/* Error */
.error-msg {
    background: #f8d7da;
    color: #842029;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

/* ============ ADMIN ============ */

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.admin-container h1 {
    margin-bottom: 20px;
}

/* Login */
.login-box {
    max-width: 350px;
    margin: 80px auto;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.login-box h2 {
    text-align: center;
    color: #4a3728;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d4c5b2;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: #4a3728;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Admin tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    border: 2px solid #d4c5b2;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #4a3728;
}

.tab.active {
    background: #4a3728;
    color: white;
    border-color: #4a3728;
}

/* Add slots form */
.add-slots-panel {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.add-slots-panel h3 {
    color: #4a3728;
    margin-bottom: 12px;
}

.add-slots-panel input[type="date"] {
    padding: 10px;
    border: 2px solid #d4c5b2;
    border-radius: 8px;
    font-size: 16px;
    margin-right: 10px;
}

.hours-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.hour-toggle {
    padding: 8px 16px;
    border: 2px solid #d4c5b2;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4a3728;
}

.hour-toggle.selected {
    background: #5a8f5a;
    color: white;
    border-color: #5a8f5a;
}

.btn-add-slots {
    padding: 10px 24px;
    background: #5a8f5a;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Admin slot list */
.admin-day {
    margin-bottom: 16px;
}

.admin-day-title {
    font-weight: 600;
    color: #4a3728;
    margin-bottom: 8px;
    font-size: 16px;
}

.admin-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: white;
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.admin-slot .time {
    font-weight: 600;
    font-size: 18px;
    min-width: 60px;
}

.admin-slot .client-info {
    flex: 1;
    margin: 0 16px;
    font-size: 14px;
    color: #8b7355;
}

.admin-slot .client-info.booked {
    color: #5a8f5a;
    font-weight: 600;
}

.admin-slot .actions {
    display: flex;
    gap: 6px;
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-toggle {
    background: #f0e6d8;
    color: #4a3728;
}

.btn-toggle.disabled-slot {
    background: #e8e0d8;
    color: #b0a090;
}

.btn-delete {
    background: #f8d7da;
    color: #842029;
}

.btn-cancel-booking {
    background: #fff3cd;
    color: #664d03;
}

.admin-slot.slot-disabled {
    opacity: 0.5;
}

.logout-btn {
    float: right;
    padding: 8px 16px;
    background: #e8e0d8;
    color: #4a3728;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
