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

:root {
  /* UI Kit v1.0 tokens */
  --bg:        #0c0c0f;
  --surface:   #131317;
  --surface2:  #1a1a20;
  --border:    #22222c;
  --border2:   #2e2e3a;
  --accent:    #c8f53d;
  --accent-dim:#4a6b1a;
  --teal:      #3df5b4;
  --teal-dim:  #0d3326;
  --red:       #ff6b6b;
  --orange:    #ffaa4d;
  --text:      #f0f0f2;
  --text2:     #a0a0b8;
  --text3:     #60607a;
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-display: 'Unbounded', sans-serif;
  --font-body:    'Golos Text', sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 32px rgba(200,245,61,0.12);
  /* backward-compat aliases */
  --primary-dark:   var(--text2);
  --primary:        var(--surface2);
  --secondary:      var(--teal);
  --secondary-hover:var(--teal);
  --text-dark:      var(--text);
  --text-muted:     var(--text2);
  --bg-white:       var(--surface);
  --bg-light:       var(--bg);
  --bg-section:     var(--surface2);
  --border-color:   var(--border);
  --body-bg:        var(--bg);
  --footer-bg:      var(--bg);
  --footer-color:   var(--text2);
  --bottom-nav-space: calc(4rem + env(safe-area-inset-bottom));
  --transition:     all 0.3s ease;
}


/* Dark theme: header with subtle glass effect */


/* Dark theme: smooth color transitions */


/* Dark theme: muted bottom nav */


/* Dark theme: custom scrollbar */


body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--body-bg, var(--bg-white));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.no-scroll {
    overflow: hidden;
}

.push-permission-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.push-permission-modal[hidden] {
    display: none !important;
}

.push-permission-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
}

.push-permission-card {
    position: relative;
    width: min(440px, 100%);
    border: 1px solid rgba(52, 211, 153, 0.36);
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(15, 23, 42, 0.96), rgba(10, 30, 30, 0.96));
    box-shadow: 0 20px 42px rgba(2, 8, 23, 0.56);
    padding: 1.05rem 1rem 1rem;
    animation: pushModalIn 0.22s ease;
}

.push-permission-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(100, 116, 139, 0.42);
    background: rgba(2, 6, 23, 0.5);
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.push-permission-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    border: 1px solid rgba(52, 211, 153, 0.45);
    background: rgba(16, 185, 129, 0.18);
    margin-bottom: 0.7rem;
}

.push-permission-title {
    margin: 0;
    font-size: 1.08rem;
    color: #f8fafc;
}

.push-permission-text {
    margin: 0.45rem 0 0;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.45;
}

.push-permission-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.push-permission-btn {
    border-radius: 11px;
    padding: 0.62rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.push-permission-btn--primary {
    color: #042f2e;
    border-color: rgba(52, 211, 153, 0.75);
    background: linear-gradient(135deg, #34d399, #2dd4bf);
}

.push-permission-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(52, 211, 153, 0.28);
}

.push-permission-btn--ghost {
    color: #cbd5e1;
    border-color: rgba(100, 116, 139, 0.44);
    background: rgba(15, 23, 42, 0.58);
}

.push-permission-btn--ghost:hover {
    background: rgba(30, 41, 59, 0.72);
}

@keyframes pushModalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.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;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .theme-toggle {
        right: 0.6rem;
    }
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
    border-radius: 999px;
}

.theme-toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    width: 56px;
    height: 28px;
    border-radius: 999px;
    background: #d1e8ff;
    border: 1.5px solid #b8d8f8;
    transition: background 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
    padding: 0 5px;
    justify-content: space-between;
}


.theme-toggle-thumb {
    position: absolute;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
    z-index: 2;
    pointer-events: none;
}


.theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: color 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
}

.theme-icon-sun {
    color: #f59e0b;
    opacity: 1;
}
.theme-icon-moon {
    color: var(--text2);
    opacity: 0.5;
}


/* Плавающее нижнее меню */
.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: #131317;
    border-radius: 28px;
    border: 1px solid #22222c;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    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: #60607a;
    text-decoration: none;
    border-radius: 16px;
    transition: var(--transition);
    min-width: 56px;
}

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

.bottom-nav-item.active {
    color: #c8f53d;
}
.bottom-nav-item.active .bottom-nav-icon {
    stroke: #c8f53d;
}

.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: #1a1a20;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid #2e2e3a;
    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-section {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bottom-nav-dropdown-divider {
    height: 1px;
    margin: 0.35rem 0.4rem;
    background: linear-gradient(90deg, transparent 0%, rgba(100,116,139,0.45) 22%, rgba(100,116,139,0.45) 78%, transparent 100%);
}

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

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

.bottom-nav-dropdown-link--primary {
    font-weight: 700;
    color: #e2e8f0;
}

.bottom-nav-dropdown-link--danger {
    color: #fca5a5;
}

.bottom-nav-dropdown-link--danger:hover {
    background: rgba(239,68,68,0.13);
    color: #fecaca;
}

.bottom-nav-dropdown-link--push {
    border: 1px solid rgba(52, 211, 153, 0.38);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 118, 110, 0.12));
    color: #86efac;
    font-weight: 700;
}

.bottom-nav-dropdown-link--push:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(15, 118, 110, 0.16));
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.58);
}

.bottom-nav-dropdown-vip {
    color: var(--secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.3rem;
    padding-bottom: 0.85rem;
}

.bottom-nav-badge-active {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.38rem;
    padding: 0.06rem 0.42rem;
    border-radius: 999px;
    background: rgba(34,197,94,0.22);
    border: 1px solid rgba(34,197,94,0.42);
    color: #86efac;
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 700;
}

/* Отступ контента снизу для плавающего меню */
/* Legacy - logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    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-mark {
    width: 1.32rem;
    height: 1.32rem;
    border-radius: 0.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.28);
}

.logo-text { line-height: 1; }

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

.logo:hover .logo-mark {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(20, 184, 166, 0.38);
}

.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); }
}

.hero-section {
    text-align: center;
    padding: 5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
    background-color: #1e3a5f;
    background-image: url("../images/hero-bg.7195e7923518.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: var(--teal);
    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: var(--teal);
    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: var(--teal);
    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; }

/* =========================================
   Scroll-triggered animations (IntersectionObserver)
   ========================================= */

[data-anim] {
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

[data-anim="up"]    { transform: translateY(32px); }
[data-anim="down"]  { transform: translateY(-24px); }
[data-anim="left"]  { transform: translateX(-32px); }
[data-anim="right"] { transform: translateX(32px); }
[data-anim="scale"] { transform: scale(0.92); }
[data-anim="fade"]  { transform: none; }

[data-anim].is-visible {
    opacity: 1;
    transform: none !important;
}

[data-anim-delay="1"] { transition-delay: 0.1s; }
[data-anim-delay="2"] { transition-delay: 0.18s; }
[data-anim-delay="3"] { transition-delay: 0.26s; }
[data-anim-delay="4"] { transition-delay: 0.34s; }
[data-anim-delay="5"] { transition-delay: 0.42s; }
[data-anim-delay="6"] { transition-delay: 0.50s; }

@media (prefers-reduced-motion: reduce) {
    [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* 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;
    background: var(--bg-white);
    color: var(--text-dark);
    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 calc(2rem + var(--bottom-nav-space));
    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 7rem;
}

.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: 2rem;
}

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

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

.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: 1rem;
}

.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);
    color: var(--text-dark);
}

.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-help-row {
    margin-top: 0.35rem;
    display: flex;
    justify-content: flex-end;
    font-size: 0.9rem;
}

.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-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.auth-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    transition: var(--transition);
    cursor: pointer;
}

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

.auth-social-telegram-wrap {
    display: inline-flex;
    align-items: center;
}

.auth-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    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(200, 245, 61, 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(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-header {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(165deg, rgba(200, 245, 61, 0.05) 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: 3px solid var(--surface2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--surface2) 100%);
    color: var(--accent);
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--surface2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    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(--accent);
    color: #0c0c0f;
    border: 2px solid var(--accent);
}

.profile-action-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #0c0c0f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 245, 61, 0.3);
}

.profile-action-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.profile-action-secondary:hover {
    background: var(--surface);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 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(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

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

.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(--text);
    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(--accent);
}

.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(--accent);
    text-decoration: none;
    font-weight: 600;
}

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

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

.profile-edit-card {
    width: 100%;
    max-width: none;
    border-radius: 20px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.88), rgba(8, 25, 30, 0.8));
    box-shadow: 0 20px 44px rgba(2, 8, 23, 0.42);
}

.profile-edit-page {
    align-items: flex-start;
    padding: 1rem 1rem calc(var(--bottom-nav-space) + 1rem);
    background:
        radial-gradient(90% 65% at 50% -15%, rgba(45, 212, 191, 0.14), transparent 72%),
        radial-gradient(65% 50% at 10% 20%, rgba(56, 189, 248, 0.1), transparent 72%);
}

.profile-edit-shell {
    width: min(860px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.profile-edit-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #a7f3d0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    width: fit-content;
    padding: 0.35rem 0.62rem;
    border-radius: 10px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    background: rgba(6, 78, 59, 0.2);
    transition: all 0.2s ease;
}

.profile-edit-back-link:hover {
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(6, 95, 70, 0.28);
}

.profile-edit-headline {
    margin-bottom: 1rem;
}

.profile-edit-headline .auth-title {
    margin-bottom: 0.35rem;
}

.profile-edit-chip {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.45);
    background: rgba(15, 118, 110, 0.2);
    color: #5eead4;
    padding: 0.18rem 0.56rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-edit-chip--alt {
    border-color: rgba(125, 211, 252, 0.42);
    background: rgba(30, 64, 175, 0.2);
    color: #93c5fd;
}

.profile-edit-panel {
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.95rem;
}

.profile-edit-panel + .profile-edit-panel {
    margin-top: 0.7rem;
}

.profile-edit-password-section {
    margin-top: 0.2rem;
    padding-top: 0;
    border-top: 0;
}

.profile-edit-password-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.28rem;
}

.profile-edit-password-card .auth-subtitle {
    margin-bottom: 0.95rem;
}

.profile-password-submit-btn {
    margin-top: 0.55rem;
}

.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;
}

.profile-edit-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.profile-avatar-preview-img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(94, 234, 212, 0.35);
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.22);
}

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

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

.profile-avatar-upload-line {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.profile-avatar-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid rgba(100, 116, 139, 0.42);
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-avatar-trigger:hover {
    border-color: rgba(52, 211, 153, 0.5);
    color: #d1fae5;
    background: rgba(6, 95, 70, 0.25);
}

.profile-avatar-file-name {
    color: #94a3b8;
    font-size: 0.82rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.profile-edit-form .auth-field {
    margin-bottom: 0.9rem;
}

.profile-edit-form .auth-field:last-child {
    margin-bottom: 0;
}

.profile-edit-form .auth-input {
    border-color: rgba(71, 85, 105, 0.52);
    background: rgba(2, 6, 23, 0.62);
}

.profile-edit-form .auth-input:focus {
    border-color: rgba(45, 212, 191, 0.72);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.profile-edit-hint {
    margin: 0.45rem 0 0;
    color: #94a3b8;
    font-size: 0.76rem;
}

.profile-edit-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.58rem;
}

.profile-edit-save-btn {
    min-width: 210px;
}

.profile-edit-cancel-btn {
    text-decoration: none;
}

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

@media (max-width: 760px) {
    .profile-edit-page {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .profile-edit-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .profile-edit-avatar-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-edit-save-btn,
    .profile-edit-cancel-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* 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;
}

.profile-ach-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.profile-ach-header .profile-section-title {
    margin: 0;
}

.profile-ach-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 50px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.profile-ach-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.profile-ach-badge {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4), 0 0 0 2.5px rgba(255, 215, 0, 0.35);
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.profile-ach-badge:hover {
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55), 0 0 0 3px rgba(255, 215, 0, 0.5);
    z-index: 10;
}

.profile-ach-badge-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Tooltip */
.profile-ach-badge-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    min-width: 140px;
    max-width: 200px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.profile-ach-badge-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primary-dark);
}

.profile-ach-badge:hover .profile-ach-badge-tooltip {
    opacity: 1;
}

.profile-ach-badge-tooltip-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.profile-ach-badge-tooltip-desc {
    display: block;
    font-size: 0.72rem;
    opacity: 0.8;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.profile-ach-badge-tooltip-date {
    display: block;
    font-size: 0.7rem;
    opacity: 0.65;
}

.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: 1rem;
    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;
    background: var(--bg-white);
    color: var(--text-dark);
}

.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;
    background: var(--bg-white);
    color: var(--text-dark);
}

.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: var(--font-body);
    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: var(--font-body);
    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: var(--font-body);
    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: var(--font-body);
    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 ══ */
.ach-page {
    max-width: 1040px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

.ach-header {
    padding-bottom: 0.5rem;
}

/* Progress bar */
.ach-progress-wrap {
    margin: 1.25rem auto 0;
    max-width: 400px;
}

.ach-progress-label {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ach-progress-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
}

.ach-progress-sep {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.ach-progress-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ach-progress-bar {
    height: 8px;
    border-radius: 50px;
    background: var(--border-color);
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width 0.6s ease;
}

/* Category groups */
.ach-group {
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 0 clamp(12px, 3vw, 24px);
}

.ach-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-color);
}

.ach-group-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.ach-group-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    flex: 1;
}

.ach-group-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.15rem 0.6rem;
}

/* Achievement card grid */
.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* Individual card */
.ach-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 1.25rem;
    border-radius: 18px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    text-align: center;
    cursor: default;
}

/* Unlocked */
.ach-card-unlocked {
    background: linear-gradient(160deg, rgba(255, 215, 0, 0.10) 0%, rgba(255, 193, 7, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.12);
}

.ach-card-unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.7);
}

/* Locked */
.ach-card-locked {
    opacity: 0.55;
    filter: saturate(0.5);
}

.ach-card-locked:hover {
    opacity: 0.7;
    filter: saturate(0.65);
}

/* Icon wrap */
.ach-card-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}

.ach-card-unlocked .ach-card-icon-wrap {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #f59e0b 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), 0 0 0 3px rgba(255, 215, 0, 0.25);
}

.ach-card-locked .ach-card-icon-wrap {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.2);
}


.ach-card-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Lock badge */
.ach-card-lock {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
}

/* Card body */
.ach-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.ach-card-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.ach-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.ach-card-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: #f59e0b;
    font-weight: 600;
    margin-top: 0.2rem;
}

.ach-card-date svg {
    color: #f59e0b;
    flex-shrink: 0;
}

.ach-card-locked-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

@media (max-width: 600px) {
    .ach-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
    }
    .ach-card {
        padding: 1.1rem 0.75rem 1rem;
    }
    .ach-card-icon-wrap {
        width: 60px;
        height: 60px;
    }
    .ach-card-icon {
        font-size: 1.6rem;
    }
}

/* 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: var(--font-body);
    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, var(--teal) 0%, var(--teal) 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: var(--bg-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: var(--bg-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;
    background: var(--bg-white);
    color: var(--text-dark);
}

.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: var(--font-body);
    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: var(--bg-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: var(--bg-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: var(--bg-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: var(--bg-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;
    background: var(--bg-white);
    color: var(--text-dark);
}

.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-modal-cancel {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.finances-modal-cancel:hover {
    background: var(--bg-section);
    border-color: var(--text-light);
    color: var(--text-dark);
}

.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;
}


.dashboard-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.dashboard-progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 2px;
    transition: width 0.4s ease;
    min-width: 0;
}
.dashboard-all-done {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, rgba(13,148,136,.1), rgba(20,184,166,.08));
    border: 1.5px solid rgba(13,148,136,.25);
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: .75rem;
}

/* =========================================
   VPN Landing Page
   ========================================= */

.vpn-hero {
    padding: 4rem 0 5rem;
    text-align: center;
    background: var(--bg-white);
}

.vpn-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.vpn-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.vpn-scroll-link {
    scroll-behavior: smooth;
}

/* Steps */
.vpn-steps-section {
    padding: 4rem 0 5rem;
    background: var(--bg-light);
}

.vpn-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.vpn-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    padding: 0 0.5rem;
}

.vpn-step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.vpn-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.4rem;
}

.vpn-step-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.vpn-step-arrow {
    font-size: 1.5rem;
    color: var(--secondary);
    padding: 0 0.25rem;
    margin-top: 1rem;
    opacity: 0.5;
    flex-shrink: 0;
}

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

.vpn-link:hover {
    text-decoration: underline;
}

/* Features */
.vpn-features-section {
    padding: 4rem 0 5rem;
    background: var(--bg-white);
}

/* Pricing */
.vpn-pricing-section {
    padding: 4rem 0 5rem;
    background: var(--bg-light);
}

.vpn-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.vpn-plan {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.vpn-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.vpn-plan-popular {
    border-color: var(--secondary);
    box-shadow: 0 0 0 1px var(--secondary);
}

.vpn-plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
}

.vpn-plan-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.vpn-plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.vpn-plan-stars {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.vpn-plan-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vpn-plan-saving {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

.vpn-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.vpn-plan-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vpn-plan-btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
}

.vpn-pricing-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* FAQ */
.vpn-faq-section {
    padding: 4rem 0 5rem;
    background: var(--bg-white);
}

.vpn-faq-list {
    max-width: 720px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vpn-faq-item {
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.vpn-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    list-style: none;
    user-select: none;
}

.vpn-faq-question::-webkit-details-marker { display: none; }

.vpn-faq-question::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--secondary);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
}

.vpn-faq-item[open] .vpn-faq-question::after {
    transform: rotate(45deg);
}

.vpn-faq-answer {
    padding: 0 1.25rem 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* CTA Final */
.vpn-cta-final {
    text-align: center;
}

.vpn-cta-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .vpn-plans {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }

    .vpn-steps {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .vpn-step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .vpn-step {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════
   ПРОФИЛЬ — новый дизайн (cover, stats, friends, share)
   ═══════════════════════════════════════════════════════ */

/* Баннер входящих запросов */
.profile-pending-banner {
    max-width: 680px;
    margin: 0 auto 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(200,245,61,0.07), rgba(200,245,61,0.03));
    border: 1.5px solid rgba(200,245,61,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text-dark);
}

.profile-pending-link {
    margin-left: auto;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(200,245,61,0.1);
    transition: background 0.2s;
}

.profile-pending-link:hover {
    background: rgba(13,148,136,0.22);
}

/* Шапка: обложка */
.profile-cover {
    height: 100px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal) 40%, #1e3a5f 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    inset: 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%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.profile-header-content {
    padding: 0 2rem 2rem;
    text-align: center;
}

/* Аватар — поднят над обложкой */
.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-top: -50px;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-white);
    box-shadow: 0 4px 20px rgba(13,148,136,0.3);
    display: block;
}

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

.profile-badge-ring {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--bg-white);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.profile-identity {
    margin-bottom: 1rem;
}

.profile-bio-short {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Статистика */
.profile-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.25rem;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem 1.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.profile-stat-item--link:hover .profile-stat-num {
    color: var(--accent);
}

.profile-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    flex-shrink: 0;
}

.profile-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.1;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Кнопки профиля */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-form-inline {
    display: inline;
}

.profile-notif-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    margin-left: 2px;
}

.profile-action-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
}

.profile-action-ghost:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
}

.profile-action-friend-active {
    background: rgba(200,245,61,0.08);
    color: var(--accent);
    border: 2px solid var(--accent);
    cursor: pointer;
    font-family: inherit;
}

.profile-action-friend-active:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: #ef4444;
    transform: translateY(-1px);
}

.profile-action-pending {
    background: rgba(245,158,11,0.1);
    color: #d97706;
    border: 2px solid rgba(245,158,11,0.4);
    cursor: pointer;
    font-family: inherit;
}

.profile-action-pending:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: #ef4444;
    transform: translateY(-1px);
}

.profile-incoming-request {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-incoming-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    width: 100%;
    text-align: center;
}

/* Секция — общий заголовок */
.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.profile-section-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.profile-section-more:hover {
    opacity: 0.8;
}

/* Превью друзей на профиле */
.profile-friends-preview-wrap .profile-section-header {
    margin-bottom: 0.9rem;
}

.profile-friends-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-friend-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s;
    width: 68px;
}

.profile-friend-card:hover {
    transform: translateY(-2px);
}

.profile-friend-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.profile-friend-card:hover .profile-friend-avatar {
    border-color: var(--secondary);
}

.profile-friend-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.profile-friend-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    max-width: 68px;
}

/* ═══════════════════════════════════════════════════════
   НАВИГАЦИОННЫЕ КАРТОЧКИ В ПРОФИЛЕ
   ═══════════════════════════════════════════════════════ */

.profile-nav-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.profile-nav-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    text-decoration: none;
    background: var(--bg-section);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    position: relative;
    overflow: hidden;
}

.profile-nav-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.18s;
    border-radius: inherit;
}

.profile-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,58,95,0.1);
}

.profile-nav-card:hover::before {
    opacity: 1;
}

.profile-nav-card--achievements::before { background: linear-gradient(135deg, rgba(245,158,11,0.07), transparent); }
.profile-nav-card--achievements:hover    { border-color: rgba(245,158,11,0.5); }

.profile-nav-card--ranking::before { background: linear-gradient(135deg, rgba(239,68,68,0.07), transparent); }
.profile-nav-card--ranking:hover    { border-color: rgba(239,68,68,0.4); }

.profile-nav-card--stats::before { background: linear-gradient(135deg, rgba(99,102,241,0.07), transparent); }
.profile-nav-card--stats:hover    { border-color: rgba(99,102,241,0.4); }

.profile-nav-card--goals::before { background: linear-gradient(135deg, rgba(200,245,61,0.06), transparent); }
.profile-nav-card--goals:hover    { border-color: rgba(200,245,61,0.4); }

.profile-nav-card--integration::before { background: linear-gradient(135deg, rgba(34,211,238,0.08), transparent); }
.profile-nav-card--integration:hover    { border-color: rgba(34,211,238,0.45); }

.profile-nav-card--public::before { background: linear-gradient(135deg, rgba(94,234,212,0.09), transparent); }
.profile-nav-card--public:hover    { border-color: rgba(16,185,129,0.45); }

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

.profile-nav-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.profile-nav-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-nav-card-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-nav-card-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.18s, color 0.18s;
}

.profile-nav-card:hover .profile-nav-card-arrow {
    transform: translateX(3px);
    color: var(--primary-dark);
}

@media (max-width: 500px) {
    .profile-nav-cards {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   ПОИСК ПОЛЬЗОВАТЕЛЕЙ
   ═══════════════════════════════════════════════════════ */

.user-search-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.user-search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.user-search-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
}

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

.user-search-form {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.user-search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.user-search-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.user-search-input {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 2.6rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

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

.user-search-clear {
    position: absolute;
    right: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.user-search-clear:hover {
    color: var(--primary-dark);
}

.user-search-btn {
    padding: 0.7rem 1.4rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.user-search-btn:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

.user-search-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Карточки пользователей */
.user-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.user-card:hover {
    box-shadow: 0 4px 16px rgba(30,58,95,0.1);
    border-color: rgba(13,148,136,0.3);
}

.user-card-avatar-link {
    flex-shrink: 0;
    display: block;
}

.user-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-card-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.user-card-body {
    flex: 1;
    min-width: 0;
}

.user-card-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    text-decoration: none;
    margin-bottom: 0.1rem;
}

.user-card-name:hover {
    color: var(--secondary);
}

.user-card-username {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: block;
}

.user-card-bio {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-card-actions {
    flex-shrink: 0;
}

.user-card-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.user-card-btn--add {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.user-card-btn--add:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.user-card-btn--friend {
    background: rgba(13,148,136,0.1);
    color: var(--secondary);
    border-color: var(--secondary);
}

.user-card-btn--friend:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.user-card-btn--pending {
    background: rgba(245,158,11,0.1);
    color: #d97706;
    border-color: rgba(245,158,11,0.4);
}

.user-card-btn--pending:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.user-card-btn--accept {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.user-card-btn--accept:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

/* Пустые состояния поиска */
.user-search-empty,
.user-search-hint-block {
    text-align: center;
    padding: 3rem 1rem;
}

.user-search-empty-icon,
.user-search-hint-icon {
    color: var(--border-color);
    margin-bottom: 1rem;
}

.user-search-empty-text,
.user-search-hint-text {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.user-search-empty-hint,
.user-search-hint-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.user-search-friends-link {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.55rem 1.25rem;
    background: var(--secondary);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.1s;
}

.user-search-friends-link:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════
   СТРАНИЦА ДРУЗЕЙ
   ═══════════════════════════════════════════════════════ */

.friends-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.friends-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.friends-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.friends-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    background: var(--secondary);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.friends-search-btn:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

.friends-section {
    margin-bottom: 2.5rem;
}

.friends-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.friends-badge {
    background: #ef4444;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
    line-height: 1.4;
}

.friends-count {
    background: var(--bg-section);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
}

.friends-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Карточка друга */
.friend-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.friend-card:hover {
    box-shadow: 0 3px 12px rgba(30,58,95,0.08);
    border-color: rgba(13,148,136,0.25);
}

.friend-card--incoming {
    border-color: rgba(13,148,136,0.3);
    background: linear-gradient(135deg, rgba(13,148,136,0.04), var(--bg-white));
}

.friend-card--outgoing {
    border-color: rgba(245,158,11,0.3);
    background: linear-gradient(135deg, rgba(245,158,11,0.04), var(--bg-white));
}

.friend-card-avatar-wrap {
    flex-shrink: 0;
    display: block;
}

.friend-card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.friend-card-avatar-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

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

.friend-card-name {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--primary-dark);
    text-decoration: none;
    margin-bottom: 0.1rem;
}

.friend-card-name:hover {
    color: var(--secondary);
}

.friend-card-username {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

.friend-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.1rem;
}

.friend-card-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.friend-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.friend-btn--accept {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.friend-btn--accept:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

.friend-btn--decline,
.friend-btn--cancel {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.friend-btn--decline:hover,
.friend-btn--cancel:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239,68,68,0.06);
}

.friend-btn--remove {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
    padding: 0.4rem 0.6rem;
}

.friend-btn--remove:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239,68,68,0.06);
}

/* Пустое состояние */
.friends-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.friends-empty-icon {
    color: var(--border-color);
    margin-bottom: 1.25rem;
}

.friends-empty-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.friends-empty-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.friends-empty-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: var(--secondary);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.1s;
}

.friends-empty-btn:hover {
    background: var(--secondary-hover);
    transform: translateY(-1px);
}

/* Нижняя навигация */
.friends-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.friends-back-link,
.friends-search-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.friends-back-link:hover,
.friends-search-link:hover {
    color: var(--secondary);
}

/* Мобильная адаптация новых элементов */
@media (max-width: 500px) {
    .profile-cover {
        height: 70px;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 80px;
        height: 80px;
    }

    .profile-header-content {
        padding: 0 1rem 1.5rem;
    }

    .profile-stats-row {
        padding: 0.6rem 0.75rem;
    }

    .profile-stat-item {
        padding: 0 0.75rem;
    }

    .profile-stat-num {
        font-size: 1.1rem;
    }

    .profile-friends-grid {
        gap: 0.75rem;
    }

    .profile-friend-card {
        width: 58px;
    }

    .profile-friend-avatar,
    .profile-friend-avatar-placeholder {
        width: 46px;
        height: 46px;
    }

    .friend-card {
        flex-wrap: wrap;
    }

    .friend-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .user-search-form {
        flex-direction: column;
    }

    .user-search-btn {
        width: 100%;
    }

    .user-card {
        flex-wrap: wrap;
    }

    .user-card-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Семейный бюджет (fb-)
   ═══════════════════════════════════════════════════════════════════════════ */

.fb-page {
    padding: 0 0 3rem;
}

/* Header */
.fb-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-top: 1.5rem;
}

.fb-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fb-back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}
.fb-back-link:hover { color: var(--accent); }

.fb-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.fb-title-icon { font-size: 1.5rem; }

.fb-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.fb-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Summary cards tweak */
.fb-summary-cards {
    margin-bottom: 1.5rem;
}
.fb-value-neg {
    color: #ef4444 !important;
}

/* Members section */
.fb-members-section {
    margin-bottom: 1.5rem;
}

.fb-members-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.fb-member-card {
    flex: 0 0 auto;
    min-width: 160px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.fb-member-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}
.fb-member-card-me {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

.fb-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.fb-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-member-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.fb-member-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.fb-owner-badge { font-size: 0.8rem; }
.fb-me-badge {
    font-size: 0.65rem;
    background: var(--accent);
    color: #fff;
    padding: 1px 5px;
    border-radius: 99px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fb-member-expense {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ef4444;
}
.fb-member-income {
    font-size: 0.8rem;
    color: #22c55e;
}

/* Charts grid — 3 charts */
.fb-charts-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Goals */
.fb-goals-section { margin-bottom: 1.5rem; }

.fb-goals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.fb-goals-header .finances-section-title { margin-bottom: 0; }

.fb-goal-add-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.fb-goal-add-btn:hover { background: var(--secondary); transform: translateY(-1px); }

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

.fb-goal-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow 0.2s;
}
.fb-goal-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }
.fb-goal-done {
    opacity: 0.75;
    border-color: #22c55e;
}

.fb-goal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.fb-goal-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-goal-badge-done {
    font-size: 0.72rem;
    background: #22c55e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
    white-space: nowrap;
}

.fb-goal-delete-form { display: inline; }
.fb-goal-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.2s;
}
.fb-goal-delete-btn:hover { color: #ef4444; }

.fb-goal-amounts {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}
.fb-goal-current {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}
.fb-goal-sep { color: var(--text-muted); }
.fb-goal-target {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.fb-goal-progress-wrap {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.fb-goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 4px;
}
.fb-goal-done .fb-goal-progress-bar {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.fb-goal-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.fb-goal-pct { font-weight: 700; color: var(--accent); }
.fb-goal-remaining { color: var(--text-muted); }

.fb-goal-contribute-btn {
    background: var(--bg-section);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    align-self: flex-start;
}
.fb-goal-contribute-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Contribute modal */
.fb-contribute-goal-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 1rem;
    text-align: center;
}

/* Transaction list enhancements */
.fb-tx-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fb-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.fb-filter-select, .fb-filter-input {
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 0.83rem;
    max-width: 160px;
}
.fb-filter-input { max-width: 130px; }

.fb-tx-member {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

/* Main grid */
.fb-main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

/* Sidebar */
.fb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Category management */
.fb-cat-manage-section {}

.fb-cat-manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.fb-cat-manage-header .finances-section-title { margin-bottom: 0; }

.fb-cat-add-btn {
    background: var(--bg-section);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.fb-cat-add-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.fb-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.fb-cat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: var(--bg-section);
    border-radius: 8px;
    font-size: 0.85rem;
}
.fb-cat-icon { font-size: 1rem; flex-shrink: 0; }
.fb-cat-name { flex: 1; color: var(--text-dark); font-weight: 500; }
.fb-cat-type {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 99px;
    font-weight: 600;
}
.fb-cat-income { background: rgba(34,197,94,0.15); color: #16a34a; }
.fb-cat-expense { background: rgba(239,68,68,0.15); color: #ef4444; }
.fb-cat-delete-form { display: inline; }
.fb-cat-empty { color: var(--text-muted); font-size: 0.83rem; padding: 0.5rem 0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .fb-charts-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    .fb-main-grid {
        grid-template-columns: 1fr;
    }
    .fb-charts-grid {
        grid-template-columns: 1fr !important;
    }
    .fb-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fb-filter-select, .fb-filter-input {
        max-width: 100%;
        width: 100%;
    }
    .fb-filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    .fb-sidebar {
        order: -1;
    }
}


/* ── Toast notifications ──────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 5rem; /* above bottom nav */
    right: 1rem;
    left: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: flex-end;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    min-width: 220px;
    max-width: min(400px, 90vw);
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 4px 24px rgba(0,0,0,.45);
    color: #e0e0f0;
    font-size: .9rem;
    line-height: 1.35;
    pointer-events: auto;
    animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) both;
}

.toast.toast-hiding {
    animation: toastOut .3s ease-in both;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(.95); }
}

.toast-icon { font-size: 1rem; flex-shrink: 0; }

.toast-text { flex: 1; }

.toast-close {
    background: none; border: none; color: inherit;
    font-size: 1.2rem; line-height: 1; cursor: pointer;
    opacity: .45; padding: 0 .1rem; flex-shrink: 0;
    transition: opacity .15s;
}
.toast-close:hover { opacity: 1; }

.toast-success { border-color: rgba(52,211,153,.3); }
.toast-error   { border-color: rgba(239,68,68,.3); }
.toast-warning { border-color: rgba(251,191,36,.3); }
.toast-info    { border-color: rgba(124,110,242,.3); }

@media (min-width: 640px) {
    .toast-container { left: auto; min-width: 280px; }
}


.profile-wishlist-manage-btn {
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, 0.36);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(13, 148, 136, 0.08));
    color: #34d399;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: all 0.22s ease;
}

.profile-wishlist-manage-btn span {
    transition: transform 0.2s ease;
}

.profile-wishlist-manage-btn:hover {
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.55);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(13, 148, 136, 0.14));
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.profile-wishlist-manage-btn:hover span {
    transform: translateX(2px);
}

/* Profile design-token layer + upgrades */
.profile-page {
    --profile-accent: #22d3ee;
    --profile-accent-2: #34d399;
    --profile-chip-bg: rgba(8, 14, 36, 0.64);
    --profile-chip-border: rgba(148, 163, 184, 0.28);
    --profile-card-radius: 18px;
    --profile-card-shadow: 0 12px 28px rgba(3, 7, 18, 0.38);
    --profile-cover-bg: linear-gradient(135deg, #1a365d 0%, #0f766e 45%, #082f49 100%);
    background: radial-gradient(85% 50% at 50% 0%, rgba(34, 211, 238, 0.08), transparent 72%);
}

.profile-page.profile-theme-midnight {
    --profile-accent: #22d3ee;
    --profile-accent-2: #34d399;
    --profile-cover-bg: linear-gradient(135deg, #1e3a8a 0%, #0f766e 48%, #111827 100%);
}

.profile-page.profile-theme-aurora {
    --profile-accent: #5eead4;
    --profile-accent-2: #86efac;
    --profile-cover-bg: linear-gradient(135deg, #073042 0%, #155e75 45%, #14532d 100%);
}

.profile-page.profile-theme-sunrise {
    --profile-accent: #f59e0b;
    --profile-accent-2: #fb7185;
    --profile-cover-bg: linear-gradient(135deg, #7c2d12 0%, #c2410c 46%, #be123c 100%);
}

.profile-page .profile-card {
    max-width: 720px;
    border-radius: 22px;
    box-shadow: var(--profile-card-shadow);
}

.profile-page .profile-cover {
    height: 112px;
    background: var(--profile-cover-bg);
}

.profile-page.profile-cover-nebula .profile-cover::before {
    background: radial-gradient(circle at 18% 22%, rgba(125, 211, 252, 0.35) 0%, transparent 34%),
                radial-gradient(circle at 82% 30%, rgba(74, 222, 128, 0.28) 0%, transparent 38%),
                radial-gradient(circle at 56% 78%, rgba(196, 181, 253, 0.24) 0%, transparent 42%);
}

.profile-page.profile-cover-grid .profile-cover::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        radial-gradient(circle at 22% 26%, rgba(34, 211, 238, 0.34) 0%, transparent 42%);
    background-size: 24px 24px, 24px 24px, auto;
    background-position: center;
}

.profile-page.profile-cover-sunbeam .profile-cover::before {
    background: conic-gradient(from 180deg at 50% 120%, rgba(251, 191, 36, 0.3), transparent 36%, rgba(251, 113, 133, 0.3), transparent 68%, rgba(251, 191, 36, 0.26));
}

.profile-page .profile-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 60%);
    pointer-events: none;
}

.profile-page .profile-avatar-wrap--halo {
    position: relative;
    isolation: isolate;
}

.profile-page .profile-avatar-wrap--halo::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 0;
}

.profile-page .profile-avatar-wrap--halo > .profile-avatar,
.profile-page .profile-avatar-wrap--halo > .profile-avatar-placeholder {
    position: relative;
    z-index: 1;
}

.profile-page .profile-badge-ring {
    z-index: 3;
}

.profile-page .profile-avatar-wrap--halo.profile-halo-none::before {
    opacity: 0;
}

.profile-page .profile-avatar-wrap--halo.profile-halo-gold::before {
    opacity: 1;
    transform: scale(1);
    background:
        radial-gradient(circle, rgba(251, 191, 36, 0.46) 0%, rgba(251, 191, 36, 0.18) 44%, rgba(251, 191, 36, 0) 72%),
        conic-gradient(from 0deg, rgba(251, 191, 36, 0.58), rgba(245, 158, 11, 0.3), rgba(251, 191, 36, 0.58));
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.45), 0 0 42px rgba(245, 158, 11, 0.22);
    animation: profileHaloPulseGold 3.2s ease-in-out infinite;
}

@keyframes profileHaloPulseGold {
    0%, 100% {
        filter: saturate(1);
        transform: scale(1);
    }
    50% {
        filter: saturate(1.18);
        transform: scale(1.02);
    }
}

.profile-kpi-grid {
    margin: 0.8rem auto 0.6rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    max-width: 560px;
}

.profile-kpi-card {
    border: 1px solid var(--profile-chip-border);
    border-radius: 13px;
    padding: 0.55rem 0.65rem;
    background: var(--profile-chip-bg);
    text-align: left;
    backdrop-filter: blur(6px);
}

.profile-kpi-card strong {
    color: #f8fafc;
    font-size: 0.97rem;
    letter-spacing: 0.01em;
}

.profile-kpi-label {
    display: block;
    margin-bottom: 0.14rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-kpi-card--premium strong {
    color: var(--profile-accent-2);
}

.profile-level-strip {
    margin: 0.45rem auto 0;
    display: inline-flex;
    flex-direction: column;
    gap: 0.34rem;
    padding: 0.56rem 0.72rem;
    border-radius: 13px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.54), rgba(30, 41, 59, 0.46));
    min-width: 260px;
}

.profile-level-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.profile-level-tag {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.profile-level-xp {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
}

.profile-level-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.45);
    overflow: hidden;
}

.profile-level-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--profile-accent-2), var(--profile-accent));
}

.profile-level-hint {
    font-size: 0.71rem;
    color: #cbd5e1;
}

.profile-theme-customize-wrap {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.43), rgba(30, 41, 59, 0.34));
}

.profile-theme-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.profile-cover-options-title {
    margin-top: 0.85rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    font-weight: 700;
}

.profile-cover-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.profile-halo-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.52rem;
}

.profile-halo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(100, 116, 139, 0.45);
    border-radius: 12px;
    min-height: 44px;
    padding: 0.52rem 0.62rem;
    background: rgba(2, 6, 23, 0.45);
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.profile-halo-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(94, 234, 212, 0.65);
}

.profile-halo-btn.is-active {
    border-color: rgba(52, 211, 153, 0.8);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.16);
}

.profile-halo-btn-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.5);
    flex-shrink: 0;
}

.profile-halo-btn--none .profile-halo-btn-dot {
    background: linear-gradient(135deg, #334155, #64748b);
}

.profile-halo-btn--gold .profile-halo-btn-dot {
    background: radial-gradient(circle at 35% 35%, #fde68a 0%, #f59e0b 68%);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

.profile-halo-btn-name {
    font-size: 0.84rem;
    font-weight: 700;
}

.profile-halo-btn-lock {
    margin-left: auto;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
}

.profile-halo-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.profile-cover-btn {
    position: relative;
    border: 1px solid rgba(100, 116, 139, 0.45);
    border-radius: 12px;
    min-height: 44px;
    padding: 0.52rem 0.58rem;
    background: rgba(2, 6, 23, 0.45);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    overflow: hidden;
}

.profile-cover-btn span {
    position: relative;
    z-index: 2;
}

.profile-cover-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.75;
}

.profile-cover-btn--nebula::before {
    background: radial-gradient(circle at 20% 35%, rgba(94, 234, 212, 0.36), transparent 46%), radial-gradient(circle at 78% 60%, rgba(34, 211, 238, 0.32), transparent 48%);
}

.profile-cover-btn--grid::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 12px 12px;
}

.profile-cover-btn--sunbeam::before {
    background: linear-gradient(115deg, rgba(251, 191, 36, 0.35), rgba(251, 113, 133, 0.3));
}

.profile-cover-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(94, 234, 212, 0.64);
}

.profile-cover-btn.is-active {
    border-color: rgba(52, 211, 153, 0.82);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.16);
}

.profile-theme-btn {
    border: 1px solid rgba(100, 116, 139, 0.45);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.42);
    color: #e2e8f0;
    padding: 0.66rem 0.7rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.profile-theme-btn-name {
    display: block;
    font-size: 0.89rem;
    font-weight: 700;
}

.profile-theme-btn-lock {
    display: inline-flex;
    margin-top: 0.24rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.profile-theme-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(94, 234, 212, 0.65);
}

.profile-theme-btn.is-active {
    border-color: rgba(52, 211, 153, 0.78);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.15);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(34, 211, 238, 0.14));
}

.profile-theme-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-theme-btn--midnight:not(:disabled) {
    background-image: linear-gradient(135deg, rgba(30, 58, 138, 0.45), rgba(8, 47, 73, 0.44));
}

.profile-theme-btn--aurora:not(:disabled) {
    background-image: linear-gradient(135deg, rgba(20, 83, 45, 0.4), rgba(14, 116, 144, 0.42));
}

.profile-theme-btn--sunrise:not(:disabled) {
    background-image: linear-gradient(135deg, rgba(154, 52, 18, 0.4), rgba(190, 24, 93, 0.4));
}

.profile-ach-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.profile-ach-showcase-card {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.35);
    padding: 0.7rem 0.78rem;
    opacity: 0.96;
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-ach-showcase-card:hover {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.48);
    box-shadow: 0 12px 24px rgba(2, 8, 23, 0.3);
}

.profile-ach-showcase-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.profile-ach-showcase-icon {
    font-size: 1.15rem;
}

.profile-ach-showcase-rarity {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.16rem 0.44rem;
    border: 1px solid transparent;
}

.profile-ach-showcase-rarity--legendary {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.45);
    background: rgba(250, 204, 21, 0.14);
}

.profile-ach-showcase-rarity--epic {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.42);
    background: rgba(167, 139, 250, 0.12);
}

.profile-ach-showcase-rarity--rare {
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.12);
}

.profile-ach-showcase-rarity--common {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(148, 163, 184, 0.1);
}

.profile-ach-showcase-card h3 {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    color: #f8fafc;
}

.profile-ach-showcase-card p {
    margin: 0;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.profile-ach-showcase-card small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.67rem;
    color: #94a3b8;
}

.profile-ach-new-dot {
    color: #facc15;
    font-weight: 800;
    margin-left: 0.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-ach-showcase-card.is-recent-rare {
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.14), 0 14px 26px rgba(250, 204, 21, 0.12);
}

.profile-ach-showcase-card.is-recent-rare.is-reveal {
    animation: profileRareReveal 0.72s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes profileRareReveal {
    0% {
        transform: translateY(12px) scale(0.98);
        opacity: 0;
    }
    55% {
        transform: translateY(-3px) scale(1.01);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.profile-page.profile-theme-switching .profile-cover {
    animation: profileThemeFlash 0.44s ease;
}

.profile-cover.profile-cover-flash {
    animation: profileCoverPulse 0.48s ease;
}

@keyframes profileThemeFlash {
    0% { filter: saturate(0.85) brightness(0.92); }
    55% { filter: saturate(1.08) brightness(1.07); }
    100% { filter: saturate(1) brightness(1); }
}

@keyframes profileCoverPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.profile-ach-subtitle {
    margin: 0 0 0.55rem;
    color: #9ca3af;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.profile-integrations-wrap {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.32), rgba(15, 23, 42, 0.42));
}

.profile-integrations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.profile-integration-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    border-radius: 13px;
    border: 1px solid rgba(100, 116, 139, 0.36);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.5);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-integration-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.56);
    box-shadow: 0 10px 20px rgba(2, 8, 23, 0.28);
}

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

.profile-integration-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.08rem;
}

.profile-integration-text strong {
    color: #f1f5f9;
    font-size: 0.9rem;
}

.profile-integration-text small {
    color: #94a3b8;
    font-size: 0.74rem;
}

.profile-public-link-wrap {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-public-link-wrap code {
    display: inline-block;
    max-width: 100%;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.58);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.42);
    font-size: 0.78rem;
    word-break: break-all;
}

@media (max-width: 720px) {
    .profile-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-theme-options {
        grid-template-columns: 1fr;
    }

    .profile-cover-options {
        grid-template-columns: 1fr;
    }

    .profile-halo-options {
        grid-template-columns: 1fr;
    }

    .profile-ach-showcase {
        grid-template-columns: 1fr;
    }

    .profile-integrations-grid {
        grid-template-columns: 1fr;
    }

    .profile-level-strip {
        width: 100%;
        min-width: 0;
    }
}

/* Public mini profile */
.public-card-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.2rem 1rem 4rem;
}

.public-card {
    border: 1px solid rgba(100, 116, 139, 0.32);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.74));
    box-shadow: 0 16px 32px rgba(2, 8, 23, 0.35);
    overflow: hidden;
}

.public-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem 1.05rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.25);
}

.public-card-avatar-wrap {
    position: relative;
}

.public-card-avatar-wrap::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.public-card-avatar-wrap.public-halo-none::before {
    opacity: 0;
}

.public-card-avatar-wrap.public-halo-gold::before {
    opacity: 1;
    transform: scale(1);
    background: radial-gradient(circle, rgba(251, 191, 36, 0.52) 0%, rgba(251, 191, 36, 0.16) 44%, rgba(251, 191, 36, 0) 72%);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.42);
}

.public-card-avatar {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.5);
}

.public-card-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    font-size: 1.5rem;
    font-weight: 800;
}

.public-card-id h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #f8fafc;
    line-height: 1.2;
}

.public-card-id p {
    margin: 0.2rem 0 0;
    color: #94a3b8;
    font-size: 0.92rem;
}

.public-card-share {
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.65);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.public-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.95rem 1.05rem;
}

.public-card-metrics div {
    border-radius: 12px;
    border: 1px solid rgba(100, 116, 139, 0.36);
    background: rgba(15, 23, 42, 0.45);
    padding: 0.55rem 0.6rem;
}

.public-card-metrics span {
    display: block;
    color: #94a3b8;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.public-card-metrics strong {
    color: #f8fafc;
    font-size: 1.02rem;
}

.public-card-block {
    padding: 0 1.05rem 1rem;
}

.public-card-block h2 {
    margin: 0 0 0.45rem;
    color: #f1f5f9;
    font-size: 1rem;
}

.public-card-block p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.public-card-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.public-card-achievement {
    min-width: 84px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.44);
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.public-card-achievement span {
    display: block;
    font-size: 1.02rem;
}

.public-card-achievement small {
    color: #cbd5e1;
    font-size: 0.68rem;
}

.public-card-wishlist {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.public-card-wishlist strong {
    color: #f8fafc;
    font-size: 1rem;
}

.public-card-wishlist span {
    color: #22c55e;
    font-weight: 700;
}

.public-card-link {
    display: inline-block;
    margin-top: 0.45rem;
    color: #22d3ee;
    font-weight: 700;
    text-decoration: none;
}

.public-card-footer {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.9rem 1.05rem 1.1rem;
    border-top: 1px solid rgba(100, 116, 139, 0.25);
}

.public-card-cta,
.public-card-copy {
    border-radius: 10px;
    border: 1px solid rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.52rem 0.78rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.public-card-copy {
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 680px) {
    .public-card-header {
        grid-template-columns: auto 1fr;
    }

    .public-card-share {
        grid-column: 1 / -1;
    }

    .public-card-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
