/****************************** 1. FONTS & VARIABLES ******************************/

@font-face {
    font-family: 'Coolvetica';
    src: url("../fonts/coolvetica rg.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CodePro';
    src: url("../fonts/code_pro_bold.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand Colors */
    --brand-red:      #b71c1c;
    --brand-dark-red: #8b0000;
    --hero-red:       #c0392b;
    --earth-brown:    #6b5b4f;
    --earth-dark:     #4a3f35;
    --holiday-gold:   #ffc107;

    /* UI Colors */
    --text-light:     #f0f0f0;
    --glass-bg:       rgba(255, 255, 255, 0.07);
    --glass-border:   rgba(255, 255, 255, 0.12);

    /* Layout & Effects */
    --card-radius:    24px;
    --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft:    0 8px 32px rgba(0,0,0,0.18);
    --shadow-strong:  0 20px 60px rgba(0,0,0,0.28);
}

/****************************** 2. GLOBAL RESET & BASE ******************************/

ul, ol, li {
    list-style: none;
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(183,28,28,0.4) rgba(0,0,0,0.1);
    scroll-behavior: smooth;
}

body {
    font-family: 'Coolvetica', system-ui, sans-serif;
    font-size: 20px;
    font-weight: normal;
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
    background: #1a1a1a;
    -webkit-backface-visibility: hidden;
}

/* GPU ускорение для всех анимируемых элементов */
*, *::before, *::after {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ===== ГЛОБАЛЬНЫЕ ПЛАВНЫЕ АНИМАЦИИ ===== */

/* Плавное появление страницы */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content-new {
    position: relative;
    display: flex;
    flex-direction: column;
}
/* Плавные transitions для всех кнопок и ссылок */
a, button, .btn, input, select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавные карточки */
.glass-card, .auth-card, .req-card, .compact-row, .role-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Плавные hover-эффекты */
.glass-card:hover {
    transform: translateY(-1px);
}

/* Flash-уведомления iOS 26 style */
@keyframes notifSlideIn {
    0% { opacity: 0; transform: translateY(-30px) scale(0.92); filter: blur(4px); }
    60% { opacity: 1; filter: blur(0); }
    80% { transform: translateY(4px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes notifSlideOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.95); filter: blur(4px); }
}

/* Stagger-анимация для списков */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.req-card, .compact-row {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.req-card:nth-child(1), .compact-row:nth-child(1) { animation-delay: 0.05s; }
.req-card:nth-child(2), .compact-row:nth-child(2) { animation-delay: 0.1s; }
.req-card:nth-child(3), .compact-row:nth-child(3) { animation-delay: 0.15s; }
.req-card:nth-child(4), .compact-row:nth-child(4) { animation-delay: 0.2s; }
.req-card:nth-child(5), .compact-row:nth-child(5) { animation-delay: 0.25s; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.8); }

h1, h2, h3 {
    font-family: 'Coolvetica', sans-serif;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.main-content-new {
    position: relative;
}

.flash-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: auto;
    min-width: 320px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
.flash-container .alert {
    pointer-events: auto;
}

/****************************** 3. HERO SECTION — RED BACKGROUND ******************************/

.hero-section-new {
    position: relative;
    min-height: 100vh;
    background: url("../images/bg_styles.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 60px 80px 40px;
    margin-bottom: -2px; /* ← добавьте эту строку */
}

.hero-inner {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 20px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Ёлочные ветки справа */
.hero-branches-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.08) 100%);
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 30%, transparent 100%);
}

/* Левая часть hero */
.hero-left {
    position: relative;
    z-index: 5;
    min-width: 0;
}

.hero-brand {
    font-family: 'CodePro', sans-serif;
    font-size: clamp(3.5rem, 5.5vw, 5rem);
    font-weight: normal;
    color: white;
    line-height: 0.9;
    margin-bottom: 12px;
    max-width: 100%;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-family: 'Coolvetica', system-ui, sans-serif;
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 28px;
    font-style: italic;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.btn-hero-outline {
    display: inline-block;
    padding: 10px 28px;
    border: 2px solid white;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-family: 'Coolvetica', sans-serif;
    font-size: 0.85rem;
    font-weight: normal;
    letter-spacing: 1px;
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    text-transform: uppercase;
}

.btn-hero-outline:hover {
    background: white;
    color: var(--brand-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.hero-quote {
    font-family: 'Coolvetica', system-ui, sans-serif;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    color: white;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 500px;
}

/* Декоративные карточки (стопка) */
.hero-decor-cards {
    position: relative;
    height: 200px;
    width: 350px;
}

.decor-pile {
    position: absolute;
    width: 160px;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.2s ease;
    will-change: transform;
    pointer-events: auto;
}

.decor-pile-1 {
    transform: rotate(-12deg);
    z-index: 2;
    top: 10px;
    left: 0;
}

.decor-pile-2 {
    transform: rotate(8deg);
    z-index: 3;
    top: 30px;
    left: 110px;
}

.decor-pile-1:hover {
    transform: scale(1.12) rotate(-3deg) translateY(-10px);
    z-index: 5;
}

.decor-pile-2:hover {
    transform: scale(1.12) rotate(2deg) translateY(-10px);
    z-index: 5;
}

/* Правая часть hero — карусель */
.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
    position: relative;
}

.card-carousel {
    position: relative;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    border-radius: 16px;
}

.card-carousel .carousel-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    opacity: 0 !important;
    transform: scale(0.95) translateZ(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
    will-change: opacity, transform;
}

.card-carousel .carousel-slide:first-child {
    position: relative;
}

.card-carousel .carousel-slide.active {
    opacity: 1 !important;
    z-index: 2;
    pointer-events: auto;
    transform: scale(1);
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: none;
}

/* Shine/glare effect on transition */
.card-carousel::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.08) 42%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.08) 58%,
        transparent 60%,
        transparent 100%
    );
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: translateX(0) rotate(15deg);
    transition: none;
}

.card-carousel.shine::after {
    opacity: 1;
    transform: translateX(350%) rotate(15deg);
    transition: transform 0.25s ease, opacity 0.1s ease;
}

.card-carousel.shine-end::after {
    opacity: 0;
    transition: opacity 0.15s ease 0.15s;
}

/* Кнопки внизу hero */
.hero-bottom-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
    position: relative;
    z-index: 3;
    flex-wrap: wrap;
}

.hero-cta-inline {
    margin-top: 20px;
    text-align: center;
    position: relative;
    z-index: 5;
}

.btn-create-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: normal;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    text-transform: lowercase;
}

.btn-create-card:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.btn-my-cards {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 1.5px solid transparent;
    border-radius: 14px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: normal;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    text-transform: lowercase;
}

.btn-my-cards:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/****************************** 4. EMOTION SECTION — BROWN BACKGROUND ******************************/

.emotion-section {
    position: relative;
    min-height: 80vh;
    background: url("../images/bg_emotion.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 80px;
}

.emotion-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.emotion-branches-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(139,92,246,0.05) 100%);
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
}

.emotion-left {
    z-index: 2;
}

.emotion-title {
    font-family: 'Coolvetica', sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    color: white;
    line-height: 1.05;
    margin-bottom: 40px;
    text-shadow: 2px 4px 15px rgba(0,0,0,0.3);
}

.btn-choose-template {
    display: inline-block;
    padding: 16px 40px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.2rem;
    font-weight: normal;
    letter-spacing: 1px;
    transition: all 0.15s ease;
    backdrop-filter: blur(8px);
}

.btn-choose-template:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: white;
}

/* Guest modal */
.guest-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.guest-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.guest-modal {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.2s ease;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 40px rgba(99,102,241,0.15);
}
.guest-modal-overlay.active .guest-modal {
    transform: scale(1) translateY(0);
}
.guest-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.guest-modal-close:hover {
    color: white;
}
.guest-modal-icon {
    margin-bottom: 20px;
    animation: guestIconPulse 2s ease-in-out infinite;
}
@keyframes guestIconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(99,102,241,0)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(99,102,241,0.5)); }
}
.guest-modal-title {
    font-family: 'CodePro', sans-serif;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 12px;
    font-weight: normal;
}
.guest-modal-text {
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 32px;
}
.guest-modal-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
}
.guest-modal-btn {
    padding: 14px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.1rem;
    font-weight: normal;
    transition: all 0.15s ease;
    cursor: pointer;
}
.guest-modal-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
}
.guest-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
    color: white;
}
.guest-modal-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
}
.guest-modal-btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-2px);
}

.emotion-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

button.btn-choose-template {
    cursor: pointer;
}

/* Calendar widget — glassmorphism */
.emotion-right {
    display: flex;
    justify-content: center;
    z-index: 2;
}

.calendar-widget-new {
    position: relative;
    background: rgba(140, 170, 210, 0.3);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(180, 210, 255, 0.3);
    border-radius: 24px;
    padding: 24px 28px;
    max-width: 380px;
    width: 100%;
    color: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* Top row: tabs + clock */
.cal-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cal-tabs {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    overflow: hidden;
}

.cal-tab {
    padding: 8px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(255,255,255,0.5);
}

.cal-tab.active {
    background: rgba(255,255,255,0.85);
    color: #333;
    border-radius: 10px;
}

.cal-clock-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-clock-btn:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* Month + big day */
.cal-month-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cal-month-day {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.cal-month-name {
    font-family: 'Coolvetica', sans-serif;
    font-size: 2.2rem;
    color: white;
}

.cal-big-day {
    font-family: 'Coolvetica', sans-serif;
    font-size: 3.5rem;
    color: white;
    line-height: 1;
}

.cal-arrow {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-arrow:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* Weekday headers */
.cal-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* Day numbers */
.cal-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    margin-bottom: 20px;
}

.cal-days-row div {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(255,255,255,0.7);
}

.cal-days-row div:hover {
    background: rgba(255,255,255,0.15);
}

.cal-day-active {
    background: #5BA0D9 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(91, 160, 217, 0.5);
}

.cal-day-other {
    color: rgba(255,255,255,0.2) !important;
}

.cal-days-monthly div {
    aspect-ratio: auto !important;
    padding: 6px 0;
    font-size: 0.85rem;
    border-radius: 8px !important;
}

/* Bottom links */
.cal-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cal-note-link, .cal-event-link {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: color 0.15s ease;
}

.cal-note-link:hover, .cal-event-link:hover {
    color: white;
}

/* Часы */
.cal-time-display {
    text-align: center;
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.1rem;
    color: rgba(180, 220, 255, 0.8);
    margin-bottom: 12px;
    letter-spacing: 3px;
}

/* Попап заметок/событий */
.cal-popup {
    position: absolute;
    bottom: 60px;
    left: 16px;
    right: 16px;
    background: rgba(40, 50, 70, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(130, 190, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    z-index: 10;
}

.cal-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: white;
    font-size: 0.95rem;
}

.cal-popup-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
}

.cal-popup-close:hover { color: white; }

.cal-popup-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 8px;
}

.cal-popup-input::placeholder { color: rgba(255,255,255,0.3); }
.cal-popup-input:focus { border-color: #5BA0D9; }

.cal-popup-save {
    width: 100%;
    padding: 8px;
    background: #5BA0D9;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 10px;
}

.cal-popup-save:hover { background: #4A8BC4; }

.cal-popup-list {
    max-height: 120px;
    overflow-y: auto;
}

.cal-popup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cal-popup-item button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
}

.cal-popup-item button:hover { color: #e74c3c; }

/* Дата input */
.cal-popup-date {
    color-scheme: dark;
}

/* Палитра цветов */
.cal-popup-colors {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    justify-content: center;
}

.cal-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.cal-color-dot.active {
    border-color: white;
    transform: scale(1.2);
}

.cal-color-dot:hover {
    transform: scale(1.15);
}

/* Точка события на дне */
.cal-day-event {
    position: relative;
}

.cal-event-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.cal-days-row div {
    position: relative;
}

/* Inline dot в списке */
.cal-event-dot-inline {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/****************************** 5. STYLES SECTION — RED BACKGROUND ******************************/

.styles-section {
    background: url("../images/bg_hero.jpg") no-repeat center center;
    background-size: cover;
    padding: 80px;
    position: relative;
}

.styles-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.styles-title {
    font-family: 'Coolvetica', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.15;
    font-style: italic;
}

.styles-desc {
    text-align: center;
    color: rgba(255,255,255,0.85);
    font-size: clamp(1.3rem, 1.6vw, 1.55rem);
    max-width: 1100px;
    margin: 0 auto 50px;
    letter-spacing: 0.5px;
    line-height: 1.7;
}

.btn-scroll-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-scroll-top:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.style-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0);
}

.style-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.style-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.style-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.style-card:hover .style-card-img img {
    transform: scale(1.08);
}

.style-card-title {
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.25rem;
    color: #333;
    padding: 16px 16px 4px;
    text-transform: none;
    letter-spacing: 0;
}

.style-card-desc {
    font-size: 0.95rem;
    color: #777;
    padding: 0 16px 20px;
    line-height: 1.5;
}

/****************************** 6. AUTH PAGES ******************************/

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: url("../images/фон для входа и рег.jpg") no-repeat center center;
    background-size: cover;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-back-btn {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

/* Плавное появление auth-карточки */
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Glassmorphism card */
.auth-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    width: 100%;
    max-width: 1000px;
    border-radius: 24px;
    overflow: hidden;
    animation: authCardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Left side — form */
.auth-card-left {
    padding: 28px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(10px) saturate(130%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.auth-card-left .auth-logo {
    font-family: 'CodePro', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.auth-card-left h1 {
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 0 4px;
}

.auth-card-left .subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    margin: 0 0 16px;
}

/* Inputs */
.auth-input-group {
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

/* Remember me */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.auth-checkbox {
    accent-color: var(--brand-red);
}

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 11px;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-submit-btn:hover {
    background: #a52020;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(183, 28, 28, 0.4);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 14px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.auth-divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Social buttons */
.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.auth-social-btn svg { flex-shrink: 0; }

.auth-social-google:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.4);
}
.auth-social-yandex:hover {
    background: rgba(252, 63, 29, 0.2);
    border-color: rgba(252, 63, 29, 0.4);
}
.auth-social-mailru:hover {
    background: rgba(0, 95, 249, 0.2);
    border-color: rgba(0, 95, 249, 0.4);
}

/* Switch link */
.auth-switch-link {
    text-align: center;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.auth-switch-link a {
    color: #fff;
    text-decoration: none;
}

.auth-switch-link a:hover {
    text-decoration: underline;
}

/* Admin quick login */
.auth-admin-btn {
    width: 100%;
    padding: 12px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 12px;
    color: rgba(255,255,255,0.8);
    font-family: 'Coolvetica', sans-serif;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.auth-admin-btn:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
    color: white;
    transform: translateY(-2px);
}

.admin-code-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-code-overlay.active {
    opacity: 1;
    visibility: visible;
}
.admin-code-modal {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 24px;
    padding: 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}
.admin-code-overlay.active .admin-code-modal {
    transform: scale(1) translateY(0);
}
.admin-code-icon {
    margin-bottom: 16px;
}
.admin-code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0 12px;
}
.admin-code-digit {
    width: 56px;
    height: 64px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(99,102,241,0.3);
    border-radius: 14px;
    color: white;
    font-size: 1.8rem;
    font-family: 'CodePro', monospace;
    text-align: center;
    outline: none;
    transition: all 0.25s ease;
    caret-color: #6366f1;
}
.admin-code-digit:focus {
    border-color: #6366f1;
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 20px rgba(99,102,241,0.2);
}
.admin-code-digit.correct {
    border-color: #22c55e;
    background: rgba(34,197,94,0.1);
}
.admin-code-digit.wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,0.1);
    animation: codeShake 0.4s ease;
}
@keyframes codeShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.admin-code-error {
    color: #ef4444;
    font-size: 0.9rem;
    min-height: 20px;
    font-family: 'Coolvetica', sans-serif;
}

/* Role picker */
.auth-role-picker {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-role-picker input[type="radio"] {
    display: none;
}

.role-card {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s ease;
}

.role-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.auth-role-picker input[type="radio"]:checked + .role-card {
    border-color: #5BA0D9;
    background: rgba(91, 160, 217, 0.15);
    box-shadow: 0 0 20px rgba(91, 160, 217, 0.2);
}

.role-icon {
    font-size: 20px;
    line-height: 1;
}

.role-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: normal;
    letter-spacing: 0.5px;
}

.auth-role-picker input[type="radio"]:checked + .role-card .role-name {
    color: #fff;
}

/* Right side — glass transparent with logo */
.auth-card-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-right-logo {
    width: 190px;
    height: auto;
    filter: drop-shadow(0 4px 30px rgba(255, 255, 255, 0.3));
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    .auth-card-right {
        display: none;
    }
}

/* Alerts — iOS 26 Dynamic Island style */
.alert {
    padding: 14px 24px 14px 18px;
    margin: 0;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
    animation: notifSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1.3;
}
.alert.fade:not(.show) {
    animation: notifSlideOut 0.35s cubic-bezier(0.4, 0, 1, 1) both;
}
.alert .btn-close {
    filter: invert(1);
    opacity: 0.6;
    padding: 4px;
    margin-left: 4px;
    font-size: 0.65rem;
}
.alert .btn-close:hover { opacity: 1; }

.alert::before {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-danger {
    background: rgba(30, 10, 10, 0.75);
    color: #ff6b7a;
}
.alert-danger::before { content: "\26A0\FE0F"; }

.alert-success {
    background: rgba(10, 30, 15, 0.75);
    color: #6ee7a0;
}
.alert-success::before { content: "\2705"; }

.alert-warning {
    background: rgba(35, 25, 5, 0.75);
    color: #fbbf24;
}
.alert-warning::before { content: "\1F514"; }

.alert-info {
    background: rgba(10, 15, 35, 0.75);
    color: #7dd3fc;
}
.alert-info::before { content: "\2139\FE0F"; }

/****************************** 7. FUNCTIONAL & FORMS (add_person, etc.) ******************************/

.functional-section {
    background: var(--earth-brown);
    padding: 60px 0 60px;
}

.island-card {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-radius: var(--card-radius);
    padding: 48px;
    box-shadow: var(--shadow-strong);
    margin-bottom: 48px;
    color: #222;
}

.form-heading {
    font-family: 'Coolvetica', sans-serif;
    text-align: center;
    font-size: 2.6rem;
    margin-bottom: 36px;
    color: var(--brand-red);
    letter-spacing: -0.5px;
}

.input-gray {
    background: #f8f9fa;
    border: none;
    padding: 18px 24px;
    border-radius: 16px;
    width: 100%;
    font-size: 1.05rem;
    transition: var(--transition);
}

.input-gray:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(183,28,28,0.15);
}

.btn-red-plus {
    background: var(--brand-red);
    color: white;
    border: none;
    width: 100%;
    height: 64px;
    border-radius: 16px;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: normal;
}

.btn-red-plus:hover {
    background: #8b0000;
    transform: translateY(-4px);
}

/* Table */
.table-header {
    background: #1a1a1a;
    color: white;
    text-align: center;
    font-family: 'Coolvetica', sans-serif;
    padding: 18px;
    margin: -48px -48px 36px -48px;
    font-size: 1.35rem;
    letter-spacing: 2px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.clean-table th {
    text-align: left;
    padding: 16px;
    color: #777;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
}

.clean-table td {
    padding: 22px 16px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.clean-table tr:last-child td { border-bottom: none; }

.fw-bold-name { font-weight: 800; color: #000; }
.text-red-date { color: var(--brand-red); font-weight: 800; }

.badge {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: normal;
}

.badge-success { background: #d1e7dd; color: #0f5132; }
.badge-wait { background: #e9ecef; color: #495057; }

/****************************** 8. CARDS & POSTCARDS ******************************/

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    padding: 20px 0;
}

.card-item {
    perspective: 1000px;
    height: auto;
    min-height: 380px;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    transition: transform 0.25s ease;
}

.card-front {
    background: white;
    transform: rotateY(0deg);
}

.card-back {
    background: var(--brand-red);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-item:hover .card-front { transform: rotateY(180deg); }
.card-item:hover .card-back { transform: rotateY(0deg); }

.card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #ffe0e0 0%, #ffc0c0 100%);
    opacity: 0.3;
}

.card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    font-family: 'Coolvetica', sans-serif;
}

.card-name {
    font-size: 3rem;
    color: #5a0000;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.card-date {
    font-size: 2.2rem;
    color: var(--brand-red);
    margin: 10px 0;
}

.card-email {
    color: #666;
    margin: 10px 0;
    font-size: 1rem;
}

.card-greeting {
    margin-top: 30px;
    font-size: 2.5rem;
    color: var(--holiday-gold);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.card-actions { text-align: center; }

.btn-edit, .btn-preview {
    display: inline-block;
    margin: 15px;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: normal;
    transition: var(--transition);
}

.btn-edit {
    background: white;
    color: var(--brand-red);
}

.btn-edit:hover {
    background: var(--holiday-gold);
    color: #500000;
    transform: translateY(-4px);
}

.btn-preview {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-preview:hover {
    background: white;
    color: var(--brand-red);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-img {
    max-width: 380px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.empty-state h3 {
    font-family: 'Coolvetica';
    font-size: 2.5rem;
    margin: 20px 0;
}

.empty-state p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/****************************** 9. PROFILE SECTION ******************************/

.profile-hero {
    min-height: 100vh;
    padding: 80px 20px;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.profile-title {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    text-align: center;
    color: var(--holiday-gold);
    margin-bottom: 60px;
    text-shadow: 0 0 40px rgba(255,193,7,0.6);
}

.profile-main-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 32px;
    padding: 60px;
    box-shadow: var(--shadow-strong);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid var(--holiday-gold);
    box-shadow: 0 0 40px rgba(255,193,7,0.6);
    object-fit: cover;
}

.profile-name { font-size: 3.5rem; margin-bottom: 12px; }

.profile-role {
    font-size: 1.5rem;
    color: var(--holiday-gold);
    margin-bottom: 8px;
}

.profile-email {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 48px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.stat-card {
    background: rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(255,193,7,0.2);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 70px rgba(255,193,7,0.3);
}

.stat-value {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--holiday-gold);
}

.stat-label { font-size: 1.2rem; color: #ccc; }

.profile-actions {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 48px;
    font-size: 1.2rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3b5c 0%, #e91e63 100%);
    box-shadow: 0 8px 32px rgba(255,59,92,0.4), inset 0 2px 8px rgba(255,255,255,0.15);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-logout::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.25s ease;
}

.btn-logout:hover::before { left: 100%; }

.btn-logout:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 48px rgba(233,30,99,0.6), inset 0 2px 12px rgba(255,255,255,0.25);
}

/****************************** 10. EDITOR PAGE ******************************/

.editor-page {
    min-height: calc(100vh - 80px);
    padding: 60px 20px 80px;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}

.editor-main-title {
    font-family: 'Coolvetica', sans-serif;
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    text-align: center;
    color: var(--holiday-gold);
    margin-bottom: 60px;
    text-shadow: 0 0 40px rgba(255,193,7,0.6);
    letter-spacing: -1px;
}

.editor-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 48px;
    max-width: 1600px;
    margin: 0 auto;
}

.editor-sidebar textarea,
.editor-page textarea {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    resize: vertical;
    transition: all 0.15s ease;
}

.section-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: normal;
}

.select-wrapper { position: relative; }

select {
    width: 100%;
    padding: 16px 48px 16px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,193,7,0.2);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

select:focus {
    border-color: var(--holiday-gold);
    outline: none;
    background: rgba(255,255,255,0.1);
}

.select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--holiday-gold);
    pointer-events: none;
}

.add-new-btn {
    display: inline-block;
    margin-top: 16px;
    color: var(--holiday-gold);
    font-weight: normal;
    text-decoration: none;
    transition: all 0.15s ease;
}

.add-new-btn:hover {
    color: white;
    transform: translateX(6px);
}

.textarea-wrapper { position: relative; }

textarea {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    resize: vertical;
    transition: all 0.15s ease;
}

textarea:focus {
    border-color: var(--holiday-gold);
    background: rgba(255,255,255,0.08);
    outline: none;
}

textarea:focus + label,
textarea:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.9rem;
    color: var(--holiday-gold);
    background: rgba(30,0,0,0.8);
    padding: 0 8px;
}

textarea + label {
    position: absolute;
    left: 20px;
    top: 20px;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
    transition: all 0.15s ease;
}

.btn-ai {
    margin-top: 16px;
    width: 100%;
    padding: 14px;
    background: rgba(255,193,7,0.08);
    border: 1px solid rgba(255,193,7,0.3);
    color: var(--holiday-gold);
    border-radius: 12px;
    cursor: pointer;
    font-weight: normal;
    transition: all 0.15s ease;
}

.btn-ai:hover {
    background: rgba(255,193,7,0.18);
    transform: translateY(-2px);
}

.btn-create {
    margin-top: 32px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(45deg, var(--brand-red), #c62828);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: normal;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(183,28,28,0.4);
    transition: all 0.2s ease;
}

.btn-create:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(183,28,28,0.6);
}

/* Templates */
.templates-section { padding-top: 20px; }
.templates-title { font-size: 2.2rem; margin-bottom: 32px; color: white; text-align: center; }

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.template-item {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: var(--holiday-gold);
}

.template-item.active {
    border-color: var(--holiday-gold);
    box-shadow: 0 0 0 4px rgba(255,193,7,0.2);
    background: rgba(255,193,7,0.05);
}

.template-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.red { background: linear-gradient(135deg, #500000, #900000); }
.gold { background: linear-gradient(135deg, #2a1a00, #4a2e00); }
.neon { background: linear-gradient(135deg, #0f0c29, #302b63); }
.white { background: linear-gradient(135deg, #e0e0e0, #f5f5f5); }

.template-mockup {
    width: 70%;
    height: 80%;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.template-name {
    font-size: 1.4rem;
    text-align: center;
    margin: 16px 0 4px;
    color: white;
}

.template-desc {
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/****************************** 11. SIDEBAR (ADMIN) ******************************/

#sidebar {
    position: fixed;
    left: 0; top: 0; height: 100vh;
    width: 240px;
    background: rgba(10, 10, 25, 0.92);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(107, 138, 255, 0.08);
    transition: all 0.2s ease;
    z-index: 1000;
}

#sidebar.collapsed { width: 70px; }

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 23px;
    border-bottom: 1px solid rgba(107, 138, 255, 0.1);
}

.toggle-btn { cursor: pointer; color: #6B8AFF; font-size: 1.5rem; transition: 0.15s ease; }
.toggle-btn:hover { transform: scale(1.1); color: #8B5CF6; }

.brand-name {
    margin-left: 15px; color: white; letter-spacing: 2px;
    transition: 0.2s; opacity: 1;
    font-family: 'CodePro', sans-serif;
    font-size: 0.95rem;
}
#sidebar.collapsed .brand-name, #sidebar.collapsed .link-text {
    display: none; opacity: 0;
}

.nav-list { list-style: none; padding: 20px 10px; margin: 0; }

#sidebar .nav-link {
    display: flex; align-items: center;
    padding: 12px 15px; border-radius: 12px;
    color: rgba(255, 255, 255, 0.5); text-decoration: none;
    margin-bottom: 6px; transition: all 0.15s ease;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

#sidebar .nav-link i { font-size: 1.15rem; min-width: 30px; }
#sidebar .nav-link:hover {
    background: rgba(107, 138, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}
#sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(107, 138, 255, 0.2), rgba(139, 92, 246, 0.15));
    color: #6B8AFF;
    border: 1px solid rgba(107, 138, 255, 0.15);
}

#sidebar.collapsed .nav-link { justify-content: center; padding: 12px 0; }
#sidebar.collapsed .nav-link:hover { transform: none; }

.border-top-line { border-top: 1px solid rgba(107, 138, 255, 0.08); margin-top: 15px; padding-top: 15px; }

/****************************** 12. GENERAL PURPOSE BUTTONS ******************************/

.btn-main, .btn-menu {
    padding: 18px 52px;
    border-radius: 999px;
    font-weight: normal;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    letter-spacing: 0.8px;
    cursor: pointer;
}

.btn-main {
    background: var(--holiday-gold);
    color: #500000;
    box-shadow: 0 12px 40px rgba(255,193,7,0.5);
    border: none;
}

.btn-main:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(255,193,7,0.7);
    background: linear-gradient(45deg, #c62828, var(--brand-red));
    color: white;
}

.compact-btn {
    padding: 12px 32px;
    font-size: 1rem;
}

.text-gold { color: #ffd700; }

/****************************** 13. MEDIA QUERIES ******************************/

@media (max-width: 1200px) {
    .hero-section-new { padding: 60px 40px 40px; }
    .emotion-section { padding: 60px 40px; }
    .styles-section { padding: 60px 40px; }
}

@media (max-width: 992px) {
    .hero-inner,
    .emotion-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-left { text-align: left; }
    .hero-buttons { justify-content: flex-start; }
    .hero-decor-cards { display: none; }
    .hero-right { order: -1; }

    .card-carousel {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-branches-right,
    .emotion-branches-right {
        width: 100%;
        opacity: 0.2;
    }

    .emotion-left { text-align: left; }

    .styles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .editor-grid {
        grid-template-columns: 1fr;
    }

    #sidebar { transform: translateX(-100%); }

    /* Profile mobile */
    .profile-main-card { padding: 32px 20px; }
    .profile-name { font-size: 2.2rem; }
    .avatar-wrapper { width: 140px; height: 140px; }
    .profile-stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-card { padding: 20px; }
    .stat-value { font-size: 2.2rem; }
    .profile-actions { gap: 16px; }
    .btn-logout { padding: 12px 32px; font-size: 1rem; }

    /* Functional/forms */
    .island-card { padding: 24px 16px; }
    .table-header { margin: -24px -16px 24px -16px; padding: 14px; font-size: 1.1rem; }
    .form-heading { font-size: 1.8rem; }
    .input-gray { padding: 14px 18px; font-size: 0.95rem; }
    .btn-red-plus { height: 52px; font-size: 1.6rem; }

    /* Cards */
    .cards-grid { grid-template-columns: 1fr; gap: 24px; }
    .card-item { min-height: 300px; }
    .card-name { font-size: 2rem; }
    .card-date { font-size: 1.6rem; }
    .card-greeting { font-size: 1.8rem; }
    .card-content { padding: 24px; }

    /* Buttons */
    .btn-main, .btn-menu { padding: 14px 32px; font-size: 1rem; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }

    /* Navigation */
    .hero-section-new { padding: 40px 16px 30px; min-height: auto; }
    .emotion-section { padding: 40px 16px; min-height: auto; }
    .styles-section { padding: 40px 16px; }

    /* Hero */
    .hero-brand { font-size: 3rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 16px; }
    .hero-quote { font-size: 1.1rem; max-width: 100%; }
    .hero-buttons { flex-direction: column; gap: 8px; }
    .btn-hero-outline { text-align: center; padding: 12px 24px; }
    .hero-bottom-cta { flex-direction: column; align-items: center; gap: 10px; }
    .btn-create-card { width: 100%; justify-content: center; padding: 14px 24px; font-size: 1rem; }
    .btn-my-cards { width: 100%; justify-content: center; }

    /* Emotion */
    .emotion-title { font-size: 2rem; margin-bottom: 20px; }
    .emotion-buttons { flex-direction: column; }
    .btn-choose-template { width: 100%; text-align: center; padding: 14px 24px; font-size: 1rem; }
    .calendar-widget-new { padding: 18px; max-width: 100%; }
    .cal-month-name { font-size: 1.6rem; }
    .cal-big-day { font-size: 2.5rem; }
    .cal-tabs { border-radius: 10px; }
    .cal-tab { padding: 6px 14px; font-size: 0.8rem; }

    /* Styles grid */
    .styles-grid { grid-template-columns: 1fr; gap: 16px; }
    .styles-desc { font-size: 1rem; margin-bottom: 30px; }

    /* Auth */
    .auth-container { padding: 20px 12px; }
    .auth-card { max-width: 100%; }
    .auth-card-left { padding: 24px 20px; }
    .auth-card-left h1 { font-size: 1.4rem; }
    .auth-admin-btn { font-size: 0.9rem; padding: 10px; }
    .admin-code-modal { padding: 28px 20px; }
    .admin-code-digit { width: 48px; height: 56px; font-size: 1.5rem; }
    .admin-code-inputs { gap: 8px; }
    .auth-role-picker { flex-direction: column; gap: 8px; }
    .role-card { padding: 12px 16px; }

    /* Guest modal */
    .guest-modal { padding: 32px 24px; }
    .guest-modal-title { font-size: 1.3rem; }
    .guest-modal-text { font-size: 0.95rem; }
    .guest-modal-buttons { flex-direction: column; gap: 10px; }
    .guest-modal-btn { width: 100%; text-align: center; padding: 12px 24px; }

    /* Profile */
    .profile-hero { padding: 40px 16px; }
    .profile-title { font-size: 2.5rem; margin-bottom: 30px; }
    .profile-main-card { padding: 28px 16px; border-radius: 20px; }
    .avatar-wrapper { width: 120px; height: 120px; }
    .profile-name { font-size: 1.8rem; }
    .profile-role { font-size: 1.1rem; }
    .profile-email { font-size: 1rem; margin-bottom: 24px; }
    .profile-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
    .stat-card { padding: 16px; border-radius: 16px; }
    .stat-value { font-size: 1.8rem; }
    .stat-label { font-size: 0.9rem; }
    .profile-actions { margin-top: 32px; }

    /* Editor page */
    .editor-page { padding: 30px 16px 60px; }
    .editor-main-title { font-size: 2.5rem; margin-bottom: 30px; }
    .editor-grid { gap: 24px; }
    .section-label { font-size: 0.95rem; }
    select { padding: 14px 40px 14px 16px; font-size: 0.95rem; }
    textarea { min-height: 140px; padding: 16px; font-size: 0.95rem; }
    .btn-create { padding: 16px; font-size: 1.1rem; }
    .templates-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .template-name { font-size: 1.1rem; }

    /* Calendar page */
    .calendar-widget { padding: 16px; }

    /* Flash container */
    .flash-container { min-width: 280px; max-width: calc(100vw - 32px); left: 50%; }
    .alert { padding: 10px 16px 10px 14px; font-size: 0.8rem; border-radius: 40px; }

    /* Table mobile */
    .clean-table th { padding: 10px 8px; font-size: 0.75rem; }
    .clean-table td { padding: 14px 8px; font-size: 0.85rem; }

    /* Functional */
    .functional-section { padding: 30px 0; }
}

@media (max-width: 480px) {
    .hero-brand { font-size: 2.5rem; letter-spacing: -1px; }
    .hero-subtitle { font-size: 0.9rem; }

    .card-carousel { max-width: 260px; }

    .emotion-title { font-size: 1.7rem; }
    .styles-title { font-size: 1.4rem; }

    .auth-card-left { padding: 20px 16px; }
    .auth-card-left .auth-logo { font-size: 1.2rem; }
    .auth-social-btn { padding: 10px 12px; font-size: 0.85rem; }

    .profile-name { font-size: 1.5rem; }
    .avatar-wrapper { width: 100px; height: 100px; }
    .profile-stats-grid { grid-template-columns: 1fr; }

    .editor-main-title { font-size: 2rem; }
    .templates-grid { grid-template-columns: 1fr; }

    .btn-main, .btn-menu { padding: 12px 24px; font-size: 0.9rem; }
    .compact-btn { padding: 10px 20px; font-size: 0.85rem; }

    /* Island card */
    .island-card { padding: 20px 12px; border-radius: 16px; }
    .table-header { margin: -20px -12px 20px -12px; border-radius: 16px 16px 0 0; }
    .form-heading { font-size: 1.5rem; margin-bottom: 20px; }

    /* Empty state */
    .empty-img { max-width: 220px; }
    .empty-state h3 { font-size: 1.6rem; }
    .empty-state p { font-size: 1rem; }

    /* Calendar widget on main page */
    .cal-month-day { gap: 10px; }
    .cal-month-name { font-size: 1.3rem; }
    .cal-big-day { font-size: 2rem; }
    .cal-popup { left: 8px; right: 8px; padding: 12px; }
}

@media (max-width: 360px) {
    .hero-brand { font-size: 2.2rem; }
    .btn-hero-outline { padding: 10px 16px; font-size: 0.75rem; }
    .btn-create-card { padding: 12px 16px; font-size: 0.85rem; }
    .admin-code-digit { width: 42px; height: 48px; font-size: 1.3rem; }
}

/****************************** 14. ANIMATIONS ******************************/

@keyframes uiFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Touch Device Optimization */
@media (hover: none) {
    .btn-hero-outline:hover,
    .btn-create-card:hover,
    .btn-choose-template:hover,
    .style-card:hover,
    .decor-pile:hover {
        transform: none;
        box-shadow: none;
    }
}

/****************************** 15. CALENDAR PAGE ******************************/

.calendar-widget {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-radius: var(--card-radius);
    padding: 20px;
    max-width: 440px;
    color: #222;
    box-shadow: var(--shadow-strong);
    margin: 0 auto;
}

.cal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: normal;
    font-size: 1.4rem;
    color: #333;
}

.cal-head button {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.cal-head button:hover { transform: scale(1.1); }

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 12px;
    color: #777;
    font-size: 0.95rem;
    font-weight: normal;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.days div {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: var(--transition);
    color: #333;
}

.days div:hover:not(:empty) { background: rgba(183,28,28,0.1); }

.days .today {
    background: var(--brand-red);
    color: white;
    box-shadow: 0 8px 24px rgba(183,28,28,0.4);
    font-weight: 800;
}

/****************************** 16. MESSAGE FIELD ******************************/

.message-field textarea { min-height: 180px; padding: 20px; resize: vertical; }

/****************************** 17. NEUTRAL STYLES ******************************/
.bg-neutral-light {
    background: #f4f4f2 !important;
    color: #333 !important;
}

.bg-neutral-dark {
    background: #2d2d2a !important;
    color: #e0e0ce !important;
    border: 1px solid #444;
}

/****************************** 18. MOBILE OVERHAUL ******************************/

@media (max-width: 600px) {

    /* ── Sidebar ── */
    #sidebar {
        width: 240px !important;
    }
    .sidebar-logo-text { font-size: 1rem; }
    .sidebar-nav-link {
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    .sidebar-nav-icon { font-size: 1.1rem; width: 28px; }

    /* ── Home hero: FULLSCREEN overlay layout ── */
    .hero-section-new {
        padding: 0;
        min-height: 100svh;
        height: 100svh;
        display: block;
        position: relative;
        overflow: hidden;
        background-attachment: scroll !important;
    }
    /* Карусель — абсолютно позиционирована, занимает весь экран */
    .hero-inner {
        display: block;
        position: relative;
        height: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .hero-right {
        position: absolute;
        inset: 0;
        z-index: 1;
    }
    .card-carousel {
        max-width: 100%;
        width: 100%;
        height: 100% !important;
        min-height: unset;
        max-height: unset;
        border-radius: 0;
        overflow: hidden;
    }
    .card-carousel .carousel-slide {
        height: 100%;
    }
    .card-carousel .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        border-radius: 0;
    }
    .hero-cta-inline { display: none; }
    .hero-decor-cards { display: none; }
    .hero-branches-right { display: none; }

    /* Текст + кнопки поверх карусели — внизу экрана */
    .hero-left {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 5;
        padding: 0 20px 28px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0,0,0,0.5) 30%,
            rgba(0,0,0,0.82) 70%,
            rgba(0,0,0,0.92) 100%
        );
        padding-top: 60px;
    }
    .hero-brand {
        font-size: 2.6rem;
        letter-spacing: -1px;
        margin-bottom: 4px;
        line-height: 1;
        text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    }
    .hero-subtitle {
        font-size: 0.78rem;
        margin-bottom: 6px;
        line-height: 1.35;
        opacity: 0.7;
    }
    .hero-quote {
        font-size: 0.88rem;
        margin-bottom: 18px;
        line-height: 1.4;
        color: rgba(255,255,255,0.75);
    }
    .hero-buttons {
        flex-direction: column;
        gap: 9px;
        margin-bottom: 0;
        margin-top: 0;
    }
    .btn-hero-outline {
        width: 100%;
        text-align: center;
        padding: 14px;
        font-size: 0.88rem;
        border-radius: 14px;
        border-width: 1.5px;
        letter-spacing: 1.2px;
        backdrop-filter: blur(12px);
        background: rgba(255,255,255,0.1);
    }
    .hero-buttons .btn-hero-outline:first-child {
        background: rgba(255,255,255,0.2);
        border-color: rgba(255,255,255,0.65);
        font-weight: 700;
        font-size: 0.92rem;
    }
    .hero-bottom-cta { display: none; }

    /* ── Auth ── */
    .auth-container { padding: 16px 10px; min-height: 100vh; }
    .auth-card { border-radius: 20px; }
    .auth-card-left { padding: 20px 16px; }
    .auth-card-left h1 { font-size: 1.3rem; margin-bottom: 6px; }
    .auth-logo { font-size: 1.1rem !important; margin-bottom: 16px; }
    .input-field { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
    .btn-auth { padding: 13px; font-size: 1rem; border-radius: 12px; }
    .auth-social-btn { padding: 10px 12px; font-size: 0.85rem; gap: 8px; }
    .auth-divider { margin: 14px 0; font-size: 0.8rem; }
    .auth-footer { font-size: 0.85rem; margin-top: 14px; }

    /* ── Contacts page ── */
    .island-card { padding: 16px 12px; border-radius: 16px; }
    .table-header {
        margin: -16px -12px 16px;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 16px 16px 0 0;
    }
    .form-heading { font-size: 1.3rem; margin-bottom: 16px; }
    .input-gray { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
    .btn-red-plus { height: 48px; font-size: 1.5rem; border-radius: 12px; }
    .clean-table { font-size: 0.8rem; }
    .clean-table th { padding: 8px 6px; font-size: 0.72rem; }
    .clean-table td { padding: 10px 6px; }
    /* скрываем менее важные колонки таблицы */
    .clean-table .col-group,
    .clean-table .col-email { display: none; }

    /* ── Profile ── */
    .profile-hero { padding: 32px 14px; }
    .profile-title { font-size: 2rem; }
    .profile-main-card { padding: 20px 14px; border-radius: 18px; }
    .avatar-wrapper { width: 100px; height: 100px; }
    .avatar-wrapper .avatar-img { width: 100px; height: 100px; }
    .profile-name { font-size: 1.5rem; margin-bottom: 4px; }
    .profile-role { font-size: 0.95rem; }
    .profile-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
    .stat-card { padding: 14px 10px; border-radius: 14px; }
    .stat-value { font-size: 1.6rem; }
    .stat-label { font-size: 0.75rem; }
    .profile-actions { gap: 10px; margin-top: 20px; }
    .btn-logout { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; }

    /* ── Cards list ── */
    .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-item { min-height: 200px; border-radius: 16px; }
    .card-name { font-size: 1.3rem; }
    .card-content { padding: 14px; }

    /* ── Editor ── */
    .editor-page { padding: 20px 12px 60px; }
    .editor-main-title { font-size: 2rem; margin-bottom: 20px; }
    .editor-grid { gap: 16px; }
    select { font-size: 16px; padding: 13px 36px 13px 14px; }
    textarea { font-size: 16px; min-height: 120px; }
    .btn-create { padding: 14px; font-size: 1rem; border-radius: 14px; }
    .templates-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .template-img { height: 100px; border-radius: 10px; }

    /* ── Buttons ── */
    .btn-main { padding: 12px 22px; font-size: 0.9rem; }
    .btn-menu { padding: 12px 22px; font-size: 0.9rem; }
    .compact-btn { padding: 9px 16px; font-size: 0.82rem; }

    /* ── Flash notifications ── */
    .flash-container { bottom: 16px; top: auto; left: 50%; transform: translateX(-50%); }
    .alert { font-size: 0.82rem; padding: 10px 16px; }

    /* ── Functional section ── */
    .functional-section { padding: 24px 0; }

    /* ── Add person form ── */
    .person-form { padding: 20px 14px; }
    .role-tabs { gap: 8px; margin-bottom: 16px; }
    .role-tab { padding: 9px 20px; font-size: 0.9rem; }
    .save-btn { padding: 14px; font-size: 1rem; margin-top: 20px; border-radius: 14px; }

    /* ── Admin panel ── */
    .admin-tabs { flex-wrap: wrap; gap: 6px; }
    .admin-tab { padding: 8px 14px; font-size: 0.8rem; }

    /* ── Input focus zoom fix for iOS ── */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}
