/* Светлый футер: белый фон, тёмный текст, оранжевые акценты */
footer {
    background: var(--white, #fff);
    color: var(--text, #111);
    text-align: center;
    padding: 1em clamp(12px, 4vw, 24px);
    padding-bottom: calc(1em + env(safe-area-inset-bottom));
    /* безопасная зона для мобилок */
    border-top: 1px solid var(--border, #eee);
    box-shadow: 0 -6px 18px rgba(17, 17, 17, .05);
}

footer a {
    color: var(--orange, #ff9800);
    text-decoration: underline;
    font-weight: 600;
}

footer a:hover {
    color: var(--orange-600, #e68a00);
    text-decoration: underline;
}

footer a:focus-visible {
    outline: 2px solid var(--orange, #ff9800);
    outline-offset: 2px;
}

.container {
    padding: 20px;
    margin: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.projects-container {
    min-height: calc(100vh - 300px);
    /* 300px подогнать под header + footer */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.checkbox-row {
    grid-column: 1 / 3;
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
}

#user-fields .grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    #user-fields .grid-row {
        grid-template-columns: 1fr;
    }
}

#user-fields {
    transition: all 0.2s ease;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Карта */
.map {
    width: 100%;
    height: 300px;
    margin: 1em 0;
}

/* Группировка формы (универсально) */
.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group button {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Красная кнопка SOS */
.sos-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #d32f2f;
    color: white;
    border: none;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.sos-button:hover {
    background-color: #b71c1c;
}

/* Верхний регистр для выбранных полей */
input.uppercase {
    text-transform: uppercase;
}

input.uppercase::placeholder {
    text-transform: none;
}

/* Подпись к загрузке файла */
label.file-label {
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
}

/* Таблицы (dashboard.php) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 14px;
}

table th,
table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ccc;
    vertical-align: top;
    word-break: break-word;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

table form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media (max-width: 600px) {

    table th,
    table td {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* sos.html */
.sos-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 30px;
}

.sos-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex: 1 1 300px;
    max-width: 420px;
}

.sos-box h3 {
    margin-top: 0;
    font-size: 20px;
    /* было 18px */
}

.sos-box textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 10px;
    font-family: inherit;
}

.sos-box input[type="file"] {
    margin-bottom: 10px;
}

.sos-box button {
    background-color: #ffd500;
    color: #000;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 10px 20px;
}

.login-box button {
    background-color: #d32f2f;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.benefits {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.benefits li {
    margin-bottom: 8px;
    font-size: 15px;
}

.login-box {
    background-color: #fffaf2;
    border: 1px solid #ffe58f;
}

@media (max-width: 768px) {
    .sos-options {
        flex-direction: column;
        align-items: stretch;
    }
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

/*Другие продукты*/
#projects-title {
    text-align: center;
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.logos a {
    display: block;
    width: 120px;
    height: 120px;
}

.logos img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: white;
    padding: 8px;
    transition: 0.3s ease;
}

.logos img:hover {
    transform: scale(1.1);
    border-color: #111;
}

/* Таблица заявок */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 15px;
    background-color: #ffd500;
    color: #000;
}

th,
td {
    padding: 10px 12px;
    border: 1px solid #000;
    text-align: left;
}

th {
    background-color: #000;
    color: #ffd500;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #ffea80;
}

form {
    margin: 0;
}

/* === ЗАМЕНА старого блока select, button === */
/* Аккуратные формы; брендовые кнопки .nav-btn/.upload-btn/.open-modal-btn/.share-btn не трогаем */

/* SELECT */
select {
    -webkit-appearance: none;
    appearance: none;
    padding: 10px 12px;
    font-size: 14px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e5e5);
    background:
        #fff url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--text, #111);
    min-height: 40px;
    padding-right: 34px;
    /* место под стрелку */
}

select:hover {
    border-color: var(--orange-600, #e68a00);
}

select:focus {
    outline: none;
    border-color: var(--orange-600, #e68a00);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.25);
}

/* КНОПКИ ТОЛЬКО ВНУТРИ ФОРМ/ПАНЕЛЕЙ ДЕЙСТВИЙ — безопасно для крестиков и т.п. */
main.container form button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn),
main.container .form-actions button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn) {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, var(--orange, #ff9800), var(--orange-600, #e68a00));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(230, 138, 0, .35);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer;
    margin-top: 6px;
}

main.container form button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn):hover,
main.container .form-actions button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn):hover {
    background: var(--orange-600, #e68a00);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(230, 138, 0, .45);
}

main.container form button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn):disabled,
main.container .form-actions button:not(.nav-btn):not(.upload-btn):not(.open-modal-btn):not(.share-btn):disabled {
    opacity: .6;
    cursor: not-allowed;
}

/*Информация о пользователе на главной странице*/
.user-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-info {
    background-color: #000;
    color: #FFD700;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .user-info {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/*google-maps*/
.location-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.location-buttons button {
    background-color: #ffd500;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.location-buttons button:hover {
    background-color: #e6c200;
}

#map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#map-modal .modal-content {
    width: 90%;
    max-width: 600px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    position: relative;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 6px;
    margin-bottom: 10px;
}

#map-modal button {
    margin: 6px 4px 0 0;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    background-color: #ffd500;
    color: #000;
    cursor: pointer;
}

#map-modal button:hover {
    background-color: #e6c200;
}

#map-modal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.pickup-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pickup-options button {
    flex: 1 1 auto;
    background-color: #ffd500;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pickup-options button:hover {
    background-color: #e6c200;
}

.location-label p {
    margin-bottom: 6px;
}

/*Модальные окна*/
/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-box {
    position: relative;
    max-width: 600px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    font-size: 16px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 18px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #ffcc00;
    transition: background-color 0.2s ease;
}

.modal-actions button:hover {
    background-color: #ffdb4d;
}

/*sos details*/
#details-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

#details-form label {
    font-weight: bold;
}

#details-form textarea,
#details-form input[type="text"],
#details-form input[type="number"],
#details-form input[type="file"] {
    font-size: 16px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
}

#details-form textarea {
    resize: vertical;
    height: 100px;
}

#details-form button {
    grid-column: 1 / 3;
    background-color: #ffd500;
    color: #000;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 12px;
}

@media (max-width: 600px) {
    #details-form {
        grid-template-columns: 1fr;
    }

    #details-form button {
        grid-column: auto;
    }
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #f5f5f5;
}