/* profile.css */
#profile {
    background: var(--bg-dashboard) !important;
}

.profile-section {
    margin-bottom: 16px;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Делаем экраны профиля скроллируемыми */
#profile .main-content,
#edit-profile .main-content {
    overflow-y: auto;
    padding-bottom: 100px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#profile .main-content::-webkit-scrollbar,
#edit-profile .main-content::-webkit-scrollbar {
    display: none;
}

.profile-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-light);
}

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

.day-card-edit {
    background: var(--white);
    border: 1.5px solid var(--gray-light);
    border-radius: 12px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    user-select: none;
}

.day-card-edit:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.day-card-edit.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.day-card-edit .day-short {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.day-card-edit .day-full {
    font-size: 8px;
    opacity: 0.8;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-light);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 12px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 8px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.profile-subtitle {
    color: var(--gray);
    font-size: 13px;
}

.profile-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 14px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-item:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
    background: rgba(var(--primary-rgb), 0.02);
}

.profile-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-item-icon svg {
    color: var(--primary);
}

.profile-item-text {
    flex: 1;
}

.profile-item-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1px;
    font-size: 14px;
}

.profile-item-subtitle {
    font-size: 11px;
    color: var(--gray);
}

.profile-item-arrow {
    color: var(--gray);
    font-size: 16px;
}

/* Сетка оборудования в профиле */
.equipment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.equipment-item {
    background: var(--white);
    border: 1.5px solid var(--gray-light);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equipment-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.equipment-item.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
    font-weight: 600;
}


.profile-disliked-foods-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-disliked-foods-grid .disliked-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-disliked-item {
    padding: 10px 12px;
    min-height: auto;
    font-size: 14px;
}

/* =============== PALETTE PICKER =============== */
.palette-picker { padding: 8px 14px 4px; }
.palette-label { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 10px; }
.palette-options { display: flex; gap: 10px; flex-wrap: wrap; }
.palette-dot {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--dot-clr); border: 2px solid transparent;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
    padding: 0; position: relative;
}
.palette-dot.active {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--dot-clr);
}
.palette-dot:active { transform: scale(0.93); }
.palette-custom {
    background: var(--gray-light); display: flex;
    align-items: center; justify-content: center;
    font-size: 18px; color: var(--gray); cursor: pointer;
}
.palette-custom input { position: absolute; opacity: 0; width: 0; height: 0; }

/* =============== DARK THEME OVERRIDES =============== */
[data-theme="dark"] .profile-section,
[data-theme="dark"] .profile-item {
    border-color: var(--border);
}
[data-theme="dark"] .profile-item-icon {
    background: rgba(var(--primary-rgb), 0.15);
}
