/* Reset and Base - STRONG TRANSPORT style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #1e3a5f;
    --primary: #2c5282;
    --secondary: #0d9488;
    --secondary-hover: #0f766e;
    --accent: #14b8a6;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --bg-white: #ffffff;
    --bg-light: #f0fdfa;
    --bg-section: #e6fffa;
    --border-color: #e2e8f0;
    --shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
    --shadow-hover: 0 8px 24px rgba(30, 58, 95, 0.12);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-dark: #7dd3fc;
    --primary: #38bdf8;
    --secondary: #2dd4bf;
    --secondary-hover: #5eead4;
    --accent: #5eead4;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --body-bg: #0f172a;
    --bg-white: #1a2332;
    --bg-light: #0f172a;
    --bg-section: #1e293b;
    --border-color: #334155;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
    --footer-bg: #0f172a;
    --footer-color: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--body-bg, var(--bg-white));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Top header - только логотип */
.top-header {
    background: var(--bg-white);
    box-shadow: 0 1px 0 var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0.6rem 0;
}

.top-header .container,
.top-header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.theme-toggle {
    position: absolute;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--border-color);
}

.theme-toggle-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.theme-icon-moon { display: none; }
.theme-icon-sun { display: inline; }

[data-theme="dark"] .theme-icon-moon { display: inline; }
[data-theme="dark"] .theme-icon-sun { display: none; }

/* Плавающее нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
    pointer-events: none;
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(13, 148, 136, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    pointer-events: auto;
    overflow: visible;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 16px;
    transition: var(--transition);
    min-width: 56px;
}

.bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.bottom-nav-item.bottom-nav-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.bottom-nav-more {
    position: relative;
}

.bottom-nav-dropdown {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    right: 0;
    min-width: 180px;
    background: var(--bg-white);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.25);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1100;
}

.bottom-nav-more.open .bottom-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bottom-nav-dropdown-link {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.bottom-nav-dropdown-link:hover {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}

/* Отступ контента снизу для плавающего меню */
/* Legacy - logo */
.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo:hover {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}

.nav-main {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-spacer {
    margin-left: auto;
    flex-shrink: 0;
}


.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-link.nav-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
}

.nav-link.nav-pill:hover {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}

.nav-link.nav-pill.active {
    background: rgba(13, 148, 136, 0.15);
    color: var(--secondary);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.nav-dropdown-trigger:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.nav-dropdown-trigger[aria-expanded="true"] {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.nav-dropdown-chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.15);
    border: 1px solid var(--border-color);
    list-style: none;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.nav-dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-dropdown-link:hover {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}

.nav-user-pill {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-user-pill:hover {
    color: var(--primary-dark);
}

.nav-user-text {
    white-space: nowrap;
}

.nav-icons {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 999px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}

.nav-mini-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.nav-cta-btn {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    color: white !important;
    padding: 0.5rem 1rem;
    gap: 0.4rem;
}

.nav-cta-btn:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, #0f5c54 100%);
    color: white !important;
}

.nav-cta-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-user-wrap {
    flex-shrink: 0;
}

/* Burger button - hidden on desktop */
.nav-burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary-dark);
    transition: var(--transition);
}
.nav-burger-btn:hover {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}
.nav-burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: var(--transition);
}
.nav-burger-btn[aria-expanded="true"] .nav-burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-burger-btn[aria-expanded="true"] .nav-burger-bar:nth-child(2) {
    opacity: 0;
}
.nav-burger-btn[aria-expanded="true"] .nav-burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0 calc(5rem + env(safe-area-inset-bottom));
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Messages */
.messages {
    max-width: 1200px;
    margin: 0 auto 0;
    padding: 20px 24px 0;
}

.message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Hero Section - full-width, bold title, background image + overlay */
.hero-section {
    text-align: center;
    padding: 5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
    background-color: #1e3a5f;
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Тёмный оверлей для читаемости текста */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.88) 0%, rgba(44, 82, 130, 0.85) 50%, rgba(35, 78, 119, 0.9) 100%);
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Home Hero - enhanced */
.home-hero {
    padding: 6rem 0 7rem;
}

.home-hero .hero-bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: -100px;
    right: -100px;
    animation: heroShape1 12s ease-in-out infinite;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    background: #14b8a6;
    bottom: -50px;
    left: -80px;
    animation: heroShape2 10s ease-in-out infinite;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: heroShape3 8s ease-in-out infinite;
}

@keyframes heroShape1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

@keyframes heroShape2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -20px); }
}

@keyframes heroShape3 {
    0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.2); }
}

.hero-badge {
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    padding: 0.35rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.home-hero .hero-title {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.home-hero .hero-subtitle {
    font-size: 1.15rem;
    max-width: 520px;
}

.btn-hero-primary {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: var(--secondary);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
}

.btn-hero-primary:hover {
    background: #0f766e;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.45);
}

.btn-hero-secondary {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: rgba(255,255,255,0.1);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.4);
    transition: var(--transition);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
    transform: translateY(-3px);
}

/* Home About - card style */
.home-about .about-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08), 0 0 0 1px rgba(13, 148, 136, 0.06);
}

.about-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.about-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.about-lead {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.home-about .about-photo {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--bg-section);
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.1);
}

/* Home Links */
.home-links .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.home-links-grid .link-card {
    position: relative;
    overflow: hidden;
}

.home-links-grid .link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.home-links-grid .link-card:hover::before {
    opacity: 1;
}

/* Home CTA */
.home-cta {
    padding: 4rem 0;
}

.cta-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 3.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 12px 48px rgba(30, 58, 95, 0.25);
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cta-text {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.25rem;
    background: var(--secondary);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
}

.btn-cta:hover {
    background: #0f766e;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
}

.fade-in { animation: fadeIn 0.6s ease-out; }
.fade-in-delay { animation: fadeIn 0.8s ease-out 0.2s both; }
.fade-in-delay-2 { animation: fadeIn 1s ease-out 0.4s both; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Page Title */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    text-align: center;
    letter-spacing: -0.02em;
}

/* Sections - light teal/blue blocks */
.about-section {
    padding: 4rem 0;
    background: var(--bg-section);
}

/* About section with photo */
.about-with-photo {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.about-photo-wrap {
    flex-shrink: 0;
}

.about-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--secondary);
    box-shadow: var(--shadow-hover);
}

.about-text-wrap {
    text-align: left;
}

.about-text-wrap .section-title {
    text-align: left;
}

.about-text-wrap p {
    margin-bottom: 1rem;
}

.quick-links {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.about-content p {
    margin-bottom: 1rem;
}

/* Icon cards - circular style like reference */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.link-card {
    background: var(--bg-white);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-color);
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.link-card .icon-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--secondary);
    transition: var(--transition);
}

.link-card:hover .icon-circle {
    background: var(--secondary);
    color: white;
}

.link-card h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.link-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item a {
    display: block;
    height: 100%;
    text-decoration: none;
    color: white;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.95), transparent);
    padding: 2rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--bg-section);
}

/* Home Projects section */
.home-projects {
    padding: 4rem 0;
    background: var(--bg-light);
}

.home-projects .section-title {
    text-align: center;
}

.home-projects .section-subtitle {
    text-align: center;
}

.home-reviews {
    margin-top: 3rem;
    max-width: 700px;
}

.home-reviews .reviews-section-title {
    margin-bottom: 1rem;
}

/* Project Detail */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
}

.auction-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
    transition: var(--transition);
}

.auction-back-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #152a47 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.45);
    color: white;
}

.auction-back-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.project-detail {
    max-width: 900px;
    margin: 0 auto;
}

.project-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.project-content {
    line-height: 1.8;
}

.project-description {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

/* Blog */
.blog-list-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.blog-list-actions .auth-btn {
    margin-top: 0;
}

.blog-list {
    max-width: 900px;
    margin: 0 auto;
}

.blog-item {
    background: var(--bg-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.blog-item:hover {
    box-shadow: var(--shadow-hover);
}

.blog-item h2 {
    margin-bottom: 1rem;
}

.blog-item h2 a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
}

.blog-item h2 a:hover {
    color: var(--secondary);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.blog-excerpt {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.read-more {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-hover);
}

.blog-post {
    max-width: 900px;
    margin: 0 auto;
}

.blog-content {
    line-height: 1.8;
    font-size: 1.05rem;
    margin-top: 2rem;
    color: var(--text-dark);
}

.blog-item-author,
.blog-post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.blog-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-author-avatar-large {
    width: 56px;
    height: 56px;
}

.blog-author-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--bg-white);
    font-weight: 700;
    font-size: 1rem;
}

.blog-author-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    font-size: 1em;
    margin-left: 0.2em;
    vertical-align: middle;
    opacity: 0.95;
}

.user-badge-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.user-badge-clickable:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Окно статуса (badge modal) */
.badge-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: badgeModalFadeIn 0.3s ease;
}

.badge-modal[hidden] {
    display: none;
}

@keyframes badgeModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.badge-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0.5);
    backdrop-filter: blur(4px);
}

.badge-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(30, 58, 95, 0.2);
    text-align: center;
    animation: badgeModalSlideIn 0.35s ease;
}

@keyframes badgeModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.badge-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.badge-modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.badge-modal-close svg {
    width: 20px;
    height: 20px;
}

.badge-modal-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(13, 148, 136, 0.2));
}

.badge-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.badge-modal-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.badge-modal-hint {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.user-badge-profile {
    font-size: 1.25rem;
}

.blog-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.blog-item-header h2 {
    margin-bottom: 0;
}

.blog-status {
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-status-draft { background: var(--border-color); color: var(--text-muted); }
.blog-status-pending_moderation { background: #fef3c7; color: #92400e; }
.blog-status-published { background: #d1fae5; color: #065f46; }
.blog-status-rejected { background: #fee2e2; color: #991b1b; }

.blog-post-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.blog-post-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.blog-comments {
    max-width: 900px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-comments .profile-section-title {
    margin-bottom: 1rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form .auth-input {
    display: block;
    width: 100%;
    margin-bottom: 0.75rem;
}

.comment-form .auth-btn {
    margin-top: 0;
}

.comment-list {
    list-style: none;
}

.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-author-row .blog-author-avatar {
    width: 32px;
    height: 32px;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-text {
    margin: 0;
    padding-left: 2.5rem;
    line-height: 1.6;
}

.comment-empty,
.comment-login-hint {
    color: var(--text-muted);
    padding: 1rem 0;
}

.blog-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.blog-form-actions .auth-btn {
    margin-top: 0;
}

.blog-moderation-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.blog-moderation-actions .auth-btn {
    margin-top: 0;
}

.auth-btn-reject:hover {
    background: #fee2e2;
    color: #991b1b;
}

.blog-moderation-images {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.page-subtitle {
    margin-bottom: 1.5rem;
}

/* Forms */
.page-layout,
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.form-section,
.services-section,
.contact-info {
    background: var(--bg-section);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-section h2,
.services-section h2,
.contact-info h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.contact-intro {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.contact-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}

.contact-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--bg-white);
}

.contact-card-telegram .contact-card-icon {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
}

.contact-card-email .contact-card-icon {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
}

.contact-card-email .contact-card-icon svg {
    stroke: currentColor;
}

.contact-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.contact-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-card-link {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-card-link:hover {
    color: var(--secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Services */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-item {
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.service-item h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.service-price {
    font-weight: 600;
    color: var(--secondary);
    margin-top: 0.5rem;
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Stub page - "На стадии разработки" */
.stub-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
}

.stub-content {
    text-align: center;
    max-width: 560px;
}

.stub-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.stub-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.stub-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.stub-btn {
    display: inline-block;
}

/* Footer */
.footer {
    background: var(--footer-bg, var(--primary-dark));
    color: var(--footer-color, rgba(255, 255, 255, 0.9));
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    font-size: 0.95rem;
}

/* Two-column section (TIPP JUHT style) */
.two-col-section {
    padding: 4rem 0;
    background: var(--bg-section);
}

.two-col-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.two-col-section .col-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.two-col-section .col-subheading {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.two-col-section .col-text {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Responsive */
/* ========== Auth (Login / Register) ========== */
.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
}

.auth-card-narrow {
    max-width: 380px;
    text-align: center;
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-alert {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field-checkbox {
    flex-direction: row;
    align-items: center;
}

.auth-field-checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.auth-label-inline {
    font-weight: 500;
    margin: 0;
}

.auth-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
    background: var(--bg-white);
}

.auth-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-field-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.auth-field-error {
    font-size: 0.8rem;
    color: #dc2626;
}

.auth-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.25rem;
}

.auth-btn-primary {
    background: var(--secondary);
    color: white;
}

.auth-btn-primary:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.auth-btn-secondary {
    background: var(--bg-section);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
}

.auth-btn-secondary:hover {
    background: var(--border-color);
}

.auth-btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.auth-btn-outline:hover {
    background: var(--secondary);
    color: white;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--secondary-hover);
    text-decoration: underline;
}

/* ========== Profile ========== */
.profile-page {
    padding: 2rem 0 4rem;
    min-height: 60vh;
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.04) 0%, transparent 40%);
}

.profile-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-header {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(165deg, rgba(13, 148, 136, 0.08) 0%, var(--bg-section) 40%, var(--bg-white) 100%);
}

.profile-avatar-wrap {
    margin-bottom: 1.25rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.25);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.profile-username {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
}

.profile-action-icon {
    font-size: 1rem;
}

.profile-action-primary {
    background: var(--secondary);
    color: white;
    border: 2px solid var(--secondary);
}

.profile-action-primary:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.profile-action-secondary {
    background: white;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.profile-action-secondary:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

@media (max-width: 500px) {
    .profile-actions {
        flex-direction: column;
    }
    .profile-action-btn {
        width: 100%;
        justify-content: center;
    }
    .profile-achievements-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.profile-info-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    margin: 0 2rem 2rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.06) 100%);
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.08);
}

.profile-info-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.profile-info-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--primary-dark);
    line-height: 1.5;
}

.profile-info-text a {
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.profile-info-text a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--secondary);
}

.profile-bio-wrap {
    padding: 2rem 2rem;
    border-top: 1px solid var(--border-color);
}

.profile-bio-wrap:last-child {
    padding-bottom: 2.5rem;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-posts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-posts-list li:last-child {
    border-bottom: none;
}

.profile-posts-list a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
}

.profile-posts-list a:hover {
    color: var(--secondary);
}

.profile-post-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-posts-more {
    margin-top: 1rem;
    margin-bottom: 0;
}

.profile-posts-more a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.profile-posts-more a:hover {
    color: var(--secondary-hover);
}

.profile-bio-text {
    color: var(--text-dark);
    line-height: 1.75;
    white-space: pre-line;
    padding: 0 0.25rem 0;
}

.profile-edit-card {
    max-width: 480px;
}

.profile-edit-password-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.profile-edit-password-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.profile-password-form .auth-field {
    margin-bottom: 1rem;
}

.profile-password-form .auth-btn-secondary {
    margin-top: 0.5rem;
}

.auth-field-error-block {
    display: block;
    margin-bottom: 1rem;
}

.profile-edit-form .auth-btn-primary {
    margin-top: 0.5rem;
}

.profile-edit-avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-edit-avatar-preview {
    flex-shrink: 0;
}

.profile-avatar-preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.profile-edit-avatar-preview .profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    font-size: 1.75rem;
}

.profile-edit-avatar-upload {
    flex: 1;
}

.profile-avatar-input {
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.profile-bio {
    resize: vertical;
    min-height: 100px;
}

/* Bottom nav — мобильная адаптация */
@media (max-width: 600px) {
    .bottom-nav {
        padding: 0 0.5rem 0.5rem;
    }

    .bottom-nav-inner {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.4rem 0.5rem;
        gap: 0.1rem;
    }

    .bottom-nav-item {
        padding: 0.35rem 0.4rem;
        min-width: 44px;
    }

    .bottom-nav-icon {
        width: 20px;
        height: 20px;
    }

    .bottom-nav-label {
        font-size: 0.6rem;
    }

    .bottom-nav-dropdown {
        right: -0.5rem;
        min-width: 160px;
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 400px) {
    .bottom-nav-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .nav-container {
        gap: 0.75rem;
    }

    /* Burger menu — убрано (нижнее меню) */
    .nav-burger-btn {
        display: flex;
        z-index: 1002;
        margin-left: auto;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(30, 58, 95, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 999;
        pointer-events: none;
    }

    .navbar.nav-menu-open .nav-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 92vw);
        min-width: 280px;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 70px 1rem 1.5rem;
        background: var(--bg-white);
        box-shadow: -4px 0 24px rgba(30, 58, 95, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
    }

    .navbar.nav-menu-open .nav-menu {
        transform: translateX(0);
    }

    .nav-main {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-main .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .nav-spacer {
        display: none;
    }

    .nav-dropdown {
        padding-bottom: 0.5rem;
    }

    .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(13, 148, 136, 0.06);
        border-radius: 8px;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: hidden;
        transition: max-height 0.35s ease, padding 0.3s ease, margin 0.3s ease;
    }

    .nav-dropdown-menu.nav-dropdown-open {
        max-height: 220px;
        margin-top: 0.35rem;
        padding: 0.5rem;
        visibility: visible;
    }

    .nav-dropdown-link {
        display: block;
        padding: 0.65rem 1rem;
        overflow-wrap: break-word;
    }

    .nav-user-wrap,
    .nav-icons,
    .nav-menu > li:last-child {
        padding-top: 1rem;
    }

    .nav-user-wrap .nav-link,
    .nav-icons .nav-icon-btn,
    .nav-menu > li:last-child .nav-icon-btn {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    .nav-user-text {
        max-width: none;
        overflow: visible;
    }

    .nav-icons {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-cta-text {
        display: inline;
    }

    .nav-cta-btn {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }

    .nav-mini-icon {
        width: 1.1rem;
        height: 1.1rem;
        margin-right: 0.5rem;
    }

    body.nav-menu-open {
        overflow: hidden;
    }

    .auth-card {
        padding: 1.75rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .about-with-photo {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .home-about .about-card {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .about-photo-wrap {
        display: flex;
        justify-content: center;
    }

    .about-photo {
        width: 160px;
        height: 160px;
    }

    .home-about .about-photo {
        width: 140px;
        height: 140px;
    }

    .about-text-wrap {
        text-align: center;
    }

    .about-text-wrap .section-title {
        text-align: center;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-title {
        font-size: 1.4rem;
    }

    .hero-section {
        padding: 3.5rem 0 4rem;
    }

    .home-hero {
        padding: 4rem 0 5rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .page-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .two-col-section .container {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* Page transition */
.page-transition {
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auctions */
:root {
    --auction-gold: #d4a017;
    --auction-gold-light: #f5e6c8;
    --auction-gold-dark: #b8860b;
}

.auctions-intro {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.auction-cta-block {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(13, 148, 136, 0.04) 100%);
    border: 1px solid rgba(13, 148, 136, 0.25);
    border-radius: 14px;
}

.auction-cta-icon {
    flex-shrink: 0;
    font-size: 1.75rem;
    line-height: 1;
}

.auction-cta-text {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary-dark);
    line-height: 1.5;
}

.auction-cta-text a {
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.auction-cta-text a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--secondary);
}

.auction-list-actions {
    margin-bottom: 1.5rem;
}

.auction-list-actions .auth-btn {
    margin-top: 0;
}

.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.auction-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--auction-gold-light);
}

.auction-card-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-light);
}

.auction-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--auction-gold-light), #fff);
}

.auction-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--auction-gold);
    color: #fff;
}

.auction-badge-bulky-large {
    position: static;
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
}

.auction-card-body {
    padding: 1.25rem;
    flex: 1;
}

.auction-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.auction-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.auction-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--auction-gold-dark);
}

/* Состоявшиеся аукционы */
.ended-auctions {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.ended-auctions-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.ended-auctions-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.ended-auctions-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.ended-auctions-grid li {
    margin: 0;
}

.ended-auction-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    transition: var(--transition);
}

.ended-auction-icon:hover {
    border-color: var(--auction-gold-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: var(--secondary);
}

.ended-auction-icon-image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ended-auction-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ended-auction-icon-placeholder {
    font-size: 1.75rem;
    line-height: 1;
}

.ended-auction-icon-title {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .ended-auctions-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }
    .ended-auction-icon-image {
        width: 52px;
        height: 52px;
    }
    .ended-auction-icon-placeholder {
        font-size: 1.4rem;
    }
}

.auction-detail-page {
    max-width: 1100px;
}

.auction-detail {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .auction-detail {
        grid-template-columns: 1fr;
    }
}

.auction-detail-main {
    min-width: 0;
}

.auction-detail-image-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 1.5rem;
}

.auction-detail-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Галерея фото лота */
.auction-gallery {
    position: relative;
}

.auction-gallery-main {
    position: relative;
    display: flex;
    align-items: center;
}

.auction-gallery-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--auction-gold-light), #fff);
}

.auction-gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-light);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scale(0.98);
}

.auction-gallery-image.active {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

.auction-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    color: var(--primary-dark);
}

.auction-gallery-nav:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.2);
    color: var(--secondary);
}

.auction-gallery-nav svg {
    width: 24px;
    height: 24px;
}

.auction-gallery-prev {
    left: 12px;
}

.auction-gallery-next {
    right: 12px;
}

.auction-gallery-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.auction-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auction-gallery-thumb {
    width: 64px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
}

.auction-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-gallery-thumb:hover {
    border-color: var(--secondary);
}

.auction-gallery-thumb.active {
    border-color: var(--auction-gold);
    box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.3);
}

/* Одно фото — скрываем навигацию */
.auction-gallery[data-single="true"] .auction-gallery-nav,
.auction-gallery[data-single="true"] .auction-gallery-thumbs {
    display: none;
}

.auction-detail-placeholder {
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    background: linear-gradient(135deg, var(--auction-gold-light), #fff);
}

.auction-detail-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.auction-current-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auction-gold-dark);
}

.auction-end-date {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auction-detail-description {
    line-height: 1.8;
    color: var(--text-dark);
}

.auction-bid-panel {
    position: sticky;
    top: 1rem;
}

.auction-bid-box {
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.auction-bid-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.auction-min-bid {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.auction-bid-form .auth-input {
    width: 100%;
    margin-bottom: 1rem;
}

.auction-bid-btn {
    width: 100%;
}

.auction-payment-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.5;
}

.auction-login-hint {
    padding: 1.5rem;
    background: var(--bg-section);
    border-radius: 16px;
}

.auction-pending-override {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #fef3c7;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #92400e;
}

.auction-ended-box {
    padding: 1.5rem;
    background: #d1fae5;
    border-radius: 16px;
    border: 1px solid #a7f3d0;
}

.auction-ended-box h3 {
    margin-bottom: 0.75rem;
    color: #065f46;
}

.auction-ended-price {
    margin-bottom: 1rem;
}

.auction-winner-box .auction-winner-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #a7f3d0;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.auction-winner-box .auction-winner-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.2);
}

.auction-winner-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auction-winner-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

.auction-winner-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.auction-winner-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auction-winner-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    overflow-wrap: break-word;
}

.auction-winner-username {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    overflow-wrap: break-word;
}

.auction-winner-arrow {
    flex-basis: 100%;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--secondary);
    text-align: right;
    margin-top: 0.25rem;
}

.auction-price-chart-section {
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: linear-gradient(145deg, rgba(212, 160, 23, 0.06), rgba(30, 58, 95, 0.04));
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: 16px;
}

.auction-price-chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
}

.auction-price-chart-wrap {
    position: relative;
    height: 240px;
}

.auction-bids-history {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auction-bids-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.auction-bids-cards {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auction-bid-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.auction-bid-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
}

.auction-bid-card-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.auction-bid-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auction-bid-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--auction-gold-light), var(--auction-gold));
    color: var(--auction-gold-dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.auction-bid-card-info {
    flex: 1;
    min-width: 0;
}

.auction-bid-card-name {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
}

.auction-bid-card-username {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auction-bid-card-right {
    flex-shrink: 0;
    text-align: right;
}

.auction-bid-card-amount {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--auction-gold-dark);
}

.auction-bid-status-pending {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.auction-bid-card-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Blog Channel Page (Мой Блог) */
.blog-channel-page {
    max-width: 700px;
    margin: 0 auto;
}

.blog-channel-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.blog-channel-link {
    display: block;
    padding: 2.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.blog-channel-link:hover {
    background: var(--bg-section);
}

.blog-channel-telegram {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.blog-telegram-logo {
    width: 80px;
    height: 80px;
    color: #0088cc;
}

.blog-channel-image-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
}

.blog-channel-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-color);
}

.blog-channel-title {
    font-size: 1.35rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.blog-channel-desc {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1rem;
}

.blog-channel-cta {
    display: block;
    text-align: center;
    font-weight: 600;
    color: var(--secondary);
}

/* Home Orders section */
.home-orders {
    padding: 4rem 0;
    background: var(--bg-section);
}

.home-orders .section-title,
.home-orders .section-subtitle {
    text-align: center;
}

.home-page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.home-form-section,
.home-services-section,
.home-contact-info {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.06);
}

.home-section-h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.btn-home-form {
    margin-top: 0.5rem;
}

.service-item h4 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* Home Contacts section */
.home-contacts {
    padding: 4rem 0;
    background: var(--bg-light);
}

.home-contacts .section-title,
.home-contacts .section-subtitle {
    text-align: center;
}

.home-contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .home-page-layout,
    .home-contact-layout {
        grid-template-columns: 1fr;
    }

    .home-form-section,
    .home-services-section,
    .home-contact-info {
        padding: 1.5rem;
    }
}

/* Home Blog section */
.home-blog {
    padding: 4rem 0;
    background: var(--bg-section);
}

.blog-channel-card-home {
    max-width: 520px;
    margin: 0 auto;
}

/* Orders Reviews */
.reviews-form-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.review-form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.reviews-section-title {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.reviews-list {
    list-style: none;
    margin-top: 1rem;
}

.review-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: none;
}

.review-author-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.review-author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.review-author-link:hover {
    opacity: 0.85;
}

.review-author-link:hover .review-author-name {
    color: var(--secondary);
}

.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.review-avatar-placeholder {
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.review-author-name {
    font-weight: 500;
    flex: 1;
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.review-text {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

/* Portfolio Reviews */
.portfolio-reviews {
    margin-top: 3rem;
    max-width: 700px;
}

.portfolio-reviews .reviews-section-title {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 1rem;
}

/* Reviews Moderation */
.reviews-moderation-list {
    max-width: 700px;
    margin-top: 1.5rem;
}

.review-moderation-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-moderation-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.review-moderation-author:hover {
    opacity: 0.9;
}

.review-moderation-author:hover .review-author-name {
    color: var(--secondary);
}

.review-moderation-meta {
    flex: 1;
}

.review-moderation-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.review-moderation-actions {
    display: flex;
    gap: 0.75rem;
}

/* Profile Reviews */
.profile-reviews-list {
    list-style: none;
}

.profile-review-item {
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.profile-review-item:last-child {
    margin-bottom: 0;
}

.profile-review-text {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.profile-review-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-reviews-wrap .profile-section-link {
    margin-top: 1.25rem;
}

/* Profile Achievements */
.profile-achievements-wrap {
    margin-top: 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    transition: var(--transition);
}

.achievement-unlocked {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 193, 7, 0.04) 100%);
    border-color: rgba(255, 193, 7, 0.4);
}

.achievement-unlocked:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
}

.achievement-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ff8c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.achievement-icon {
    font-size: 2rem;
    line-height: 1;
}

.achievement-info {
    text-align: center;
}

.achievement-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.achievement-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.achievement-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-achievements-empty {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.profile-achievements-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.5rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.profile-nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.profile-nav-link:hover {
    background: var(--bg-white);
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}

.profile-section-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.profile-section-link:hover {
    color: var(--primary-dark);
}

/* Профиль: приобретённые лоты */
.profile-won-lots-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.profile-won-lots-grid li {
    margin: 0;
}

.profile-won-lot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.profile-won-lot-card:hover {
    border-color: var(--auction-gold);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.15);
}

.profile-won-lot-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--bg-white);
}

.profile-won-lot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-won-lot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
}

.profile-won-lot-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary-dark);
}

.profile-won-lot-price {
    font-size: 0.85rem;
    color: var(--auction-gold-dark);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Профиль: приобретённые услуги */
.profile-services-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-service-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.04), rgba(13, 148, 136, 0.08));
    border: 2px solid rgba(13, 148, 136, 0.15);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.profile-service-card:last-child {
    margin-bottom: 0;
}

.profile-service-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
}

.profile-service-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.profile-service-type {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.profile-service-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    background: var(--bg-white);
    border-radius: 6px;
}

.profile-service-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

.profile-service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.profile-service-link:hover {
    color: var(--primary-dark);
}

.profile-service-link::after {
    content: "↗";
    font-size: 0.85em;
}

/* Goals & Habits */
.goals-page {
    min-height: 60vh;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.04) 0%, transparent 50%);
}

.goals-header {
    padding: 2rem clamp(16px, 3vw, 32px) 1.5rem;
    text-align: center;
    max-width: min(1400px, calc(100vw - 64px));
    margin: 0 auto;
    box-sizing: border-box;
}

.goals-title {
    margin-bottom: 0.5rem;
}

.goals-subtitle {
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Навигация достижения/рейтинг/статистика — сверху, горизонтально */
.goals-top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.goals-layout {
    display: grid;
    grid-template-columns: 1fr minmax(0, min(1400px, calc(100vw - 64px))) 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 32px) 3rem;
    box-sizing: border-box;
}

@media (min-width: 1600px) {
    .goals-header {
        max-width: min(1600px, calc(100vw - 80px));
    }
    .goals-layout {
        grid-template-columns: 1fr minmax(0, min(1600px, calc(100vw - 80px))) 1fr;
    }
}

.goals-layout-spacer {
    /* баланс для центровки */
}

.goals-main {
    min-width: 0;
}

/* Кнопки в шапке: горизонтальные карточки */
.goals-top-nav .goals-stats-link {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    padding: 1rem 1.25rem;
}

@media (max-width: 900px) {
    .goals-layout {
        grid-template-columns: 1fr;
    }

    .goals-layout-spacer {
        display: none;
    }
}

/* Мобильные: компактные кнопки — только эмодзи */
@media (max-width: 600px) {
    .goals-top-nav {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .goals-top-nav .goals-stats-link {
        min-width: 44px;
        max-width: 56px;
        flex: 0 0 auto;
        padding: 0.5rem;
        justify-content: center;
    }

    .goals-top-nav .goals-stats-text,
    .goals-top-nav .goals-stats-arrow {
        display: none;
    }

    .goals-top-nav .goals-stats-icon {
        font-size: 1.5rem;
        margin: 0;
    }
}

/* Тумблер Неделя / Месяц */
.goals-view-toggle {
    display: inline-flex;
    margin-top: 1rem;
    padding: 0.25rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.goals-view-toggle-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.goals-view-toggle-btn:hover {
    color: var(--primary-dark);
    background: var(--bg-white);
}

.goals-view-toggle-btn.goals-view-toggle-active {
    background: var(--bg-white);
    color: var(--secondary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.goals-carry-over-form {
    margin-top: 0.75rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.goals-carry-over-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    user-select: none;
}

.goals-carry-over-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.goals-carry-over-switch {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.goals-carry-over-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.goals-carry-over-checkbox:checked + .goals-carry-over-switch {
    background: var(--secondary);
    border-color: var(--secondary);
}

.goals-carry-over-checkbox:checked + .goals-carry-over-switch::after {
    transform: translateX(20px);
}

.goals-carry-over-checkbox:focus-visible + .goals-carry-over-switch {
    box-shadow: 0 0 0 2px var(--secondary);
}

.goals-carry-over-label:hover .goals-carry-over-switch {
    border-color: var(--secondary);
}

.goals-carry-over-text {
    line-height: 1.3;
}

/* Календарь месяца */
.goals-calendar-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    max-width: 100%;
    min-width: 0;
}

.goals-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.goals-calendar-title {
    font-size: 1.25rem;
}

.goals-calendar-grid-wrap {
    width: 100%;
}

.goals-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.goals-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.goals-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-dark);
    background: var(--bg-section);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.goals-calendar-day-num {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goals-calendar-day-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: wrap;
    max-height: 12px;
    overflow: hidden;
    min-height: 0;
}

.goals-calendar-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.goals-calendar-dot-p0 { background: #94a3b8; }
.goals-calendar-dot-p1 { background: #eab308; }
.goals-calendar-dot-p2 { background: #dc2626; }

.goals-calendar-day:hover {
    background: rgba(13, 148, 136, 0.12);
    border-color: var(--secondary);
}

.goals-calendar-day-other {
    color: var(--text-muted);
    opacity: 0.7;
}

.goals-calendar-day-today {
    background: rgba(13, 148, 136, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Модальное окно дня (полный экран) */
.goals-day-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.goals-day-modal[hidden] {
    display: none;
}

.goals-day-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0.4);
    backdrop-filter: blur(4px);
}

.goals-day-modal-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.goals-day-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
}

.goals-day-modal-close:hover {
    background: var(--bg-section);
    color: var(--primary-dark);
}

.goals-day-modal-head {
    margin-bottom: 1rem;
    padding-right: 2.5rem;
}

.goals-day-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.goals-day-modal-list {
    margin-bottom: 1rem;
}

.goals-day-modal-add {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.goals-day-modal-priority {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-dark);
}

.goals-day-modal-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.goals-day-modal-input:focus {
    outline: none;
    border-color: var(--secondary);
}

.goals-day-modal-add-btn {
    padding: 0.6rem 1.25rem;
    background: var(--secondary);
    color: var(--bg-white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.goals-day-modal-add-btn:hover {
    background: var(--secondary-hover);
}

.goals-day-modal-loading {
    color: var(--text-muted);
    padding: 1rem;
    margin: 0;
}

@media (max-width: 600px) {
    .goals-view-toggle {
        margin-top: 0.75rem;
    }
    .goals-view-toggle-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    .goals-calendar-day {
        font-size: 0.85rem;
    }
    .goals-day-modal-box {
        max-height: 85vh;
        padding: 1rem;
    }
}

.goals-add-section,
.goals-list-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* Неделя Пн–Вс */
.goals-week-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    max-width: 100%;
    min-width: 0;
    overflow: hidden; /* дни не выходят за границы блока */
}

.goals-week-grid-wrap {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.goals-week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.goals-week-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--primary-dark);
    text-decoration: none;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.goals-week-nav svg {
    flex-shrink: 0;
}

.goals-week-nav:hover {
    background: rgba(13, 148, 136, 0.08);
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.goals-week-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.goals-week-title {
    margin-bottom: 0;
    font-size: 1rem;
}

.goals-week-today-link {
    font-size: 0.85rem;
    color: var(--secondary);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.goals-week-today-link:hover {
    background: rgba(13, 148, 136, 0.12);
    text-decoration: underline;
}

.goals-week-progress {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.goals-week-progress strong {
    color: var(--primary-dark);
}

.goals-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    min-width: 0;
}

.goals-week-day {
    min-width: 0;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
}

.goals-week-day-list {
    flex: 1;
    min-height: 0;
}

.goals-week-day-today {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.goals-week-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.goals-week-day-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.goals-week-day-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.goals-week-day-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.goals-day-add-form {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
}

.goals-day-add-priority {
    width: auto;
    min-width: 0;
    max-width: 5rem;
    padding: 0.35rem 0.4rem;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
}

.goals-day-add-input {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.4;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    resize: none;
    overflow-y: hidden;
    box-sizing: border-box;
    transition: var(--transition);
}

.goals-day-add-input::placeholder {
    color: var(--text-muted);
}

.goals-day-add-input:focus {
    outline: none;
    border-color: var(--secondary);
}

.goals-day-add-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.goals-day-add-btn:hover {
    background: var(--secondary-hover);
    transform: scale(1.05);
}

/* Кнопка «Добавить задачу» (открывает модалку) — выше списка по слою, чтобы клики не перехватывались */
.goals-day-add-task-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    background: var(--bg-section);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
}

.goals-day-add-task-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--secondary);
}

/* Модалка добавления задачи */
.goals-add-task-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.goals-add-task-modal[hidden] {
    display: none;
}

.goals-add-task-modal:not([hidden]) {
    display: flex;
}

.goals-add-task-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

.goals-add-task-modal-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 1;
    cursor: default;
}

.goals-add-task-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
}

.goals-add-task-modal-close:hover {
    background: var(--bg-section);
    color: var(--primary-dark);
}

.goals-add-task-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 1.25rem 0;
    padding-right: 2.5rem;
}

.goals-add-task-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goals-add-task-priority-wrap,
.goals-add-task-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.goals-add-task-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.goals-add-task-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    resize: vertical;
    box-sizing: border-box;
}

.goals-add-task-input:focus {
    outline: none;
    border-color: var(--secondary);
}

.goals-add-task-input::placeholder {
    color: var(--text-muted);
}

.goals-add-task-submit {
    align-self: flex-start;
}

.goals-week-item {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8rem;
}

.goals-week-item:last-child {
    border-bottom: none;
}

.goals-week-item-done .goals-week-item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.goals-week-item-done .goal-check {
    background: var(--secondary);
    border-color: var(--secondary);
}

.goal-toggle-inline .goal-check-sm {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    font-size: 0.7rem;
}

.goals-week-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.goals-week-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.goals-week-item-content .goals-unified-badge,
.goals-week-item-content .goals-priority-badge {
    font-size: 0.55rem;
    padding: 0.12rem 0.35rem;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.goals-week-item-title {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    min-width: 0;
    line-height: 1.4;
    margin-top: 0.15em;
}

@media (min-width: 901px) {
    .goals-week-item-title {
        overflow-wrap: normal;
        word-break: normal;
    }
}

.goal-delete-inline .goal-delete-btn-sm {
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1;
}

.goals-week-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.4rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.goals-week-empty-add {
    font-size: 0.8rem;
    color: var(--secondary);
    text-decoration: none;
}

.goals-week-empty-add:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .goals-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .goals-week-grid {
        grid-template-columns: 1fr;
    }

    .goals-week-day-header {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .goals-week-day-name {
        font-size: 0.85rem;
    }

    .goals-week-day-date {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .goals-week-section {
        padding: 0.75rem;
    }

    .goals-week-grid {
        gap: 0.35rem;
    }

    .goals-week-day {
        padding: 0.5rem 0.35rem;
    }

    .goals-week-day-header {
        padding-bottom: 0.3rem;
        margin-bottom: 0.3rem;
    }

    .goals-week-day-name {
        font-size: 0.65rem;
    }

    .goals-week-day-date {
        font-size: 0.75rem;
    }

    .goals-week-item {
        flex-wrap: wrap;
        padding: 0.25rem 0;
        font-size: 0.75rem;
    }

    /* Текст задачи на отдельной строке во всю ширину — удобно читать на узких колонках */
    .goals-week-item-content {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        margin-top: 0.2rem;
    }

    .goals-week-item-content .goals-unified-badge {
        margin-right: 0.35rem;
    }

    .goals-week-item-title {
        font-size: 0.75rem;
        margin-top: 0.1em;
    }

    .goal-toggle-inline .goal-check-sm {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.65rem;
    }

    .goal-delete-inline .goal-delete-btn-sm {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 0.9rem;
    }

    .goals-week-empty {
        font-size: 0.7rem;
        padding: 0.3rem 0;
    }

    .goals-day-add-form {
        margin-top: 0.5rem;
        padding-top: 0.4rem;
        gap: 0.25rem;
    }

    .goals-day-add-input {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .goals-day-add-btn {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }

    .goals-day-add-task-btn {
        margin-top: 0.5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .goals-layout {
        padding-left: 12px;
        padding-right: 12px;
    }

    .goals-week-section {
        padding: 0.5rem;
    }

    .goals-week-grid {
        gap: 0.25rem;
    }

    .goals-week-day {
        padding: 0.4rem 0.25rem;
    }

    .goals-week-day-name {
        font-size: 0.6rem;
    }

    .goals-week-day-date {
        font-size: 0.7rem;
    }

    .goals-day-add-form {
        margin-top: 0.4rem;
        padding-top: 0.35rem;
    }

    .goals-day-add-input {
        font-size: 0.7rem;
        padding: 0.3rem 0.4rem;
    }

    .goals-day-add-btn {
        width: 24px;
        height: 24px;
        font-size: 0.95rem;
    }

    .goals-day-add-task-btn {
        margin-top: 0.4rem;
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
}

.goals-list-unified {
    margin-bottom: 1.5rem;
}

.goals-unified-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.goals-unified-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.goals-unified-item:hover {
    border-color: var(--secondary);
}

.goals-unified-done {
    background: rgba(13, 148, 136, 0.08);
    border-color: rgba(13, 148, 136, 0.25);
}

.goals-unified-done .goals-unified-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.goals-unified-done .goal-check {
    background: var(--secondary);
    border-color: var(--secondary);
}

.goals-unified-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.goals-unified-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.goals-unified-task {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

.goals-unified-goal {
    background: rgba(13, 148, 136, 0.2);
    color: var(--secondary);
}

.goals-priority-badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}
.goals-priority-0 { background: rgba(107, 114, 128, 0.2); color: #6b7280; }
.goals-priority-1 { background: rgba(59, 130, 246, 0.2); color: #2563eb; }
.goals-priority-2 { background: rgba(239, 68, 68, 0.2); color: #dc2626; }

/* Подсветка строки задачи по приоритету */
.goals-week-item.goals-task-priority-0 { background: rgba(107, 114, 128, 0.06); border-left: 3px solid #9ca3af; }
.goals-week-item.goals-task-priority-1 { background: rgba(59, 130, 246, 0.08); border-left: 3px solid #2563eb; }
.goals-week-item.goals-task-priority-2 { background: rgba(239, 68, 68, 0.08); border-left: 3px solid #dc2626; }
.goals-unified-item.goals-task-priority-0 { background: rgba(107, 114, 128, 0.06); border-left: 3px solid #9ca3af; }
.goals-unified-item.goals-task-priority-1 { background: rgba(59, 130, 246, 0.08); border-left: 3px solid #2563eb; }
.goals-unified-item.goals-task-priority-2 { background: rgba(239, 68, 68, 0.08); border-left: 3px solid #dc2626; }

/* Пиллы выбора приоритета */
.goals-priority-pills {
    display: inline-flex;
    padding: 0.2rem;
    background: var(--bg-section);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    gap: 0;
}
.goals-priority-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.goals-priority-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.goals-priority-pill-low { color: #6b7280; }
.goals-priority-pill-low:hover { background: rgba(107, 114, 128, 0.15); }
.goals-priority-radio:checked + .goals-priority-pill-low { background: rgba(107, 114, 128, 0.25); color: #374151; }
.goals-priority-pill-normal { color: #2563eb; }
.goals-priority-pill-normal:hover { background: rgba(59, 130, 246, 0.15); }
.goals-priority-radio:checked + .goals-priority-pill-normal { background: rgba(59, 130, 246, 0.25); color: #1d4ed8; }
.goals-priority-pill-high { color: #dc2626; }
.goals-priority-pill-high:hover { background: rgba(239, 68, 68, 0.15); }
.goals-priority-radio:checked + .goals-priority-pill-high { background: rgba(239, 68, 68, 0.25); color: #b91c1c; }
.goals-priority-pills-modal .goals-priority-pill { padding: 0.5rem 0.85rem; font-size: 0.85rem; }

/* Зона сброса при перетаскивании */
.goals-drop-zone {
    list-style: none;
    min-height: 14px;
    margin: 2px 0;
    border-radius: 6px;
    border: 1px dashed rgba(13, 148, 136, 0.25);
    background: rgba(13, 148, 136, 0.04);
    transition: min-height 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.goals-drop-zone.goals-drop-zone-active {
    min-height: 32px;
    background: rgba(13, 148, 136, 0.18);
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.3);
}
.goals-drop-zone-empty {
    min-height: 40px;
}
.goals-drop-zone-empty.goals-drop-zone-active {
    min-height: 52px;
}

/* Ручка перетаскивания */
.goals-drag-handle {
    width: 20px;
    min-width: 20px;
    height: 100%;
    min-height: 24px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 4px;
    transition: var(--transition);
    touch-action: none;
}
.goals-drag-handle:hover { color: var(--secondary); background: rgba(13, 148, 136, 0.08); }
.goals-drag-handle:active { cursor: grabbing; }
.goals-week-item .goals-drag-handle { margin-right: 0.15rem; }
.goals-unified-item .goals-drag-handle { margin-right: 0.25rem; }
@media (pointer: coarse) {
    .goals-drag-handle { min-width: 32px; min-height: 32px; padding: 6px; }
}
.goals-drag-handle::before {
    content: '';
    display: block;
    width: 4px;
    height: 14px;
    background: currentColor;
    border-radius: 2px;
    box-shadow: 6px 0 0 currentColor;
    opacity: 0.7;
}

.goals-item-move {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
}
.goals-item-move .goal-reorder-form {
    display: inline;
    padding: 0;
    margin: 0;
}
.goals-move-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 18px;
    padding: 0;
    border: none;
    background: var(--bg-section);
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}
.goals-move-btn:hover {
    background: var(--secondary);
    color: var(--bg-white);
}

.goals-unified-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.goals-unified-type {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.4rem !important;
}

.goals-add-section {
    margin-bottom: 1.5rem;
}

.goals-section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: -0.25rem 0 1rem 0;
    line-height: 1.45;
}

.goals-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Блоки с датой */
.goals-date-block {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(13, 148, 136, 0.02) 100%);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 12px;
}

.goals-date-block .goals-section-title {
    margin-bottom: 0;
}

.goals-date-hint {
    margin: -0.5rem 0 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.goals-date-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.goals-date-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.goals-date-picker-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.goals-date-input {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    transition: var(--transition);
}

.goals-date-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.goals-date-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    padding: 0.4rem 0.75rem;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.goals-date-block-inline {
    margin-bottom: 1rem;
}

.goals-date-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    background: var(--bg-white);
    border: 1px solid rgba(13, 148, 136, 0.3);
    border-radius: 10px;
}

.goals-date-field {
    min-width: 150px;
}

/* Выбор даты для задачи: пресеты + календарь */
.goals-date-select-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.goals-date-select-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.goals-date-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.goals-date-preset-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-dark);
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.goals-date-preset-btn:hover {
    border-color: var(--secondary);
    background: var(--bg-light);
}

.goals-date-preset-active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.goals-date-preset-active:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
    color: white;
}

.goals-date-other-wrap {
    margin-top: 0.75rem;
}

.goals-date-other-hidden {
    display: none !important;
}

.goals-date-other-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.goals-date-other-wrap .goals-date-input {
    max-width: 200px;
}

.goals-date {
    font-weight: 400;
    color: var(--text-muted);
}

.goals-form-row {
    margin-bottom: 1.25rem;
}

.goals-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.goals-form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.goals-form-error {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 0.35rem;
    display: block;
}

.goals-form-row-inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.goals-form-row-inline .goals-form-input {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.goals-form-row-inline input[type="date"] {
    max-width: 150px;
}

.daily-tasks-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.daily-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.daily-task-item:last-child {
    border-bottom: none;
}

.daily-task-item .goal-check {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.daily-task-title {
    flex: 1;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.daily-task-done .daily-task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.daily-task-done .goal-check {
    background: var(--secondary);
    border-color: var(--secondary);
}

.goals-form-group {
    margin-bottom: 1.25rem;
}

.goals-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.goals-form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.goals-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.goals-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.goals-radio-label input {
    accent-color: var(--secondary);
}

.goals-radio-text {
    color: var(--text-dark);
}

.goals-submit-btn {
    margin-top: 0.75rem;
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.goals-submit-btn:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, #0f5c54 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.45);
}

.goals-submit-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.goals-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.goal-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.goal-card:hover {
    border-color: var(--secondary);
}

.goal-card-done {
    background: rgba(13, 148, 136, 0.08);
    border-color: rgba(13, 148, 136, 0.3);
}

.goal-check {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.goal-check:hover {
    border-color: var(--secondary);
    background: var(--bg-light);
}

.goal-check-done {
    color: var(--bg-white) !important;
}

.goal-card-done .goal-check {
    background: var(--secondary);
    border-color: var(--secondary);
}

.goal-content {
    flex: 1;
    min-width: 0;
}

.goal-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
}

.goal-type-quit {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.goal-type-develop {
    background: rgba(13, 148, 136, 0.2);
    color: var(--secondary);
}

.goal-period-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.goal-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.015em;
    line-height: 1.4;
    margin: 0.35rem 0 0;
}

.goal-delete-form {
    flex-shrink: 0;
}

.goal-delete-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.goal-delete-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.goals-empty {
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

.goals-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.goals-stats-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.goals-stats-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.3);
    color: white;
}

.goals-stats-icon {
    font-size: 1.5rem;
}

.goals-stats-arrow {
    margin-left: auto;
    opacity: 0.95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.goals-stats-arrow svg {
    display: block;
}

.goals-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goals-achievements-link {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.goals-achievements-link:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

/* Achievements page */
/* Навигация на странице достижений */
.achievements-nav {
    display: inline-flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.achievements-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: transparent;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.achievements-nav-link:hover {
    background: var(--bg-white);
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
}

.achievements-nav-icon {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 500px) {
    .achievements-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .achievements-nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

.achievements-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 3rem;
}

.achievement-card-page {
    min-width: 0;
}

.achievement-locked {
    opacity: 0.7;
}

.achievement-locked .achievement-icon-wrap {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

.achievement-icon-locked {
    filter: grayscale(0.5);
}

.achievement-locked-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Goals Statistics */
.goals-stats-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 3rem;
}

.goals-stats-header {
    padding: 2rem 0;
}

.goals-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    transition: var(--transition);
}

.goals-back-btn:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, #0f5c54 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
    color: white;
}

.goals-back-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Рейтинг целей — карточки лидеров */
.goals-ranking-page .ranking-container {
    max-width: 580px;
    margin: 0 auto;
}

.ranking-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ranking-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.ranking-tab:hover {
    border-color: var(--secondary);
    color: var(--primary-dark);
}

.ranking-tab-active {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(13, 148, 136, 0.05));
    color: var(--primary-dark);
}

.ranking-panel {
    display: none;
}

.ranking-panel-active {
    display: block;
}

.ranking-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.ranking-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ranking-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.ranking-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
    transform: translateY(-1px);
}

.ranking-card-current {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(13, 148, 136, 0.02));
}

.ranking-card-gold {
    border-color: rgba(212, 160, 23, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), transparent);
}

.ranking-card-silver {
    border-color: rgba(148, 163, 184, 0.5);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08), transparent);
}

.ranking-card-bronze {
    border-color: rgba(184, 115, 51, 0.5);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.06), transparent);
}

.ranking-card-rank {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 12px;
}

.ranking-rank-1 { background: linear-gradient(135deg, #ffd700, #d4a017); color: #5c4400; }
.ranking-rank-2 { background: linear-gradient(135deg, #c0c0c0, #94a3b8); color: #334155; }
.ranking-rank-3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #4a3728; }
.ranking-card-rank:not(.ranking-rank-1):not(.ranking-rank-2):not(.ranking-rank-3) {
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.ranking-card-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.ranking-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-card-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

.ranking-card-info {
    flex: 1;
    min-width: 0;
}

.ranking-card-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.ranking-card-username {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ranking-card-badge {
    margin-left: 0.25rem;
}

.ranking-card-stats {
    flex-shrink: 0;
    text-align: right;
}

.ranking-card-score {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
}

.ranking-card-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ranking-card-detail {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.ranking-card-stats-streak .ranking-card-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.ranking-card-stats-streak .streak-flame {
    font-size: 1.2rem;
    line-height: 1;
}

.ranking-empty-card {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

.ranking-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.ranking-empty-card p {
    margin: 0.5rem 0;
    color: var(--text-muted);
}

.ranking-formula {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.goals-stats-subtitle {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stats-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.chart-container {
    height: 280px;
    background: var(--bg-section);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-doughnut {
    max-width: 320px;
    height: 320px;
}

.stats-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-summary-card-wide {
    grid-column: 1 / -1;
}

.stats-summary-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
}

.stats-summary-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stats-summary-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.stats-summary-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stats-by-goal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.stats-goal-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
}

.stats-goal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stats-goal-type-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.stats-goal-period {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stats-goal-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
    margin: 0 0 1rem;
}

.stats-goal-progress-wrap {
    margin-top: 0.5rem;
}

.stats-goal-progress-bar {
    height: 8px;
    background: var(--bg-section);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stats-goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stats-goal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-goal-rate {
    font-weight: 600;
    color: var(--secondary);
}

.stats-empty {
    color: var(--text-muted);
    padding: 1rem 0;
}

/* ========== Site Stats Page (Admin) ========== */
.stats-page {
    min-height: 70vh;
    padding: 2rem 24px 4rem;
    background: linear-gradient(180deg, rgba(30, 58, 95, 0.06) 0%, transparent 30%, rgba(13, 148, 136, 0.04) 100%);
}

.stats-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.stats-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.stats-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.stats-block {
    margin-bottom: 2.5rem;
}

.stats-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.stats-block-registrations .stats-block-title { border-bottom-color: rgba(245, 158, 11, 0.5); }
.stats-block-visits .stats-block-title { border-bottom-color: rgba(13, 148, 136, 0.5); }
.stats-block-online .stats-block-title { border-bottom-color: rgba(34, 197, 94, 0.5); }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.stats-cards-single {
    max-width: 280px;
}

.stats-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
}

.stats-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border-radius: 14px;
    flex-shrink: 0;
}

/* Регистрации — оранжевые оттенки */
.stats-card-reg-day .stats-card-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stats-card-reg-month .stats-card-icon { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.stats-card-reg-year .stats-card-icon { background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%); }
.stats-card-reg-total .stats-card-icon { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }

/* Посещения — бирюзовые оттенки */
.stats-card-visits-day .stats-card-icon { background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%); }
.stats-card-visits-month .stats-card-icon { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.stats-card-visits-year .stats-card-icon { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

/* Онлайн — зелёный */
.stats-card-online-now .stats-card-icon { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }

.stats-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stats-card-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    overflow-wrap: break-word;
}

.stats-chart-section {
    max-width: 900px;
    margin: 0 auto 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.08);
}

.stats-chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.stats-chart-wrap {
    height: 300px;
}

.stats-footer {
    text-align: center;
    margin-top: 2rem;
}

.stats-back-link {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.stats-back-link:hover {
    color: var(--primary-dark);
}

/* ========== Landing (гости) ========== */
.home-landing-hero {
    padding: 4rem 0 5rem;
    text-align: center;
    background: var(--bg-white);
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(13, 148, 136, 0.35);
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.landing-hero-badge-icon {
    font-size: 1rem;
}

.landing-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.landing-hero-accent {
    color: var(--secondary);
}

.landing-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.landing-hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-landing-primary {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: var(--secondary);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-landing-primary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-landing-secondary {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: white;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-landing-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary) !important;
}

.landing-hero-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.landing-hero-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-feature-icon {
    font-size: 1.1rem;
}

.landing-hero-badge-bottom {
    margin-bottom: 0;
}

.landing-features-section {
    padding: 4rem 0 5rem;
    background: var(--bg-light);
}

.landing-features-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.75rem;
}

.landing-features-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 3rem;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.landing-feature-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.landing-feature-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.landing-feature-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.landing-feature-card-icon svg {
    width: 24px;
    height: 24px;
}

.landing-feature-icon-blue { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.landing-feature-icon-teal { background: rgba(13, 148, 136, 0.15); color: var(--secondary); }
.landing-feature-icon-purple { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.landing-feature-icon-orange { background: rgba(249, 115, 22, 0.15); color: #ea580c; }

.landing-feature-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.landing-feature-card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.landing-cta-section {
    padding: 3rem 0;
    text-align: center;
}

.landing-cta-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-landing-cta {
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .landing-features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Dashboard (авторизованные) ========== */
.dashboard-page {
    padding: 2rem 0 7rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-greeting {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}

.dashboard-date {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.dashboard-date-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.dashboard-calendar-icon {
    width: 20px;
    height: 20px;
}

.dashboard-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-summary-card {
    background: var(--bg-white);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dashboard-summary-content {
    min-width: 0;
}

.dashboard-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.dashboard-summary-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.dashboard-summary-sublabel {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.dashboard-summary-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.dashboard-summary-icon svg {
    width: 20px;
    height: 20px;
}

.dashboard-icon-tasks { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.dashboard-icon-balance { background: rgba(13, 148, 136, 0.15); color: var(--secondary); }
.dashboard-icon-expenses { background: rgba(239, 68, 68, 0.15); color: #dc2626; }

.dashboard-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-column {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.dashboard-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-column-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-column-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
    text-decoration: none;
}

.dashboard-column-link:hover {
    text-decoration: underline;
}

.dashboard-add-task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-task-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
}

.dashboard-tasks-list, .dashboard-transactions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-task-item:last-child {
    border-bottom: none;
}

.dashboard-task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
    transition: var(--transition);
}

.dashboard-task-checkbox:hover {
    border-color: var(--secondary);
}

.dashboard-task-done {
    background: var(--secondary);
    border-color: var(--secondary);
}

.dashboard-task-title {
    flex: 1;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.dashboard-task-priority {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.dashboard-priority-badge-0 { background: #64748b; color: white; }
.dashboard-priority-badge-1 { background: #eab308; color: white; }
.dashboard-priority-badge-2 { background: #dc2626; color: white; }

.dashboard-transaction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-transaction-item:last-child {
    border-bottom: none;
}

.dashboard-transaction-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.dashboard-transaction-icon svg {
    width: 18px;
    height: 18px;
}

.dashboard-tx-income { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.dashboard-tx-expense { background: rgba(239, 68, 68, 0.15); color: #dc2626; }

.dashboard-transaction-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.dashboard-transaction-category {
    font-size: 0.95rem;
    font-weight: 500;
}

.dashboard-transaction-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dashboard-transaction-amount {
    font-weight: 600;
}

.dashboard-amount-income { color: #16a34a; }
.dashboard-amount-expense { color: #dc2626; }

.dashboard-empty {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-add-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
    text-decoration: none;
}

.dashboard-add-link:hover {
    text-decoration: underline;
}

.dashboard-add-task-btn {
    display: none;
}

.dashboard-add-operation-btn {
    display: inline-block;
}

.dashboard-quick-actions-title {
    display: none;
}

.dashboard-quick-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    border-radius: 16px;
    margin-top: 2rem;
}

.dashboard-quick-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.dashboard-quick-action:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.dashboard-quick-action-icon {
    width: 22px;
    height: 22px;
}

.dashboard-quick-action-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
    .dashboard-summary-cards {
        grid-template-columns: 1fr;
    }
    .dashboard-add-form-inline {
        display: none !important;
    }
    .dashboard-add-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        margin-top: 1rem;
        padding: 0.75rem 1rem;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-dark);
        text-decoration: none;
        transition: var(--transition);
    }
    .dashboard-add-btn:hover {
        background: var(--bg-light);
        border-color: var(--secondary);
        color: var(--secondary);
    }
    .dashboard-quick-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1.5rem;
        margin-top: 2rem;
        background: var(--secondary);
        border-radius: 16px;
    }
    .dashboard-quick-actions-title {
        display: block;
        font-size: 1rem;
        font-weight: 700;
        color: white;
        margin: 0 0 1rem;
    }
    .dashboard-quick-action {
        background: white;
        color: var(--text-dark);
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    .dashboard-quick-action:hover {
        background: rgba(255, 255, 255, 0.95);
        color: var(--secondary);
    }
    .dashboard-quick-action .dashboard-quick-action-icon {
        color: var(--secondary);
    }
}

/* ========== Finances ========== */
.finances-page {
    padding: 2rem 0 7rem;
}

.finances-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.finances-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}

.finances-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.btn-finances-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    color: white !important;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-finances-add:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.finances-add-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.finances-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.finances-summary-card {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.finances-summary-content {
    min-width: 0;
}

.finances-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.finances-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.finances-summary-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.finances-summary-icon svg {
    width: 24px;
    height: 24px;
}

.finances-icon-balance {
    background: rgba(148, 163, 184, 0.15);
    color: var(--secondary);
}

.finances-icon-income {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.finances-icon-expense {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.finances-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.finances-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.finances-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem;
}

.finances-transaction-list, .finances-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.finances-transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.finances-transaction-item:last-child {
    border-bottom: none;
}

.finances-tx-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.finances-tx-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.finances-tx-income {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.finances-tx-expense {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.finances-tx-info {
    flex: 1;
    min-width: 0;
}

.finances-tx-name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.2rem;
}

.finances-tx-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.finances-tx-category {
    padding: 0.15rem 0.5rem;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 6px;
}

.finances-tx-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.finances-tx-date-icon {
    width: 14px;
    height: 14px;
}

.finances-tx-amount {
    font-weight: 600;
}

.finances-amount-income { color: #16a34a; }
.finances-amount-expense { color: #dc2626; }

.finances-tx-actions {
    display: flex;
    gap: 0.25rem;
}

.finances-action-link,
.finances-action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.finances-action-link:hover,
.finances-action-btn:hover {
    color: var(--secondary);
}

.finances-category-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.finances-category-item:last-child {
    border-bottom: none;
}

.finances-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.finances-category-name {
    font-weight: 500;
    color: var(--text-dark);
}

.finances-category-amount {
    font-weight: 600;
    color: var(--text-dark);
}

.finances-category-bar-wrap {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.finances-category-bar {
    height: 100%;
    background: var(--secondary);
    border-radius: 3px;
    min-width: 4px;
    transition: width 0.3s ease;
}

.finances-empty {
    padding: 1rem 0;
    color: var(--text-muted);
}

/* Modal */
.finances-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(30, 58, 95, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.finances-modal-overlay[hidden] {
    display: none;
}

.finances-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(30, 58, 95, 0.2);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.finances-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.finances-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.finances-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
}

.finances-modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.finances-modal-form {
    padding: 1.5rem;
}

.finances-modal-type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.finances-type-tab {
    flex: 1;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.finances-type-tab:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.finances-type-tab.finances-type-active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.finances-type-tab.finances-type-expense.finances-type-active {
    background: #dc2626;
    border-color: #dc2626;
}

.finances-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.finances-modal-fields .finances-form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.finance-input, .finance-select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
}

.finance-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.finances-modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.finances-modal-submit {
    flex: 1;
}

.finances-error {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Finances responsive */
@media (max-width: 900px) {
    .finances-main-grid {
        grid-template-columns: 1fr;
    }

    .finances-summary-cards {
        grid-template-columns: 1fr;
    }

    .finances-header {
        flex-direction: column;
    }

    .btn-finances-add {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Streak (дни подряд) ========== */
@keyframes streak-flame-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.15); }
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 180, 60, 0.3);
}

.streak-badge-active .streak-flame {
    display: inline-block;
    animation: streak-flame-pulse 1.2s ease-in-out infinite;
}

.streak-flame {
    font-size: 1.1rem;
    line-height: 1;
}

.streak-count {
    min-width: 1.2em;
}

.streak-separator {
    color: rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.streak-best {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted, #666);
}

.top-header .streak-badge {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
}

.dashboard-header .streak-badge {
    margin-top: 0.5rem;
    display: inline-flex;
}

.profile-streak-wrap {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.profile-streak-wrap .streak-badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
}

/* ── Telegram секция в профиле ── */
.profile-telegram-wrap .profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Подключён */
.tg-connected-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(34,158,217,0.1) 0%, rgba(34,158,217,0.05) 100%);
    border: 1.5px solid rgba(34,158,217,0.25);
    border-radius: 14px;
}

.tg-connected-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #229ED9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-connected-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tg-connected-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #229ED9;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tg-connected-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.tg-connected-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tg-disconnect-form {
    flex-shrink: 0;
}

.tg-disconnect-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tg-disconnect-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Не подключён */
.tg-connect-card {
    border: 1.5px dashed rgba(34,158,217,0.3);
    border-radius: 14px;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(34,158,217,0.04) 0%, transparent 100%);
}

.tg-connect-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.tg-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-step {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.tg-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #229ED9;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.tg-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tg-step-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.tg-bot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: #229ED9;
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    width: fit-content;
}

.tg-bot-link:hover {
    background: #1a8bbf;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34,158,217,0.35);
}

.tg-widget-wrap {
    min-height: 36px;
}

/* ── Блок с кодом привязки Telegram ── */
.tg-code-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    border: 1.5px solid rgba(34,158,217,0.2);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    width: fit-content;
}

.tg-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #229ED9;
    letter-spacing: 0.05em;
    user-select: all;
}

.tg-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(34,158,217,0.3);
    border-radius: 6px;
    background: white;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tg-copy-btn:hover {
    background: #229ED9;
    color: white;
    border-color: #229ED9;
}

[data-theme="dark"] .tg-code-block {
    background: var(--bg-section);
}

[data-theme="dark"] .tg-copy-btn {
    background: var(--bg-light);
}
