@font-face {
    font-family: 'Picnic-Condensed';
    src: url('PicnicTypeface-Condensed.otf') format('opentype');
}

@font-face {
    font-family: 'Picnic-Expanded';
    src: url('PicnicTypeface-Expanded.otf') format('opentype');
}

@font-face {
    font-family: 'Picnic-Text';
    src: url('PicnicTypeface-Text.otf') format('opentype');
}

:root {
    --bg-color: #381E1E;
    --card-bg: #4A2828;
    /* Slightly lighter shade for cards to maintain depth */
    --input-bg: rgba(60, 32, 32, 0.8);
    --accent-color: #ff4d00;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Picnic-Text', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    user-select: none;
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* Ticker Header */
.ticker-container {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 2px 0;
    /* Slimmer ticker */
    font-family: 'Picnic-Expanded', sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    z-index: 200;
    /* Above sticky header */
    flex-shrink: 0;
    /* Never collapse */
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 15s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.ticker-item {
    display: inline-block;
    padding: 0 20px;
}

.star {
    margin: 0 10px;
}

/* Layout Containers */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0; /* Removed padding to allow sticky headers to hit the edge */
    overflow: hidden;
    min-height: 0;
    width: 100%;
}

main.scrollable {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

main.scrollable::-webkit-scrollbar {
    display: none;
}


.page {
    display: none;
    width: 100%;
    max-width: 450px;
    padding: 35px 20px 20px 20px; /* Increased top padding for better separation from ticker */
    animation: pageEntrance 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#login-page {
    touch-action: manipulation;
}

#main-menu, #registration-page, #market-page, #curator-page, #profile-page, #documents-page {
    touch-action: pan-y; /* Allow vertical scroll */
    height: auto;
    min-height: 100%;
}

.page.active {
    display: flex;
    flex-direction: column;
}

@keyframes pageEntrance {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes signWobble {
    0% {
        transform: translateX(100%) rotate(5deg);
        opacity: 0;
    }

    60% {
        transform: translateX(-5%) rotate(-2deg);
    }

    80% {
        transform: translateX(2%) rotate(1deg);
    }

    100% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

/* Login Page */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Registration Page Style */
.reg-title {
    font-family: 'Picnic-Condensed', sans-serif;
    font-size: 42px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: left;
}

.reg-subtitle {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    text-align: left;
}

.reg-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Multi-step Progress Bar */
.progress-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.progress-step {
    flex: 1;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-step.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: #ff0000;
    /* Bright red as per screenshot */
    animation: slideIn 0.5s ease;
}

.progress-step.completed::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: #ff0000;
}

@keyframes slideIn {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    opacity: 0;
    animation: slideUpFade 0.5s ease-out forwards;
}

/* Staggered form delays */
.reg-step .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.reg-step .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.reg-step .form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.reg-step .form-group:nth-child(4) {
    animation-delay: 0.4s;
}

#login-page .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

#login-page .form-group:nth-child(3) {
    animation-delay: 0.3s;
}

#login-page .btn-primary {
    animation: slideUpFade 0.5s ease-out 0.4s forwards;
    opacity: 0;
}

#login-page .login-footer {
    animation: slideUpFade 0.5s ease-out 0.5s forwards;
    opacity: 0;
}

.form-label {
    display: block;
    font-family: 'Picnic-Text', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
}

input,
select {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-color);
    font-family: 'Picnic-Text', sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input:focus {
    border-color: var(--accent-color);
}

.input-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}


button {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-family: 'Picnic-Expanded', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}






button:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #ff4c00, #ff6a00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 0, 0.3);
}

.btn-secondary {
    background-color: #2d1b1b;
    color: white;
}

.consent-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.consent-btn.active#consent-yes {
    background: var(--accent-color);
    color: black;
    box-shadow: 0 0 20px rgba(255, 29, 211, 0.4);
    border-color: var(--accent-color);
}

.consent-btn.active#consent-no {
    background: #e33;
    color: white;
    box-shadow: 0 0 20px rgba(238, 51, 51, 0.4);
    border-color: #e33;
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.footer-sep {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.5;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Picnic-Text', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}




.btn-text:hover {
    color: var(--text-color);
}


/* Custom Select Styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
}

/* Consent Step Specific */
.consent-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.consent-title {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 14px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.consent-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.consent-btn {
    flex: 1 1 140px;
    /* Allow buttons to shrink/grow and stack below 140px */
    padding: 16px 20px;
    font-size: 14px;
    min-width: fit-content;
}


/* --- FESTIVAL BRANDING & 3D LOGO --- */

.festival-logo-perspective {
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
    margin-top: 20px; /* Lowered logo */
    margin-bottom: 40px;
    animation: logoFloat 4s ease-in-out infinite;
}

.festival-logo-perspective.small {
    margin-bottom: 20px;
    transform: scale(1.1);
    transform-origin: center;
}

/* SVG Logo Styling - One to One with Source */
.main-logo-svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.logo-afisha-path,
.logo-afisha-path-2,
.logo-afisha-path-3,
.logo-afisha-path-4,
.logo-afisha-path-5 {
    fill: white;
}

.logo-picnic-path {
    fill: #FF1DD3;
}

.logo-26-path,
.logo-26-path-2 {
    fill: #888888;
}



@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- SIGNPOST MENU --- */

.menu-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px 10px 20px; /* Reduced top padding */
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 1000;
    margin-bottom: 0; /* Removing margin to join with menu content */
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5);
    flex-shrink: 0;
    transition: display 0.3s ease;
}

.menu-header.hidden {
    display: none;
}

.search-container {
    width: 95%; /* Slightly wider search */
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

#menu-search {
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    text-align: center;
    padding: 14px 45px;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
}

#menu-search:focus {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.search-bell {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 50%;
}

.search-bell:hover {
    color: var(--accent-orange);
    transform: scale(1.1);
}

.search-bell:active {
    transform: scale(0.9);
}

/* Curator Dashboard Enhancements */
.curator-nav-tabs {
    display: flex;
    gap: 8px;
    padding: 0 5px; /* Match stats bar padding */
    margin: 20px 0;
    width: 100%;
}

.curator-nav-tab {
    flex: 1 1 0; /* Force strictly equal widths */
    min-width: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 4px;
    border-radius: 14px;
    font-family: 'Picnic-Text', sans-serif;
    font-size: 11px; /* Slightly smaller to fit "ПОЛЬЗОВАТЕЛИ" */
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.curator-nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.7;
    transform: translateY(-1px);
}

.curator-nav-tab.active {
    background: linear-gradient(135deg, #FF4900 0%, #FF1DD3 100%);
    color: #fff; /* Changed from black to white */
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(255, 29, 211, 0.4);
    transform: translateY(-3px) scale(1.05);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.curator-tab-content {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.curator-tab-content.active {
    display: flex;
}

.curator-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 5px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.6;
}

/* Deadlines & Documents */
.deadline-settings-card {
    background: #1a0f0f;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 122, 0, 0.2);
}

.deadline-grid-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.deadline-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.deadline-row:last-child {
    border-bottom: none;
}

.deadline-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
}

.deadline-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deadline-input:focus {
    border-color: var(--accent-orange) !important;
    background: rgba(255, 73, 0, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 73, 0, 0.2);
}

/* Customizing the date picker icon */
.deadline-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

.deadline-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-user-card {
    background: #2d1b1b;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deadline-status-dots {
    display: flex;
    gap: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444;
}

.status-dot.uploaded { background: #4caf50; }
.status-dot.overdue { background: #f44336; }
.status-dot.pending { background: #ffeb3b; }

.doc-users-table-container {
    background: #2d1b1b;
    border-radius: 20px;
    overflow: hidden;
}

.doc-users-table {
    width: 100%;
    border-collapse: collapse;
}

.doc-users-table th {
    background: rgba(0,0,0,0.2);
    text-align: left;
    padding: 15px;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.7;
}

.doc-users-table td {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.doc-progress-bar {
    width: 60px;
    height: 6px;
    background: #444;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.doc-progress-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0;
    transition: width 0.5s ease;
}

/* User Modal Edit Mode */
.user-detail-header-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icon-label {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-icon-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.info-item label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 15px;
    font-weight: 500;
}
    width: 100%;
    color: white;
}

.search-bell {
    position: absolute;
    right: 0;
    height: 100%;
    width: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0 30px 30px 0;
    /* Semi-circle/half-capsule look */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bell:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--accent-color);
}

#menu-search:focus {
    background: rgba(255, 255, 255, 0.12);
}

.parallelogram-menu {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 80px; 
    gap: 0; /* Handled by margins now for better control */
    margin-top: 0;
}


.signpost-pole {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -20px;
    bottom: -20px;
    width: 12px;
    background: linear-gradient(to right, #222, #444, #222);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1;
    border-radius: 4px;
}


.menu-item-wrapper {
    width: 100%;
    max-width: 100%;
    z-index: calc(10 - var(--order));
    opacity: 0;
    transform: translateX(100%);
    animation: signEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: calc(var(--order) * 0.15s);
    margin-top: -15px; /* Reduced overlap to give more breathing room */
}

.menu-item-wrapper:first-child { margin-top: 0; }

.menu-item {
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}

.menu-item:hover {
    transform: scale(1.02) translateX(10px);
    filter: brightness(1.1) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
}

/* --- SIGNPOST MENU COLORS --- */

.market .sign-body {
    fill: #FF99EB;
}

.market .sign-text {
    fill: #381E1E;
    font-size: 90px;
}

/* Moving the market sign down slightly */
.menu-item-wrapper[style*="--order: 1"] {
    width: 100%;
    margin-top: 5px;
}

.documents .sign-body {
    fill: #FF1818;
}

.documents .sign-text {
    fill: #381E1E;
    font-family: 'Picnic-Text', sans-serif;
    font-size: 90px;
    font-weight: 900;
    transform-origin: center;
}





.support .sign-body {
    fill: #381E1E;
}

.support .sign-text {
    fill: #FF2E2D;
    font-size: 95px;
    stroke: none;
}

.profile .sign-body {
    fill: #FF4900;
}

.profile .sign-text {
    fill: #381E1E;
    font-family: 'Picnic-Text', sans-serif;
    font-size: 90px;
    font-weight: 900;
    transform-origin: center;
}

.sign-text {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 90px;
    font-weight: 900;
    stroke: black;
    stroke-width: 2px;
    paint-order: stroke fill;
    text-anchor: middle;
}

.curator .sign-text {
    font-size: 90px;
}

@keyframes signEntrance {
    0% {
        opacity: 0;
        transform: translateX(120%);
    }

    50% {
        transform: translateX(-10%);
    }

    75% {
        transform: translateX(3%);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Specific rotation for 'natural' look */
.menu-item-wrapper[style*="--order: 2"] { margin-left: 5%; }
.menu-item-wrapper[style*="--order: 3"] { margin-left: -5%; }
.menu-item-wrapper[style*="--order: 4"] { margin-left: 5%; margin-top: -20px; }

@media (max-width: 600px) {
    .parallelogram-menu {
        gap: 0;
        margin-top: 5px;
    }

    .sign-text {
        font-size: min(15vw, 65px);
    }

    .curator .sign-text {
        font-size: min(13vw, 55px);
    }
    
    .menu-item-wrapper[style*="--order: 2"] {
        margin-left: 2%; /* Keep slight rotation/offset even on mobile */
    }
    .menu-item-wrapper[style*="--order: 3"] {
        margin-left: -2%;
    }
    .menu-item-wrapper[style*="--order: 4"] {
        margin-left: 2%;
    }
}

.sign-arrow {
    display: none;
}

/* --- MARKET PAGE STYLES --- */

#market-page {
    padding-top: 0; /* Managed by .page global padding now */
    height: auto;
    width: 100%;
}

#market-page::-webkit-scrollbar {
    display: none;
}

.market-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.btn-back {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: transform 0.2s, background 0.2s;
}

.btn-back:hover {
    background: var(--accent-orange-dim);
    transform: scale(1.05);
}

.market-title-group {
    flex: 1;
}

.market-page-title {
    font-family: 'Picnic-Expanded', sans-serif;
    font-size: 28px;
    text-transform: uppercase;
    line-height: 1;
}

#curator-page .market-page-title,
#profile-page .market-page-title {
    font-size: 24px; /* 15% smaller than 28px */
}

.market-page-subtitle {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
}

.curator-banner {
    background: rgba(255, 29, 211, 0.1);
    border: 1px solid rgba(255, 29, 211, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    animation: slideUpFade 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.curator-banner-icon {
    font-size: 20px;
}

.curator-banner p {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
    padding-bottom: 40px;
}

.market-card {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 24px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--i) * 0.1s + 0.3s);
}

.market-card:hover {
    transform: translateY(-5px);
    background: #5A3232;
    border-color: rgba(255, 29, 211, 0.3);
}

.card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
}

.card-title {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
    line-height: 1.2;
}

.card-info {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: auto;
}

.card-action {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 700;
    margin-top: 10px;
}

.add-card {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: transparent;
    justify-content: center;
    align-items: center;
}

.add-plus {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.add-card:hover {
    border-color: var(--accent-color);
    background: rgba(255, 77, 0, 0.05);
}

.add-card:hover .add-plus {
    color: var(--accent-color);
}

/* --- MODAL STYLES --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    align-items: flex-end;
    /* Slide up from bottom */
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 500px;
    border-radius: 30px 30px 0 0;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.modal-title {
    font-family: 'Picnic-Condensed', sans-serif;
    font-size: 32px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.modal-subtitle {
    font-family: 'Picnic-Text', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

#user-detail-brand {
    font-family: 'Picnic-Text', sans-serif !important;
    font-size: 24px;
    margin-bottom: 2px;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 16px; 
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-block p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.modal-desc {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

.form-group-modal {
    margin-bottom: 20px;
}

.form-group-modal label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group-modal input,
.form-group-modal select,
.form-group-modal textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 16px;
    color: white;
    font-family: 'Picnic-Text', sans-serif;
    font-size: 15px;
}

.notif-title {
    font-family: 'Picnic-Condensed', sans-serif;
    font-size: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 30px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 50px;
}

.registration-form button {
    width: 100%;
    margin-top: 5px;
    padding: 15px;
    font-size: 14px;
    box-sizing: border-box;
}

#btn-update-profile {
    margin-top: 20px;
}

#btn-logout {
    margin-top: 10px;
    opacity: 0.8;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.radio-label:has(input:checked) {
    background: rgba(255, 77, 0, 0.05);
    border-color: var(--accent-color);
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-label input:checked+.radio-custom {
    border-color: var(--accent-color);
}

.radio-label input:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-actions button {
    flex: 1;
}

#btn-save-section {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 0, 0.3);
    flex: none;
    width: auto;
    padding: 6px 16px;
    min-width: 75px;
    font-size: 11px;
}

/* Curator Documents Table Utility */
.doc-users-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.doc-users-table {
    width: 100%;
    min-width: 320px; /* Base for mobile */
    border-collapse: collapse;
}

.doc-users-table th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-users-table td {
    padding: 12px 8px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.doc-users-table td:first-child {
    font-weight: 700;
}

/* Specific Column Control */
.doc-users-table th:nth-child(2),
.doc-users-table td:nth-child(2) {
    width: 80px;
    text-align: center;
}

.doc-users-table th:last-child,
.doc-users-table td:last-child {
    width: 60px;
    text-align: right;
}

/* Progress Bar in Table */
.doc-progress-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.doc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-color));
    transition: width 0.3s ease;
}

/* Hide Scrollbar for Table Container */
.doc-users-table-container::-webkit-scrollbar {
    display: none;
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-title {
    font-family: 'Picnic-Expanded', sans-serif;
    font-size: 24px;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.modal-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}

#rejection-reason {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 120px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 10px;
}

.modal-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Picnic-Text', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
}

.modal-tab.active {
    color: var(--accent-color);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Chat Styling */
.support-container, .curator-chat-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 300px;
}

.chat-messages {
    overflow-y: auto;
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

#curator-chat-messages {
    max-height: 400px;
}

.unread-badge-mini {
    background: #e33;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 5px;
}

.back-button {
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    margin-right: 15px;
}

button, .btn-primary, .btn-secondary, .mini-btn, #registration-page button, .modal-tab, .market-back-btn, .btn-back {
    font-family: 'Picnic-Text', sans-serif !important;
}

/* Chat & Support Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 60vh;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-break: break-all;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble.curator {
    align-self: flex-start;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    border-bottom-left-radius: 4px;
}

.chat-meta {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    display: block;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--input-border);
    display: flex;
    gap: 12px;
    align-items: flex-end; /* Align button to bottom of textarea */
}

.chat-input-area textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    resize: none;
    font-size: 14px;
    padding: 5px;
}

.btn-send {
    background: var(--accent-color);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    min-width: 44px; /* Ensure it stays circular */
    flex: none; /* Prevent stretching */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover { transform: scale(1.1); }

/* Documents Styles */
.file-upload-zone {
    border: 2px dashed var(--input-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.file-upload-zone:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 77, 0, 0.05);
}

.upload-icon { font-size: 40px; margin-bottom: 10px; }
.upload-hint { font-size: 12px; opacity: 0.5; margin-top: 8px; display: block; }

/* Profile & Curator Dashboard */
.profile-card-form {
    background: var(--input-bg);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
}

.curator-dashboard {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.curator-user-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.curator-user-card:hover { border-color: var(--accent-orange); }

.user-info-main { display: flex; flex-direction: column; gap: 4px; }
.user-brand { font-family: 'Picnic-Text', sans-serif; font-size: 18px; font-weight: 700; }
.user-meta { font-size: 12px; opacity: 0.6; }

.status-pill {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.status-badge.pending { background: rgba(255, 184, 0, 0.1); color: #ffb800; border: 1px solid rgba(255, 184, 0, 0.2); }
.status-badge.approved { background: rgba(0, 184, 100, 0.1); color: #00ff88; border: 1px solid rgba(0, 184, 100, 0.2); }
.status-badge.rejected { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(147, 51, 234, 0.3); }

/* User Filter Bar */
.user-filter-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 14px;
    gap: 4px;
    margin-bottom: 5px;
    border: 1px solid var(--input-border);
}

.filter-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 77, 0, 0.2);
}

.filter-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.unread-badge {
    background: #e33;
    color: white;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Market Path Bar & Navigation */
.market-path-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.market-back-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.market-back-btn:hover {
    background: #4a2a2a;
}

.market-path-label {
    font-family: 'Picnic-Text', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Detail Modal Adjustments */
.detail-content {
    max-height: 85vh;
    overflow-y: auto;
}

.detail-body {
    font-family: 'Picnic-Text', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 20px 0;
    white-space: pre-wrap;
}

.detail-files-section {
    border-top: 1px solid var(--input-border);
    padding-top: 20px;
    margin-top: 20px;
}

.detail-files-title {
    font-family: 'Picnic-Expanded', sans-serif;
    font-size: 16px;
    color: var(--accent-orange);
    margin-bottom: 15px;
}

.detail-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-row {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.file-row:hover {
    transform: translateX(5px);
    border-color: var(--accent-orange);
}

.file-name {
    font-size: 14px;
    word-break: break-all;
}

.file-icon {
    font-size: 20px;
}

.market-card img.card-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-actions button {
    flex: 1;
}

#btn-save-section {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 0, 0.3);
    flex: none;
    width: auto;
    padding: 6px 16px;
    min-width: 75px;
    font-size: 11px;
}