body { font-family: 'Montserrat', sans-serif; max-width: 1200px; margin: 0 auto; padding: 15px; background: #fafaf7; color: #333; }
header { background: linear-gradient(135deg, #141f13 0%, #2b3a29 50%, #3d4f3b 100%) !important; min-height: 120px; color: white; padding: 25px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; box-shadow: 0 6px 20px rgba(20,31,19,0.15); position: relative; box-sizing: border-box; }
header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 60%); pointer-events: none; }
.header-title-block, .header-right { position: relative; z-index: 2; }
.header-title-block { display: flex; align-items: center; gap: 12px; text-align: left; }
.header-logo { font-size: 28px; background: rgba(255,255,255,0.1); padding: 8px; border-radius: 10px; display: inline-flex; }
.header-right { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.date-badge, .admin-top-btn { background: rgba(0,0,0,0.4); padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.12); color: white; text-decoration: none; backdrop-filter: blur(6px); white-space: nowrap; }
.admin-top-btn { background: white; color: #2a3429; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.info-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.info-card { background: #fffdf5; border: 1px solid #f0edd5; border-radius: 12px; padding: 15px; display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: #555; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.info-card-danger { background: #fff5f5; border-color: #fcdada; }
.day-title { font-size: 18px; font-weight: 700; color: #1a2319; margin: 30px 0 15px 0; display: flex; align-items: center; gap: 10px; border-left: 4px solid #2b3a29; padding-left: 10px; }
.mangal-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.mangal-card { background: white; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); overflow: hidden; border: 1px solid #eef1ed; display: flex; flex-direction: column; }
.mangal-img-banner { height: 60px; background: linear-gradient(135deg, #2b332a 0%, #3e483b 50%, #1c241b 100%) !important; position: relative; display: flex; align-items: center; }
.slot-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f7f9f6; min-height: 48px; box-sizing: border-box; gap: 10px; }
.slot-row:last-child { border-bottom: none; }
.time-label { font-weight: 600; color: #444; font-size: 13px; white-space: nowrap; min-width: 95px; }
.booking-form { display: flex; gap: 6px; align-items: center; flex-grow: 1; justify-content: flex-end; width: 100%; }
.input-wrapper { position: relative; display: flex; align-items: center; flex-grow: 1; max-width: 70px; }
.input-wrapper img { position: absolute; left: 8px; width: 12px; height: 12px; opacity: 0.35; pointer-events: none; }
.booking-form input { padding: 8px 4px 8px 24px; border: 1px solid #d0d7cf; border-radius: 6px; font-size: 12px; font-family: inherit; background: #fafbfa; color: #333; transition: all 0.2s; width: 100%; text-align: center !important; box-sizing: border-box; }
.booking-form input:focus { border-color: #4caf50; outline: none; background: white; }
.input-wrapper.inp-wrapper-name { max-width: 100px; }
.btn-submit { background: #4caf50; color: white; border: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.booked { background: #e8f5e9; color: #2e7d32; font-weight: 600; padding: 8px 12px; border-radius: 6px; font-size: 12px; flex-grow: 1; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; border: 1px solid #c8e6c9; text-align: left; }
.booked-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.conflict { background: #fff3cd; color: #856404; font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 6px; text-align: center; flex-grow: 1; border: 1px solid #ffeeba; }
.del-btn { background: transparent; color: #c62828; border: none; cursor: pointer; font-weight: 700; font-size: 14px; padding: 0 4px; }
.photo-upload-form { display: flex; gap: 6px; margin-top: 2px; align-items: center; width: 100%; }
.photo-upload-form input[type="text"] { padding: 6px; font-size: 12px; border: 1px solid #a5d6a7; border-radius: 6px; width: 60px; text-align: center !important; box-sizing: border-box; }
.photo-upload-form input[type="file"] { display: none; }
.file-lbl { background: #fff; color: #2e7d32; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; border: 1px solid #a5d6a7; white-space: nowrap; }
.photo-ok { color: #1b5e20; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.view-photo-btn { color: #1565c0; background: #e3f2fd; padding: 2px 6px; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 600; border: 1px solid #bbdefb; }
.admin-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 40px; }
.admin-section { background: #fff; border: 1px solid #eef1ed; border-radius: 12px; padding: 25px; }
textarea, pre { width: 100%; height: 220px; padding: 12px; border: 1px solid #d0d7cf; border-radius: 8px; font-family: monospace; font-size: 13px; box-sizing: border-box; background: #fafbfa; }
pre { background: #f4f6f3; overflow-y: auto; white-space: pre-wrap; }
.btn-sub-panel, .btn-danger-panel { background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 12px; }
.btn-danger-panel { background: #d32f2f; }
.login-box { max-width: 360px; margin: 60px auto; background: white; padding: 35px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; border: 1px solid #eef1ed; }
.login-box input[type="password"] { width: 100%; padding: 10px; font-size: 15px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 6px; text-align: center; box-sizing: border-box; }

@media (max-width: 992px) {
    body { padding: 10px; }
    .info-container { grid-template-columns: 1fr; gap: 10px; }
    .mangal-container { grid-template-columns: 1fr; gap: 15px; }
    header { min-height: auto; padding: 20px 15px; flex-direction: column; text-align: center; }
    .header-title-block { flex-direction: column; gap: 8px; }
    .header-right { margin: 10px auto 0 auto; width: 100%; justify-content: center; flex-wrap: wrap; }
    .booking-form { gap: 4px; }
    .input-wrapper { max-width: none; }
    .input-wrapper.inp-wrapper-name { max-width: none; }
    .booking-form input { padding: 8px 4px 8px 22px; font-size: 12px; }
    .admin-layout { display: flex !important; flex-direction: column-reverse !important; gap: 20px !important; width: 100% !important; }
    .admin-section { width: 100% !important; box-sizing: border-box !important; }
}

/* Центрирование текста и подсказок в полях бронирования */
.booking-form .input-wrapper input {
    text-align: center !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    text-indent: 0 !important;
}

/* Улучшение формы получасового бронирования */
.booking-form select {
    flex: 1.2 1 120px;
    min-width: 100px;
    max-width: 150px;
    box-sizing: border-box;
    padding: 8px 5px;
    font-size: 12px;
}

.booking-form .input-wrapper.inp-wrapper-name {
    flex: 1.5 1 105px;
    max-width: 125px;
}

@media (max-width: 992px) {
    .booking-form select {
        min-width: 90px;
        flex: 1.2 1 105px;
    }

    .booking-form .input-wrapper.inp-wrapper-name {
        max-width: none;
        flex: 1.5 1 95px;
    }
}

/* Компактные поля корпуса и квартиры, больше места для телефона */
.booking-form .input-wrapper.inp-wrapper-korp {
    flex: 0 0 52px;
    max-width: 52px;
    min-width: 0;
}

.booking-form .input-wrapper.inp-wrapper-kv {
    flex: 0 0 42px;
    max-width: 42px;
    min-width: 0;
}

.booking-form .inp-wrapper-korp img,
.booking-form .inp-wrapper-kv img {
    display: none;
}

.booking-form .inp-wrapper-korp input,
.booking-form .inp-wrapper-kv input {
    padding: 8px 2px !important;
    font-size: 11px;
}

.booking-form .input-wrapper.inp-wrapper-name {
    flex: 1 1 110px;
    min-width: 0;
    max-width: none;
}


/* BBQ field widths: compact screens */
@media (max-width: 992px) {
    .booking-form .input-wrapper.inp-wrapper-korp {
        flex: 0 0 36px;
        max-width: 36px;
    }

    .booking-form .input-wrapper.inp-wrapper-kv {
        flex: 0 0 29px;
        max-width: 29px;
    }
}
