/**
 * BOOPAS - Component Styles
 * Premium UI Components for Modern SaaS
 */

/* Flash message toast (success/error) */
.app-toast {
    position: fixed;
    top: 5rem;
    right: 1.1rem;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    max-width: 22rem;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: #12141b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    animation: appToastIn 220ms ease, appToastOut 220ms ease 4.2s forwards;
}

@keyframes appToastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes appToastOut {
    to { opacity: 0; transform: translateY(-10px); visibility: hidden; }
}

.app-toast__icon {
    margin-top: 0.15rem;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.app-toast--success .app-toast__icon { color: #34d399; }
.app-toast--error .app-toast__icon { color: #ff6767; }

.app-toast__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.app-toast__body strong {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.app-toast--success .app-toast__body strong { color: #34d399; }
.app-toast--error .app-toast__body strong { color: #ff6767; }

.app-toast__body span {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #c7c7d6;
}

.app-toast__close {
    margin-left: auto;
    background: none;
    border: 0;
    color: #74738b;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 0.4rem;
    flex-shrink: 0;
}

.app-toast__close:hover {
    color: #f4f4f8;
}

@media (max-width: 640px) {
    .app-toast {
        left: 1rem;
        right: 1rem;
        top: 4.5rem;
        max-width: none;
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-xl);
    gap: var(--spacing-xl);
}

@media (prefers-color-scheme: dark) {
    .navbar {
        background: linear-gradient(to bottom, rgba(15, 17, 23, 0.95), rgba(15, 17, 23, 0.85));
    }
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--text-xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    margin-left: auto;
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
}

.navbar-menu a {
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
    color: var(--color-text-secondary);
}

.navbar-menu a:hover {
    color: var(--color-primary);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    width: 256px;
    height: calc(100vh - 64px);
    background: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border);
    padding: var(--spacing-xl) var(--spacing-lg);
    overflow-y: auto;
    z-index: 900;
}

.sidebar-section {
    margin-bottom: var(--spacing-2xl);
}

.sidebar-title {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-md);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.sidebar-item:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(209, 32, 32, 0.1), rgba(244, 97, 12, 0.1));
    color: var(--color-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    padding-left: calc(var(--spacing-lg) - 3px);
}

.sidebar-item i {
    font-size: var(--text-lg);
    width: 24px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: 256px;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    padding: var(--spacing-2xl);
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: var(--spacing-xl);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
}

.page-header-content h1 {
    margin-bottom: var(--spacing-sm);
    font-size: var(--text-4xl);
}

.page-header-content p {
    color: var(--color-text-secondary);
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
    }
    
    .page-header-actions {
        justify-content: flex-start;
    }
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--color-bg-secondary);
    padding: var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

tbody tr:hover {
    background: var(--color-bg-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.form-label .required {
    color: var(--color-error);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--spacing-xs);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: var(--spacing-xs);
}

/* Modal / Dialog */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-fast) ease-out;
}

.modal-content {
    background: var(--color-bg-primary);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-base) ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    gap: var(--spacing-lg);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--text-xl);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-primary);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: inherit;
    transition: color var(--transition-fast);
}

.dropdown-toggle:hover {
    color: var(--color-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    margin-top: var(--spacing-sm);
    animation: slideDown var(--transition-fast) ease-out;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--color-bg-secondary);
}

.dropdown-item.danger {
    color: var(--color-error);
}

/* Avatar */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--text-sm); }
.avatar-md { width: 40px; height: 40px; font-size: var(--text-base); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-lg); }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status Indicator */
.status {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    background: rgba(209, 32, 32, 0.1);
    color: var(--color-primary);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

.status.active { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.status.inactive { background: rgba(107, 114, 128, 0.1); color: var(--color-text-secondary); }
.status.pending { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.status.error { background: rgba(239, 68, 68, 0.1); color: var(--color-error); }

/* Hero Section */
.hero {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(249, 250, 251, 0.8));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(209, 32, 32, 0.1), transparent);
    border-radius: 50%;
    filter: blur(40px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 97, 12, 0.1), transparent);
    border-radius: 50%;
    filter: blur(40px);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 700;
    max-width: 900px;
    margin-bottom: var(--spacing-xl);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) var(--spacing-lg);
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    padding: var(--spacing-2xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: var(--spacing-lg);
}

.feature-card h3 {
    margin-bottom: var(--spacing-md);
}

.feature-card p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PWA Install Banner
   ============================================ */
.pwa-install-banner {
    position: fixed;
    left: 50%;
    bottom: -160px;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 480px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    transition: bottom 0.35s ease;
}

.pwa-install-banner--visible {
    bottom: 1rem;
}

.pwa-install-banner__icon {
    font-size: 1.5rem;
    color: #d12020;
    flex-shrink: 0;
}

.pwa-install-banner__text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
}

.pwa-install-banner__text strong {
    display: block;
    margin-bottom: 0.15rem;
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-banner__install {
    background: #d12020;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.pwa-install-banner__dismiss {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

.pwa-install-banner__dismiss:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .pwa-install-banner {
        flex-wrap: wrap;
        width: calc(100% - 1.5rem);
    }
}

/* ============================================
   Permission Prompt Banner (notifications + geolocation)
   ============================================ */
.perm-prompt-banner {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 480px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9998;
    transition: top 0.35s ease;
}

.perm-prompt-banner--visible {
    top: 1rem;
}

.perm-prompt-banner__icon {
    font-size: 1.35rem;
    color: #d12020;
    flex-shrink: 0;
}

.perm-prompt-banner__text {
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.35;
}

.perm-prompt-banner__text strong {
    display: block;
    margin-bottom: 0.1rem;
}

.perm-prompt-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.perm-prompt-banner__enable {
    background: #d12020;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.perm-prompt-banner__dismiss {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

.perm-prompt-banner__dismiss:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .perm-prompt-banner {
        flex-wrap: wrap;
        width: calc(100% - 1.5rem);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -256px;
        transition: left var(--transition-base);
        height: calc(100vh - 64px);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

.hidden-mobile {
    display: none;
}

@media (min-width: 769px) {
    .hidden-mobile {
        display: block;
    }
    
    .hidden-desktop {
        display: none !important;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-muted { color: var(--color-text-secondary); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.no-wrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* ============================================
   Auth Pages (Login / Register / Forgot Password)
   ============================================ */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 100vw;
    overflow-x: hidden;
}

@media (min-width: 900px) {
    .auth-layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    }
}

.auth-panel-brand {
    display: none;
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-4xl) var(--spacing-3xl);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
}

@media (min-width: 900px) {
    .auth-panel-brand {
        display: flex;
    }
}

.auth-panel-brand::before,
.auth-panel-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.auth-panel-brand::before {
    top: -30%;
    right: -20%;
    width: 480px;
    height: 480px;
}

.auth-panel-brand::after {
    bottom: -25%;
    left: -15%;
    width: 380px;
    height: 380px;
    background: rgba(255, 255, 255, 0.06);
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-4xl);
    position: relative;
    z-index: 1;
}

.auth-panel-brand h1 {
    font-size: var(--text-4xl);
    line-height: var(--line-height-tight);
    max-width: 440px;
    margin-bottom: var(--spacing-lg);
    color: #fff;
    position: relative;
    z-index: 1;
}

.auth-panel-brand > p {
    font-size: var(--text-lg);
    opacity: 0.92;
    max-width: 420px;
    margin-bottom: var(--spacing-3xl);
    position: relative;
    z-index: 1;
}

.auth-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--text-base);
    font-weight: 500;
}

.auth-feature-list i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.auth-panel-form {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--color-bg-primary);
    min-width: 0;
}

@media (min-width: 900px) {
    .auth-panel-form {
        align-items: center;
    }
}

.auth-form-card {
    width: 100%;
    max-width: 420px;
    min-width: 0;
}

.auth-form-card input,
.auth-form-card button {
    min-width: 0;
}

.auth-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 900px) {
    .auth-mobile-logo {
        display: none;
    }
}

.auth-form-header {
    margin-bottom: var(--spacing-2xl);
}

.auth-form-header h2 {
    margin-bottom: var(--spacing-sm);
}

.auth-form-header p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin: 0;
}

.auth-footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    font-size: var(--text-sm);
}

.auth-footer-links p {
    text-align: center;
    margin: 0;
    color: var(--color-text-secondary);
}

.auth-footer-links a {
    font-weight: 600;
    color: var(--color-primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-2xl) 0;
}

.auth-divider span {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider strong {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-tertiary);
}

.auth-social-row {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.btn-social:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary);
}

.btn-social i {
    font-size: 1.05rem;
}

.btn-social--google i {
    color: #ea4335;
}

.btn-social--facebook i {
    color: #1877f2;
}

/* Input with icon + optional password toggle */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
    pointer-events: none;
}

.input-icon-wrap .input-field {
    padding-left: 44px;
}

.input-icon-wrap .password-toggle {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--spacing-sm);
}

.input-icon-wrap .password-toggle:hover {
    color: var(--color-text-primary);
}

.input-icon-wrap .input-field[type="password"],
.input-icon-wrap .input-field[type="text"].has-toggle {
    padding-right: 44px;
}

/* ============================================
   Dark Aurora Shell - shared animated dark background used by the
   homepage and the auth pages (login/register/forgot-password)
   ============================================ */
:root {
    --hp-bg: #06070c;
    --hp-bg-soft: #0b0d16;
    --hp-surface: rgba(255, 255, 255, 0.045);
    --hp-surface-strong: rgba(255, 255, 255, 0.07);
    --hp-line: rgba(255, 255, 255, 0.09);
    --hp-ink: #f4f4f8;
    --hp-muted: #a2a1b5;
    --hp-muted-2: #74738b;
    --hp-red: #ef3b3b;
    --hp-orange: #f4610c;
    --hp-violet: #7c5cff;
    --hp-cyan: #22d3ee;
}

body:has(.hp-shell) {
    background: var(--hp-bg, #06070c) !important;
}

.hp-shell {
    position: relative;
    background: var(--hp-bg);
    color: var(--hp-ink);
    overflow-x: clip;
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    isolation: isolate;
}

.hp-shell h1, .hp-shell h2, .hp-shell h3, .hp-shell h4 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: -0.03em;
}

/* Make the fixed glass navbar read correctly over the dark canvas */
body:has(.hp-shell) nav {
    background: rgba(6, 7, 12, 0.6) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
}

body:has(.hp-shell) nav a:not(.btn-primary):not(.btn-secondary),
body:has(.hp-shell) nav span,
body:has(.hp-shell) nav summary,
body:has(.hp-shell) nav i,
body:has(.hp-shell) nav button i {
    color: #e7e6f2 !important;
}

body:has(.hp-shell) nav a:hover {
    color: #ff8a4c !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body:has(.hp-shell) nav summary:hover,
body:has(.hp-shell) nav #darkModeToggle:hover,
body:has(.hp-shell) nav #mobileMenuBtn:hover,
body:has(.hp-shell) nav a[aria-label="Panier"]:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body:has(.hp-shell) nav .bg-red-50 {
    background: rgba(255, 255, 255, 0.1) !important;
}

body:has(.hp-shell) nav .hp-logo-light {
    display: none !important;
}

body:has(.hp-shell) nav .hp-logo-dark {
    display: block !important;
}

/* Dropdown panels (user menu, "More") */
body:has(.hp-shell) nav .absolute {
    background: #14151f !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5) !important;
}

body:has(.hp-shell) nav .absolute a {
    color: #d8d7e6 !important;
}

body:has(.hp-shell) nav .absolute a:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ff8a4c !important;
}

body:has(.hp-shell) nav .absolute a[href*="logout"] {
    color: #ff5c5c !important;
}

body:has(.hp-shell) nav .absolute a[href*="logout"]:hover {
    background: rgba(239, 59, 59, 0.12) !important;
    color: #ff5c5c !important;
}

body:has(.hp-shell) nav .absolute hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Aurora animated background - fixed to the viewport so it stays
   visible and moving across the entire page while scrolling */
.hp-aurora {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hp-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    mix-blend-mode: screen;
    will-change: transform;
}

.hp-blob-1 {
    top: -14%;
    left: -8%;
    width: 34rem;
    height: 34rem;
    background: radial-gradient(circle, var(--hp-red), transparent 70%);
    animation: hpFloat1 22s ease-in-out infinite;
}

.hp-blob-2 {
    top: -8%;
    right: -8%;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, var(--hp-violet), transparent 70%);
    animation: hpFloat2 26s ease-in-out infinite;
}

.hp-blob-3 {
    top: 34%;
    left: 22%;
    width: 26rem;
    height: 26rem;
    background: radial-gradient(circle, var(--hp-orange), transparent 70%);
    opacity: 0.32;
    animation: hpFloat3 19s ease-in-out infinite;
}

.hp-blob-4 {
    top: 58%;
    right: 6%;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, var(--hp-cyan), transparent 70%);
    opacity: 0.26;
    animation: hpFloat1 30s ease-in-out infinite reverse;
}

.hp-blob-5 {
    top: 80%;
    left: 6%;
    width: 26rem;
    height: 26rem;
    background: radial-gradient(circle, var(--hp-red), transparent 70%);
    opacity: 0.28;
    animation: hpFloat2 24s ease-in-out infinite reverse;
}

.hp-blob-6 {
    top: 98%;
    right: 22%;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, var(--hp-violet), transparent 70%);
    opacity: 0.24;
    animation: hpFloat3 21s ease-in-out infinite reverse;
}

@keyframes hpFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(4rem, 3rem) scale(1.08); }
    66% { transform: translate(-2rem, 5rem) scale(0.95); }
}

@keyframes hpFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-5rem, 4rem) scale(1.12); }
}

@keyframes hpFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2.5rem, -3rem) scale(1.15); }
}

.hp-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.hp-spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--hp-mx, 50%) var(--hp-my, 30%), rgba(255, 255, 255, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 400ms ease;
}

.hp-hero:hover .hp-spotlight,
.hp-spotlight-zone:hover .hp-spotlight {
    opacity: 1;
}

/* Auth pages on the dark aurora shell */
.hp-shell .auth-layout {
    background: transparent;
    position: relative;
    z-index: 2;
}

/* Re-point the shared design-system text/border tokens to the dark
   palette while inside the aurora shell - every component that already
   reads these variables (labels, hints, dividers, links...) themes
   itself automatically, no per-component overrides needed. */
.hp-shell {
    --color-text-primary: var(--hp-ink);
    --color-text-secondary: var(--hp-muted);
    --color-text-tertiary: var(--hp-muted-2);
    --color-border: var(--hp-line);
}

.hp-shell .auth-panel-form {
    background: transparent;
}

.hp-shell .input-field {
    background: rgba(255, 255, 255, 0.04);
}

.hp-shell .input-field:focus {
    border-color: var(--hp-orange);
    box-shadow: 0 0 0 3px rgba(244, 97, 12, 0.15);
}

.hp-shell .input-icon-wrap .password-toggle:hover {
    color: var(--hp-ink);
}

.hp-shell .auth-divider span {
    background: var(--hp-line);
}

/* Auth pages: the brand panel already acts as a "header" on desktop,
   so the real navbar only shows on mobile/tablet where that panel is hidden. */
.auth-navbar-mobile {
    display: block;
}

.auth-main {
    padding-top: 64px;
}

@media (min-width: 900px) {
    .auth-navbar-mobile {
        display: none;
    }

    .auth-main {
        padding-top: 0;
    }
}

/* ============================================
   Dark aurora shell - shared layout/content components
   (used by the homepage and any other page on the dark shell,
   e.g. the public events listing)
   ============================================ */
.hp-container {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.hp-section {
    position: relative;
    z-index: 2;
    padding: 3.5rem 0;
}

.hp-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.hp-section-head h1,
.hp-section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.hp-section-head p {
    margin: 0.4rem 0 0;
    color: var(--hp-muted);
}

.hp-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ff8a4c;
    margin-bottom: 0.6rem;
}

/* Search field (hero search bar, events listing search bar) */
.hp-search {
    padding: 0.85rem;
    border-radius: 1.5rem;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    backdrop-filter: blur(20px);
}

.hp-search-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.hp-search-grid > * {
    flex: 1 1 200px;
    min-width: 0;
}

.hp-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.4rem;
    width: 100%;
    min-width: 0;
    padding: 0 1rem;
    border-radius: 1.05rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hp-line);
    box-sizing: border-box;
}

.hp-field i {
    color: var(--hp-muted-2);
    flex-shrink: 0;
}

.hp-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.95rem;
    color: var(--hp-ink);
    font-family: inherit;
}

.hp-field input::placeholder {
    color: var(--hp-muted-2);
}

.hp-field input[type="date"] {
    color-scheme: dark;
}

.hp-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1 1 160px;
    min-height: 3.4rem;
    padding: 0 1.3rem;
    border: 0;
    border-radius: 1.05rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--hp-orange), var(--hp-red));
    box-shadow: 0 16px 34px rgba(239, 59, 59, 0.28);
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: pointer;
}

.hp-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(239, 59, 59, 0.36);
}

.hp-ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--hp-line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--hp-ink);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
    cursor: pointer;
}

.hp-ghost-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}

.hp-ghost-link.is-active {
    background: rgba(255, 138, 76, 0.14);
    border-color: rgba(255, 138, 76, 0.4);
    color: #ff8a4c;
}

/* Events grid / cards */
.hp-events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.hp-event-card {
    display: flex;
    flex-direction: column;
    border-radius: 1.4rem;
    overflow: hidden;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    text-decoration: none;
    color: inherit;
    transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.hp-event-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 138, 76, 0.4);
    background: var(--hp-surface-strong);
}

.hp-event-media {
    position: relative;
    height: 11.5rem;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(135deg, rgba(239, 59, 59, 0.55), rgba(124, 92, 255, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 2rem;
}

.hp-event-category {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(6, 7, 12, 0.6);
    backdrop-filter: blur(8px);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hp-event-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.hp-event-kicker {
    font-size: 0.82rem;
    color: var(--hp-muted-2);
}

.hp-event-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
}

.hp-event-meta {
    display: grid;
    gap: 0.4rem;
    color: var(--hp-muted);
    font-size: 0.87rem;
    margin-top: 0.2rem;
}

.hp-event-meta i {
    color: #ff8a4c;
    margin-right: 0.45rem;
    width: 1rem;
}

.hp-event-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff8a4c;
}

.hp-event-pill {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: var(--hp-muted);
}

.hp-empty {
    grid-column: 1 / -1;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 1.4rem;
    background: var(--hp-surface);
    border: 1px dashed var(--hp-line);
    color: var(--hp-muted);
}

/* Scroll-reveal utility */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition: opacity 700ms ease, transform 750ms ease;
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (max-width: 1100px) {
    .hp-events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .hp-events-grid { grid-template-columns: 1fr; }
    .hp-section-head { flex-direction: column; align-items: flex-start; }
    .hp-search-grid { flex-direction: column; align-items: stretch; }
    .hp-search-grid > * { width: 100%; flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   Dark aurora shell - generic interior page kit
   (cart, checkout, my-tickets, event detail, ticket detail)
   ============================================ */
.hp-page-hero {
    position: relative;
    padding: 8rem 0 1rem;
}

.hp-page-hero h1 {
    margin: 0.6rem 0 0;
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 800;
    color: var(--hp-ink);
}

.hp-page-hero p {
    margin: 0.7rem 0 0;
    max-width: 38rem;
    color: var(--hp-muted);
    font-size: 1rem;
    line-height: 1.7;
}

@media (max-width: 760px) {
    .hp-page-hero { padding: 7rem 0 0.5rem; }
}

.hp-panel {
    position: relative;
    z-index: 2;
    border-radius: 1.6rem;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    padding: 2rem;
}

.hp-panel-strong {
    background: var(--hp-surface-strong);
}

/* Confirmation modal (hp-shell dark theme) */
.hp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1.2rem;
}

.hp-modal {
    max-width: 26rem;
    width: 100%;
    padding: 1.8rem;
}

.hp-modal h3 {
    margin: 0 0 1.2rem;
    font-size: 1.2rem;
    color: var(--hp-ink);
}

.hp-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--hp-line);
    color: var(--hp-muted);
    font-size: 0.9rem;
}

.hp-modal-row:last-of-type {
    border-bottom: none;
}

.hp-modal-row strong {
    color: var(--hp-ink);
    text-align: right;
}

.hp-modal-note {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    color: var(--hp-muted-2);
}

.hp-modal-actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.hp-modal-actions .hp-btn {
    flex: 1;
}

/* Space builder (drag-and-drop venue layout editor) */
.space-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    color: inherit;
}

.space-tool-btn:hover {
    background: rgba(209, 32, 32, 0.08);
    border-color: rgba(209, 32, 32, 0.35);
}

.space-canvas {
    position: relative;
    background-image: linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
}

.space-el {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    border-radius: 0.4rem;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    padding: 2px;
    overflow: hidden;
    line-height: 1.1;
}

.space-el:active {
    cursor: grabbing;
}

.space-el--seat {
    border-radius: 50%;
}

.space-el--table_round {
    border-radius: 50%;
}

.space-el--wall {
    border-radius: 0.15rem;
}

.space-el--label {
    color: var(--hp-ink, #1f2937);
    background: transparent !important;
    box-shadow: none;
    font-weight: 600;
}

.space-el.is-selected {
    outline: 2px solid #d12020;
    outline-offset: 2px;
    z-index: 5;
}

.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--hp-muted);
}

.seat-legend-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
    background: #3b82f6;
}

.seat-legend-dot--selected {
    background: transparent;
    border: 2px solid #d12020;
}

.seat-legend-dot--unconfigured {
    background: repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.5) 2px, transparent 2px, transparent 4px);
    border: 1px dashed rgba(148, 163, 184, 0.6);
}

.space-el--pickable {
    cursor: pointer;
    transition: transform 0.1s ease;
}

.space-el--pickable:hover {
    transform: scale(1.08);
}

.space-el--taken {
    cursor: not-allowed;
    opacity: 0.55;
}

.space-el--unconfigured {
    cursor: default;
    opacity: 0.4;
    border: 1px dashed rgba(148, 163, 184, 0.6) !important;
    background-image: repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.25), rgba(148, 163, 184, 0.25) 4px, transparent 4px, transparent 8px);
    color: var(--hp-muted-2);
}

.space-el--selected {
    outline: 3px solid #d12020;
    outline-offset: 2px;
}

.space-band-select {
    position: absolute;
    border: 1px dashed #d12020;
    background: rgba(209, 32, 32, 0.12);
    pointer-events: none;
    z-index: 20;
}

.space-el-resize {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 12px;
    height: 12px;
    background: #d12020;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: se-resize;
}

.hp-panel + .hp-panel {
    margin-top: 1.4rem;
}

.hp-divider {
    height: 1px;
    background: var(--hp-line);
    border: 0;
    margin: 1.4rem 0;
}

/* Buttons */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0 1.4rem;
    border-radius: 999px;
    border: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.hp-btn:hover {
    transform: translateY(-2px);
}

.hp-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--hp-orange), var(--hp-red));
    box-shadow: 0 16px 34px rgba(239, 59, 59, 0.28);
}

.hp-btn-primary:hover {
    box-shadow: 0 20px 40px rgba(239, 59, 59, 0.36);
}

.hp-btn-secondary {
    color: var(--hp-ink);
    background: var(--hp-surface-strong);
    border: 1px solid var(--hp-line);
}

.hp-btn-outline {
    color: var(--hp-ink);
    background: transparent;
    border: 1px solid var(--hp-line);
}

.hp-btn-ghost-danger {
    color: #ff8a8a;
    background: rgba(239, 59, 59, 0.1);
    border: 1px solid rgba(239, 59, 59, 0.28);
}

.hp-btn-block {
    width: 100%;
}

.hp-btn-sm {
    min-height: 2.4rem;
    padding: 0 1rem;
    font-size: 0.8rem;
}

.hp-btn-icon {
    min-height: 2.9rem;
    width: 2.9rem;
    padding: 0;
    flex-shrink: 0;
}

/* Quantity stepper (event ticket picker) */
.hp-qty-stepper {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--hp-line);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    flex-shrink: 0;
}

.hp-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.9rem;
    border: 0;
    background: transparent;
    color: var(--hp-ink);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.hp-qty-btn:hover {
    background: rgba(255, 255, 255, 0.07);
}

.hp-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hp-qty-input {
    width: 2.6rem;
    height: 2.9rem;
    border: 0;
    background: transparent !important;
    color: var(--hp-ink) !important;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    color-scheme: dark;
}

.hp-qty-input::-webkit-outer-spin-button,
.hp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Form controls (standalone, outside the hero search bar) */
.hp-input,
.hp-select,
.hp-textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hp-line);
    color: var(--hp-ink);
    font-size: 0.92rem;
    font-family: inherit;
    box-sizing: border-box;
}

.hp-textarea {
    min-height: 6rem;
    padding: 0.8rem 1rem;
    resize: vertical;
}

.hp-input::placeholder {
    color: var(--hp-muted-2);
}

.hp-input:focus,
.hp-select:focus,
.hp-textarea:focus {
    outline: none;
    border-color: rgba(255, 138, 76, 0.5);
}

.hp-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--hp-muted);
}

.hp-input--error,
.hp-textarea--error {
    border-color: rgba(248, 113, 113, 0.6);
    background: rgba(248, 113, 113, 0.06);
}

.hp-input--error:focus,
.hp-textarea--error:focus {
    border-color: rgba(248, 113, 113, 0.8);
}

.hp-field-error {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff8a8a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Status pills (order/ticket status) */
.hp-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--hp-muted);
}

.hp-status--good { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.hp-status--warning { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.hp-status--danger { background: rgba(239, 59, 59, 0.14); color: #ff8a8a; }

/* Line-item row (cart items, checkout summary) */
.hp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-row small {
    display: block;
    color: var(--hp-muted-2);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

/* ============================================
   Modern ticket-stub component (/tickets/{id})
   ============================================ */
.hp-ticket {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    border-radius: 1.8rem;
    overflow: visible;
    background: var(--hp-surface-strong);
    border: 1px solid var(--hp-line);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hp-ticket-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.4rem;
    border-radius: 1.8rem 1.8rem 0 0;
    background: linear-gradient(90deg, var(--hp-red), var(--hp-orange), var(--hp-violet));
}

.hp-ticket-main {
    padding: 2.1rem 2rem;
}

.hp-ticket-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ff8a4c;
    margin-bottom: 0.5rem;
}

.hp-ticket-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hp-ink);
}

.hp-ticket-sub {
    margin: 0.4rem 0 0;
    color: var(--hp-muted);
    font-size: 0.92rem;
}

.hp-ticket-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.hp-ticket-meta-item {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--hp-line);
}

.hp-ticket-meta-item span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hp-muted-2);
    margin-bottom: 0.3rem;
}

.hp-ticket-meta-item strong {
    color: var(--hp-ink);
    font-size: 0.95rem;
}

.hp-ticket-stub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border-left: 2px dashed var(--hp-line);
}

.hp-ticket-stub::before,
.hp-ticket-stub::after {
    content: '';
    position: absolute;
    left: -0.9rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--hp-bg);
    border: 1px solid var(--hp-line);
}

.hp-ticket-stub::before { top: -0.9rem; }
.hp-ticket-stub::after { bottom: -0.9rem; }

.hp-ticket-qr-box {
    padding: 0.8rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.hp-ticket-qr-box img {
    display: block;
    width: 150px;
    height: 150px;
}

.hp-ticket-code {
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--hp-ink);
    word-break: break-all;
}

.hp-ticket-price {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(120deg, #fff, #c7c6de);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 820px) {
    .hp-ticket {
        grid-template-columns: 1fr;
    }

    .hp-ticket-stub {
        border-left: 0;
        border-top: 2px dashed var(--hp-line);
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hp-ticket-stub::before,
    .hp-ticket-stub::after {
        top: -0.9rem;
        left: auto;
    }

    .hp-ticket-stub::before { left: -0.9rem; }
    .hp-ticket-stub::after { right: -0.9rem; }

    .hp-ticket-meta {
        grid-template-columns: 1fr;
    }
}

/* Two-column detail layout (event detail: description + ticket picker) */
.hp-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.6rem;
    align-items: start;
}

@media (max-width: 980px) {
    .hp-detail-grid {
        grid-template-columns: 1fr;
    }
}
