
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font: 600 16px 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary { background: #2e7d32; color: white; }
.btn-primary:hover { background: #1b5e20; }

.btn-secondary { background: #ff9800; color: white; }
.btn-secondary:hover { background: #f57c00; }

.btn-login {
    background: transparent;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}
.btn-login:hover { background: #2e7d32; color: white; }

.btn-register { background: #2e7d32; color: white; margin-left: 10px; }
.btn-register:hover { background: #1b5e20; }

.btn-logout { background: #d32f2f; color: white; margin-left: 10px; }
.btn-logout:hover { background: #b71c1c; }

.btn-large { padding: 15px 30px; font-size: 18px; }
.btn-block { width: 100%; }
.btn-small { padding: 5px 10px; font-size: 12px; }

.btn-cancel { background: #f44336; color: white; }
.btn-cancel:hover { background: #d32f2f; }

.btn-complete-order { background: #ff9800; color: white; }
.btn-complete-order:hover { background: #f57c00; }

.btn-view-profile {
    padding: 3px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-view-profile:hover { background: #2e7d32; color: white; }

/* ========== ШАПКА ========== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2e7d32;
    font: 700 22px 'Montserrat', sans-serif;
}
.logo i { font-size: 28px; margin-right: 10px; }

.nav-links { display: flex; gap: 30px; }

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-link:hover,
.nav-link.active { color: #2e7d32; }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #2e7d32;
    border-radius: 2px;
}

.auth-buttons,
.user-menu { display: flex; align-items: center; }

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
}

.user-role {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2e7d32;
    cursor: pointer;
}

/* ========== ГЕРОЙ ========== */
.hero {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 80px 0;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content { flex: 1; }

.hero-title {
    font: 700 48px/1.2 'Montserrat', sans-serif;
    color: #1b5e20;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: #555;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-post-type-help {
    margin-top: -18px;
    margin-bottom: 26px;
    max-width: 720px;
}

.hero-help-toggle {
    background: transparent;
    border: none;
    padding: 0;
    color: #1b5e20;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.hero-help-toggle:hover {
    color: #0f3d15;
}

.hero-help-content {
    margin-top: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #d9eadb;
    border-radius: 8px;
    color: #2f3a2f;
    font-size: 14px;
    line-height: 1.5;
}

.hero-help-content p + p {
    margin-top: 6px;
}

.hero-stats { display: flex; gap: 40px; }

.stat { display: flex; flex-direction: column; }

.stat-number {
    font: 700 36px 'Montserrat', sans-serif;
    color: #2e7d32;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.hero-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.hero-image img { width: 100%; height: auto; display: block; }

/* ========== ОБЩИЕ СЕКЦИИ ========== */
.section-title {
    font: 700 36px 'Montserrat', sans-serif;
    color: #1b5e20;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin: 0 auto 50px;
    max-width: 700px;
}

.services, .orders, .about { padding: 80px 0; }
.services { background: white; }
.orders { background: #f8f9fa; }

/* ========== УСЛУГИ ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.service-icon i { font-size: 30px; color: #2e7d32; }

.service-title {
    font: 600 22px 'Montserrat', sans-serif;
    color: #333;
    margin-bottom: 15px;
}

.service-description { color: #666; line-height: 1.6; }

/* ========== ЗАЯВКИ ========== */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.orders-filter,
.order-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-tabs {
    margin-bottom: 18px;
}

.orders-filter select {
    padding: 8px 15px;
    background: #ffffff;
    border: 1px solid #d3e7d5;
    border-radius: 999px;
    color: #2e7d32;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.orders-filter select:hover,
.orders-filter select:focus {
    background: #ffffff;
    color: #2e7d32;
}

.orders-filter select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.25);
}

.orders-filter select option {
    background: #ffffff;
    color: #2e7d32;
}

.orders-filter select option:checked {
    background: #e8f5e9;
    color: #1b5e20;
}

.order-tab-btn {
    padding: 8px 15px;
    background: #e8f5e9;
    border: none;
    border-radius: 20px;
    color: #2e7d32;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-tab-btn:hover,
.order-tab-btn.active {
    background: #2e7d32;
    color: white;
}

#tabArchiveOrders {
    background: #f5f5f5;
    color: #666;
}
#tabArchiveOrders:hover,
#tabArchiveOrders.active {
    background: #666;
    color: white;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.order-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.order-header { padding: 20px; border-bottom: 1px solid #eee; }
.order-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.order-category {
    display: inline-block;
    padding: 5px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-type-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.post-type-order {
    background: #e3f2fd;
    color: #1565c0;
}

.post-type-ad {
    background: #fff8e1;
    color: #ef6c00;
}

.order-title {
    font: 600 18px 'Montserrat', sans-serif;
    color: #333;
    margin-bottom: 10px;
}

.order-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-photos {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.order-photos img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    cursor: zoom-in;
}

.order-body { padding: 20px; }
.order-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.order-price {
    font: 700 24px 'Montserrat', sans-serif;
    color: #2e7d32;
}

.order-deadline,
.order-date,
.order-address {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.order-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Статусы заявок */
.order-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}
.order-status.open { background: #e8f5e9; color: #2e7d32; }
.order-status.accepted { background: #fff3e0; color: #f57c00; }
.order-status.closed { background: #f5f5f5; color: #666; }
.order-status.cancelled { background: #ffebee; color: #c62828; }

.order-executor-info,
.order-customer-info {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

/* Архив */
.archive-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.archive-order-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.archive-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.archive-order-category,
.archive-order-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.archive-order-category { background: #e8f5e9; color: #2e7d32; }
.archive-order-status { background: #f5f5f5; color: #666; }

.archive-order-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.archive-order-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.archive-order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.archive-order-price {
    font-weight: 700;
    color: #2e7d32;
    font-size: 16px;
}

.archive-order-date,
.archive-order-closed {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 12px;
    margin-top: 8px;
}

/* Пустые состояния */
.empty-orders {
    text-align: center;
    padding: 60px 20px;
}
.empty-orders i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}
.empty-orders h3 {
    font: 600 24px 'Montserrat', sans-serif;
    color: #888;
    margin-bottom: 10px;
}
.empty-orders p { color: #aaa; }

/* ========== О НАС ========== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.step { text-align: center; }

.step-number {
    width: 60px;
    height: 60px;
    background: #2e7d32;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 24px 'Montserrat', sans-serif;
    margin: 0 auto 20px;
}

.step-title {
    font: 600 20px 'Montserrat', sans-serif;
    color: #333;
    margin-bottom: 10px;
}

.step-description { color: #666; line-height: 1.6; }

/* ========== ФУТЕР ========== */
.footer {
    background: #1b5e20;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font: 700 24px 'Montserrat', sans-serif;
}
.footer-logo i { font-size: 28px; margin-right: 10px; }

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-telegram {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background: #29a9ea;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.footer-telegram img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.footer-telegram:hover {
    background: #1f90c8;
    transform: translateY(-2px);
}

.footer-max {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    color: #1b5e20;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.footer-max img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.footer-max:hover {
    background: #e8f5e9;
    color: #0f3d15;
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: #c8e6c9;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-link:hover { color: white; }

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #c8e6c9;
    font-size: 14px;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-large { max-width: 800px; }

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font: 600 22px 'Montserrat', sans-serif;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}
.modal-close:hover { color: #d32f2f; }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* ========== ФОРМЫ ========== */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font: 600 16px 'Montserrat', sans-serif;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}
.auth-tab:hover,
.auth-tab.active {
    color: #2e7d32;
    border-bottom-color: #2e7d32;
}

.form-group { margin-bottom: 20px; }

.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group { flex: 1; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font: 16px 'Roboto', sans-serif;
    transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2e7d32;
    outline: none;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6d6d6d;
}

#orderPhotos {
    padding: 10px;
    background: #f9fbf9;
    border: 1px solid #d9e6db;
    border-radius: 10px;
    font-size: 14px;
    color: #2f3a2f;
}

#orderPhotos::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: #2e7d32;
    color: #fff;
    font: 600 14px 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
}

#orderPhotos::file-selector-button:hover {
    background: #1b5e20;
}

#orderPhotos::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: #2e7d32;
    color: #fff;
    font: 600 14px 'Montserrat', sans-serif;
    cursor: pointer;
}

.form-check { display: flex; align-items: center; }
.form-check input {
    width: auto;
    margin-right: 10px;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
}
.auth-footer a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* ========== ДЕТАЛИ ЗАЯВКИ ========== */
.order-details,
.terms-content,
.privacy-content {
    padding: 10px 0;
    line-height: 1.6;
}

.detail-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.detail-item:last-child { border-bottom: none; }

.detail-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.detail-value { color: #333; line-height: 1.6; }

.detail-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.detail-photos img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    cursor: zoom-in;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.photo-lightbox-content {
    position: relative;
    max-width: min(47vw, 600px);
    max-height: 46vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox-content img {
    max-width: 100%;
    max-height: 46vh;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    object-fit: contain;
}

.photo-lightbox-close {
    position: absolute;
    top: -42px;
    right: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.terms-content h4,
.privacy-content h4 {
    color: #2e7d32;
    margin: 20px 0 10px;
    font: 600 18px 'Montserrat', sans-serif;
}

.terms-content p,
.privacy-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.terms-content ul,
.privacy-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}
.terms-content li,
.privacy-content li { margin-bottom: 8px; }

.last-update {
    font-style: italic;
    color: #666;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ========== ЗВЕЗДНЫЙ РЕЙТИНГ ========== */
.stars-rating { margin: 15px 0; }
.stars-container {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.stars-container input[type="radio"] { display: none; }

.star-label {
    cursor: pointer;
    font-size: 28px;
    color: #ddd;
    transition: all 0.2s;
    display: inline-block;
}
.star-label:hover { transform: scale(1.1); }
.star-label:hover,
.star-label:hover ~ .star-label { color: #ffcc00; }

.stars-container input[type="radio"]:checked ~ .star-label i { color: #ddd; }
.stars-container input[type="radio"]:checked + .star-label i { color: #ffd700; }
.star-label i { transition: color 0.2s; }

.rating-info {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}
#currentRating {
    font-weight: bold;
    color: #2e7d32;
    font-size: 18px;
}

/* ========== ПРОФИЛЬ (ОПТИМИЗИРОВАН) ========== */
.profile-modal .modal-content {
    max-width: 800px;
    background: linear-gradient(135deg, #f8fff8, #f0f9f0);
}

.profile-header {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e0f0e0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #e8f5e9, #d0e6d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    color: #2e7d32;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.profile-info { flex: 1; }
.profile-name {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    color: #1a3b1a;
}

.profile-role {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.profile-role.customer {
    background: linear-gradient(145deg, #e6f3e6, #d4e8d4);
    color: #1e4a1e;
    border: 1px solid #9fc99f;
}
.profile-role.executor {
    background: linear-gradient(145deg, #e0f0d0, #d0e0c0);
    color: #2d5a2d;
    border: 1px solid #8bb38b;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(76,175,80,0.08);
    padding: 10px 16px;
    border-radius: 40px;
    border: 1px solid rgba(76,175,80,0.2);
}

.rating-stars { display: flex; gap: 3px; }
.rating-star { color: #ffb300; font-size: 16px; }
.rating-value {
    font-weight: 700;
    color: #1e4a1e;
    font-size: 16px;
}
.rating-count { color: #558b55; font-size: 14px; }

.profile-skills {
    margin-top: 15px;
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    border-left: 5px solid #4caf50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.profile-skills strong {
    color: #1e4a1e;
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}
.profile-skills p {
    margin: 0;
    color: #2d5a2d;
    line-height: 1.5;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.stat-card {
    color: white;
    padding: 20px 10px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(46,125,50,0.2);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-number {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1;
}
.stat-label {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
}

.profile-contact {
    background: white;
    padding: 20px 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(46,125,50,0.08);
    border: 1px solid #c8e0c8;
}
.profile-contact h3 {
    margin: 0 0 18px;
    font-size: 18px;
    color: #1e4a1e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-contact h3:before { content: "📞"; font-size: 18px; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f2faf2;
    border-radius: 14px;
    border: 1px solid #d0e6d0;
    transition: background 0.2s;
}
.contact-item:hover { background: #e6f3e6; }
.contact-item i {
    width: 20px;
    color: #2e7d32;
    font-size: 16px;
}
.contact-item span {
    color: #1e3a1e;
    font-weight: 500;
}

.profile-reviews {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #d0e6d0;
}
.profile-reviews h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 20px;
    color: #1e4a1e;
}
.reviews-count {
    font-size: 16px;
    font-weight: 400;
    color: #558b55;
}

.reviews-container {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
}
.reviews-container::-webkit-scrollbar { width: 6px; }
.reviews-container::-webkit-scrollbar-track { background: #e8f0e8; border-radius: 10px; }
.reviews-container::-webkit-scrollbar-thumb { background: #7ab87a; border-radius: 10px; }

.review-card {
    background: white;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border: 1px solid #d4e8d4;
    box-shadow: 0 4px 10px rgba(46,125,50,0.03);
    transition: box-shadow 0.2s;
}
.review-card:hover { box-shadow: 0 6px 16px rgba(46,125,50,0.1); }

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.reviewer-info { display: flex; flex-direction: column; }
.reviewer-name {
    font-weight: 700;
    color: #1a3b1a;
    font-size: 16px;
}
.review-order {
    font-size: 12px;
    color: #5e8b5e;
    margin-top: 4px;
    background: #edf7ed;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}

.review-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.review-stars { display: flex; gap: 2px; }
.review-stars .fa-star,
.review-stars .fa-star-half-alt {
    color: #ffb300;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.review-rating-value {
    font-size: 12px;
    font-weight: 600;
    color: #2d5a2d;
    background: #e6f3e6;
    padding: 2px 8px;
    border-radius: 20px;
}
.review-comment {
    margin: 14px 0 10px;
    padding: 12px 16px;
    background: #f6fff6;
    border-radius: 14px;
    color: #1e3a1e;
    line-height: 1.5;
    font-size: 14px;
    border-left: 4px solid #7ab87a;
    word-wrap: break-word;
}
.review-date {
    font-size: 12px;
    color: #6a8e6a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.review-date i { color: #7ab87a; font-size: 12px; }

.profile-modal .modal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #d0e6d0;
}
.profile-modal .modal-footer .btn-primary {
    background: linear-gradient(145deg, #2e7d32, #1e5a20);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 40px;
    box-shadow: 0 6px 14px rgba(46,125,50,0.25);
    transition: all 0.2s;
}
.profile-modal .modal-footer .btn-primary:hover {
    background: linear-gradient(145deg, #1e5a20, #144218);
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(46,125,50,0.35);
}

/* ========== ЧАТ ========== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f5f5;
}

.message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-incoming {
    background: white;
    border: 1px solid #e8f5e9;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}
.message-outgoing {
    background: linear-gradient(135deg, #0084ff, #0066cc);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85em;
}
.message-sender { font-weight: 600; }
.message-outgoing .message-sender { color: rgba(255,255,255,0.95); }
.message-incoming .message-sender { color: #2e7d32; }

.message-time {
    font-size: 0.8em;
    opacity: 0.8;
}
.message-outgoing .message-time { color: rgba(255,255,255,0.85); }
.message-incoming .message-time { color: #888; }

.message-content { line-height: 1.4; word-wrap: break-word; }
.message-read {
    font-size: 0.75em;
    text-align: right;
    margin-top: 5px;
    opacity: 0.7;
}
.message-outgoing .message-read { color: rgba(255,255,255,0.8); }
.message-incoming .message-read { color: #4caf50; }

.chat-input-form {
    border-top: 1px solid #eee;
    background: white;
}
.chat-input-container {
    display: flex;
    padding: 15px;
    gap: 10px;
}
.chat-input-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
}
.chat-input-container input:focus {
    border-color: #2e7d32;
    outline: none;
}
.chat-input-container button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chats-list { max-height: 400px; overflow-y: auto; }
.chat-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-item:hover { background: #f8f9fa; }

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.chat-order-title {
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
}
.chat-status.open { background: #e8f5e9; color: #2e7d32; }
.chat-status.accepted { background: #fff3e0; color: #f57c00; }
.chat-status.closed { background: #f5f5f5; color: #757575; }
.chat-status.cancelled { background: #ffebee; color: #d32f2f; }

.chat-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}
.chat-participant {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-unread-count {
    background: #f44336;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.chat-last-message {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}
.chat-last-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-last-time {
    margin-left: 10px;
    white-space: nowrap;
}

.empty-chats {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
.empty-chats i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #ddd;
}

@keyframes newMessage {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}
.message-new { animation: newMessage 0.5s ease-out; }
.message-temp { opacity: 0.7; }
.message-error {
    opacity: 0.7;
    border: 1px dashed #ff4757 !important;
}
.message-status { margin-left: 5px; font-size: 0.8em; }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 992px) {
    .hero .container { flex-direction: column; }
    .hero-image {
        order: -1;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 18px; }
    .section-title { font-size: 30px; }
}

@media (max-width: 768px) {
    .nav-links, .auth-buttons { display: none; }
    .menu-toggle { display: block; }

    .navbar.active .nav-links,
    .navbar.active .auth-buttons {
        display: flex;
        flex-direction: column;
        position: absolute;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 99;
    }
    .navbar.active .nav-links { top: 100%; }
    .navbar.active .auth-buttons { top: calc(100% + 160px); }
    .navbar.active .auth-buttons .btn {
        margin: 5px 0;
        width: 100%;
    }

    .hero-buttons { flex-direction: column; }
    .hero-post-type-help {
        margin-top: 0;
        margin-bottom: 20px;
    }
    .hero-help-toggle { text-align: left; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .orders-header { flex-direction: column; align-items: flex-start; }
    .orders-filter {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .form-row { flex-direction: column; gap: 0; }
    .footer-content { flex-direction: column; }
    .order-footer { flex-direction: column; gap: 10px; }
    .order-address { justify-content: center; text-align: center; }
    .profile-tabs { flex-direction: column; }
    .archive-orders-grid { grid-template-columns: 1fr; }

    .chat-container { height: 400px; }
    .message { max-width: 85%; }
    .chat-input-container { padding: 10px; }
    .chat-input-container input { padding: 8px 12px; }
    .chat-input-container button { width: 45px; height: 45px; }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-rating { justify-content: center; }
    .contact-grid { grid-template-columns: 1fr; }
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .review-rating { align-items: flex-start; }
}

@media (max-width: 600px) {
    .terms-content h4,
    .privacy-content h4 { font-size: 16px; }
    .terms-content p,
    .privacy-content p { font-size: 14px; }
    .modal-body { max-height: 70vh; }
}

@media (max-width: 850px) {
    .modal-large { width: 95%; max-width: 95%; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 28px; }
    .section-title { font-size: 26px; }
    .orders-grid { grid-template-columns: 1fr; }
    .modal-content { width: 95%; max-height: 95vh; }
    .star-label { font-size: 24px; }
    .stars-container { gap: 3px; }

    .chat-container { height: 350px; }
    .message { max-width: 90%; padding: 8px 12px; }
    .message-sender { font-size: 13px; }
    .message-time { font-size: 11px; }

    .profile-stats-grid { grid-template-columns: 1fr; }
    .profile-avatar { font-size: 70px; }
    .profile-name { font-size: 22px; }
}
/* Фильтр по населенным пунктам */
.settlement-filter {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.settlement-filter select,
.settlement-filter input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.settlement-filter select {
    flex: 1;
    min-width: 200px;
}

.settlement-filter input {
    flex: 2;
}

.settlement-filter select:focus,
.settlement-filter input:focus {
    border-color: #2e7d32;
    outline: none;
}

@media (max-width: 768px) {
    .settlement-filter {
        flex-direction: column;
    }

    .settlement-filter select,
    .settlement-filter input {
        width: 100%;
    }
}
/* Фильтр по населенным пунктам */
.settlement-filter {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.settlement-filter select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.search-container {
    flex: 2;
    display: flex;
    gap: 5px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    border-right: none;
}

.search-container input:focus {
    border-color: #2e7d32;
    outline: none;
}

.search-btn {
    width: 45px;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #1b5e20;
}

@media (max-width: 768px) {
    .settlement-filter {
        flex-direction: column;
    }

    .search-container {
        width: 100%;
    }
}

/* Стили для секции подтверждения email */

.verification-section {
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

.verification-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.verification-info i {
    font-size: 48px;
    color: #27ae60;
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease;
}

.verification-info h4 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.verification-info p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Поле для ввода кода */
#verificationCode {
    text-align: center;
    font-size: 28px !important;
    font-weight: 600;
    letter-spacing: 12px !important;
    padding: 15px 20px !important;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background-color: white;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

#verificationCode:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
    outline: none;
}

#verificationCode::placeholder {
    letter-spacing: normal;
    font-size: 16px;
    font-weight: normal;
    color: #adb5bd;
}

/* Кнопка подтверждения */
#verifyCodeBtn {
    background-color: #27ae60;
    border: none;
    padding: 14px !important;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#verifyCodeBtn:hover:not(:disabled) {
    background-color: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

#verifyCodeBtn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Футер верификации */
.verification-footer {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.verification-footer p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 14px;
}

.verification-footer .btn-link {
    background: none;
    border: none;
    color: #27ae60;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.verification-footer .btn-link:hover:not(:disabled) {
    color: #219a52;
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 5px;
}

.verification-footer .btn-link:disabled {
    color: #95a5a6;
    cursor: not-allowed;
    text-decoration: none;
}

#codeTimer {
    color: #e74c3c;
    font-weight: 600;
    margin-left: 5px;
}

.verification-footer a#backToRegistration {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px 10px;
}

.verification-footer a#backToRegistration:hover {
    color: #34495e;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .verification-info {
        padding: 15px;
    }

    .verification-info i {
        font-size: 36px;
    }

    .verification-info h4 {
        font-size: 18px;
    }

    #verificationCode {
        font-size: 24px !important;
        letter-spacing: 8px !important;
        padding: 12px !important;
    }

    .verification-footer .btn-link {
        font-size: 13px;
    }
}

/* Дополнительные улучшения для модального окна */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Стили для успешной отправки */
.verification-success {
    text-align: center;
    padding: 30px;
    color: #27ae60;
    animation: fadeIn 0.5s ease;
}

.verification-success i {
    font-size: 64px;
    margin-bottom: 20px;
}

.verification-success h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.verification-success p {
    color: #6c757d;
}

/* Стили для ошибки верификации */
.verification-error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
    animation: fadeIn 0.5s ease;
}

.verification-error i {
    font-size: 64px;
    margin-bottom: 20px;
}

.verification-error h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.verification-error p {
    color: #6c757d;
}

/* Пульсирующая анимация для поля ввода при активном ожидании */
@keyframes pulse {
    0% {
        border-color: #dee2e6;
    }
    50% {
        border-color: #27ae60;
    }
    100% {
        border-color: #dee2e6;
    }
}

#verificationCode.waiting {
    animation: pulse 1.5s infinite;
}

/* Стили для отображения оставшихся попыток */
.attempts-left {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
    text-align: right;
}

.attempts-left i {
    font-size: 12px;
    margin-right: 3px;
}

/* Стили для навигации между формой и кодом */
.verification-footer a#backToCode {
    color: #27ae60;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px 10px;
}

.verification-footer a#backToCode:hover {
    color: #219a52;
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 5px;
}

.verification-footer .nav-divider {
    color: #dee2e6;
    margin: 0 10px;
}

/* Для мобильных */
@media (max-width: 768px) {
    .verification-footer div[style*="flex"] {
        flex-direction: column;
        gap: 10px !important;
    }

    .verification-footer .nav-divider {
        display: none;
    }
}

/* Стили для кнопки возврата к коду */
.form-footer-links {
    margin-top: 15px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.form-footer-links a {
    color: #27ae60;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.form-footer-links a:hover {
    background-color: #e9ecef;
    color: #219a52;
    border-color: #27ae60;
}

.form-footer-links a i {
    margin-right: 5px;
}

/* Стили для автокомплита */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #e8f5e9;
}

.autocomplete-item.selected {
    background: #c8e6c9;
    font-weight: 500;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.settlement-filter input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 100%; /* должна быть 100% */
    box-sizing: border-box; /* чтобы padding не выходил за границы */
}

/* Мобильное меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-dropdown {
    display: none;
    position: fixed;
    top: 0;
    right: -300px; /* Скрыто за экраном */
    width: 280px;
    max-height: 100vh; /* Ограничиваем максимальную высоту */
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    border-radius: 0 0 0 10px; /* Скругление снизу слева */
    overflow-y: auto; /* Добавляем прокрутку, если контент не помещается */
}

.mobile-dropdown.active {
    display: block;
    right: 0;
}

/* Контейнер для контента меню */
.mobile-menu-content {
    padding: 60px 20px 20px 20px; /* Отступ сверху для кнопки закрытия */
    min-height: min-content; /* Минимальная высота по контенту */
}

/* Затемнение фона при открытом меню */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Кнопка закрытия в меню */
.mobile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 1002;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.mobile-nav-link {
    display: block;
    padding: 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f8f9fa;
}

.mobile-divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.mobile-btn {
    width: 100%;
    text-align: left;
    padding: 15px;
    margin: 5px 0;
    border-radius: 5px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-btn:hover {
    background-color: #f8f9fa;
}

.mobile-btn.btn-login {
    color: #27ae60;
}

.mobile-btn.btn-register {
    color: #3498db;
}

.mobile-btn.btn-logout {
    color: #e74c3c;
}

.mobile-user-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.mobile-user-info span {
    display: block;
}

.mobile-user-info .user-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.mobile-user-info .user-role {
    font-size: 13px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links,
    .auth-buttons,
    .user-menu {
        display: none !important;
    }

}

@media (min-width: 769px) {
    .mobile-dropdown,
    .mobile-overlay {
        display: none !important;
    }
}


.mobile-dropdown::-webkit-scrollbar {
    width: 4px;
}

.mobile-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mobile-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Поле телефона */
.phone-field {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s;
}

.phone-field:focus-within {
    border-color: #27ae60;
}

.phone-code {
    background: #f8f9fa;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    border-right: 1px solid #e9ecef;
}

.phone-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
    background: white;
}

.phone-input::placeholder {
    color: #adb5bd;
    font-size: 14px;
}

/* Для мобильных */
@media (max-width: 768px) {
    .phone-code {
        padding: 10px 12px;
        font-size: 14px;
    }
    .phone-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}
