/**
 * Premium UI components — v1.1
 */

/* App shell */
.kh-ls-app { background: var(--kh-bg); min-height: 100vh; }

/* Sticky header */
.kh-app-header {
	position: sticky; top: 0; z-index: 1000;
	background: rgba(15,15,15,0.85);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--kh-glass-border);
}
.kh-app-header__inner {
	max-width: 1280px; margin: 0 auto; padding: 0.875rem 1.5rem;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.kh-app-header__brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; color: #fff; }
.kh-app-header__logo {
	width: 36px; height: 36px; border-radius: 10px;
	background: var(--kh-gradient); display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 0.875rem;
}
.kh-app-header__title { font-weight: 600; font-size: 1rem; }
.kh-app-header__nav { display: flex; align-items: center; gap: 0.5rem; }
.kh-app-header__link {
	padding: 0.5rem 1rem; border-radius: 8px; color: var(--kh-text-muted);
	text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.kh-app-header__link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.kh-app-header__link--cta { background: var(--kh-gradient); color: #fff !important; }
.kh-app-header__link--ghost { border: 1px solid var(--kh-glass-border); }
.kh-app-header__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.kh-app-header__toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: 0.2s; }

/* Hero landing */
.kh-hero {
	position: relative; padding: 4rem 2rem; margin: 1rem; border-radius: var(--kh-radius); overflow: hidden; text-align: center;
}
.kh-hero__glow {
	position: absolute; inset: 0;
	background: radial-gradient(ellipse at 50% 0%, rgba(229,9,20,0.25), transparent 60%);
	pointer-events: none;
}
.kh-hero__content { position: relative; max-width: 720px; margin: 0 auto; }
.kh-hero__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; margin: 0 0 1rem;
	background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
	-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.kh-hero__subtitle { color: var(--kh-text-muted); font-size: 1.0625rem; line-height: 1.6; margin-bottom: 2rem; }
.kh-hero__search { display: flex; gap: 0.75rem; max-width: 520px; margin: 0 auto; }
.kh-input--hero { flex: 1; padding: 1rem 1.25rem; font-size: 1rem; }

/* Stats row */
.kh-stats-row {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
	padding: 0 1rem 2rem; max-width: 1280px; margin: 0 auto;
}
.kh-stat-card { padding: 1.25rem; text-align: center; transition: transform 0.2s; }
.kh-stat-card:hover { transform: translateY(-2px); }
.kh-stat-card__value { display: block; font-size: 1.75rem; font-weight: 800; color: var(--kh-gold); }
.kh-stat-card__label { font-size: 0.8125rem; color: var(--kh-text-muted); }

/* Section header */
.kh-section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.kh-section-title { font-size: 1.5rem; font-weight: 700; margin: 0; }

/* Premium model cards */
.kh-model-card--premium { transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s; }
.kh-model-card--premium:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.kh-model-card__badges { position: absolute; top: 0.75rem; left: 0.75rem; right: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem; z-index: 2; }
.kh-model-card__overlay { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,0.8)); pointer-events: none; }
.kh-model-card__excerpt { font-size: 0.8125rem; color: var(--kh-text-muted); line-height: 1.5; margin: 0.75rem 0; min-height: 2.5em; }
.kh-model-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.kh-status-dot { position: absolute; bottom: 0.75rem; left: 0.75rem; z-index: 2; padding: 0.25rem 0.625rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; background: var(--kh-success); color: #000; }
.kh-status-dot--online::before { content: '● '; }

/* Badge variants */
.kh-badge--vip { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; }
.kh-badge--new { background: rgba(0,212,170,0.2); color: var(--kh-success); border: 1px solid var(--kh-success); }
.kh-badge--popular { background: rgba(229,9,20,0.2); color: #ff6b6b; }
.kh-badge--editor { background: rgba(100,149,237,0.2); color: #6495ed; }
.kh-badge--top { background: rgba(255,215,0,0.15); color: var(--kh-gold); }
.kh-badge__icon { margin-right: 0.25rem; }

/* Profile page */
.kh-profile-cover { height: 240px; background-size: cover; background-position: center; position: relative; margin: 0 1rem; border-radius: var(--kh-radius) var(--kh-radius) 0 0; }
.kh-profile-cover__overlay { position: absolute; inset: 0; background: linear-gradient(transparent, var(--kh-bg)); }
.kh-profile-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; max-width: 1280px; margin: -4rem auto 2rem; padding: 0 1rem; position: relative; }
.kh-profile-head { display: flex; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.5rem; align-items: center; }
.kh-profile-head__avatar { width: 100px; height: 100px; border-radius: 16px; object-fit: cover; border: 3px solid rgba(255,255,255,0.1); }
.kh-profile-head__badges { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.5rem 0; }
.kh-profile-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--kh-text-muted); }
.kh-profile-section { padding: 1.5rem; margin-bottom: 1.5rem; }
.kh-profile-section h2 { margin-top: 0; font-size: 1.125rem; }
.kh-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.kh-gallery-grid__item { border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.kh-gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.kh-gallery-grid__item:hover img { transform: scale(1.05); }

/* Sticky booking box */
.kh-sticky-booking { padding: 1.5rem; position: sticky; top: 5rem; text-align: center; }
.kh-sticky-booking__thumb { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 0.75rem; }
.kh-sticky-booking__trust { list-style: none; padding: 0; margin: 1rem 0 0; text-align: left; font-size: 0.8125rem; color: var(--kh-text-muted); }
.kh-sticky-booking__trust li { padding: 0.25rem 0; }

/* FAQ */
.kh-faq-item { border-bottom: 1px solid var(--kh-glass-border); padding: 0.75rem 0; }
.kh-faq-item summary { cursor: pointer; font-weight: 600; list-style: none; }
.kh-faq-item summary::-webkit-details-marker { display: none; }
.kh-faq-item p { color: var(--kh-text-muted); margin: 0.5rem 0 0; font-size: 0.875rem; }

/* Timeline */
.kh-timeline { display: flex; align-items: flex-start; padding: 1.5rem; margin: 1.5rem 0; overflow-x: auto; gap: 0; }
.kh-timeline__step { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; min-width: 100px; flex-shrink: 0; opacity: 0.4; transition: opacity 0.3s; }
.kh-timeline__step.is-done, .kh-timeline__step.is-active { opacity: 1; }
.kh-timeline__icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; border: 2px solid transparent; transition: all 0.3s; }
.kh-timeline__step.is-done .kh-timeline__icon { background: rgba(0,212,170,0.15); border-color: var(--kh-success); }
.kh-timeline__step.is-active .kh-timeline__icon { background: rgba(229,9,20,0.15); border-color: var(--kh-primary); box-shadow: 0 0 20px rgba(229,9,20,0.3); }
.kh-timeline__label { font-size: 0.6875rem; text-align: center; color: var(--kh-text-muted); max-width: 90px; line-height: 1.3; }
.kh-timeline__line { flex: 1; height: 2px; background: rgba(255,255,255,0.1); margin-top: 22px; min-width: 20px; transition: background 0.3s; }
.kh-timeline__line.is-done { background: var(--kh-success); }

/* Detail card */
.kh-detail-card { padding: 1.5rem; margin: 1rem 0; }
.kh-detail-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--kh-glass-border); }
.kh-detail-card__no { font-family: monospace; font-size: 1.125rem; font-weight: 700; color: var(--kh-gold); }
.kh-detail-card__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.kh-detail-item__label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kh-text-muted); margin-bottom: 0.25rem; }
.kh-detail-item__value { font-weight: 500; }
.kh-detail-item--full { grid-column: 1 / -1; }

/* Bank card premium */
.kh-bank-card-premium { padding: 1.5rem; margin-bottom: 1.5rem; }
.kh-bank-card-premium__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.kh-bank-card-premium__logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; padding: 6px; }
.kh-bank-card-premium__logo-fallback { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.25rem; }

/* Success screen */
.kh-success-card { max-width: 560px; margin: 3rem auto; padding: 2.5rem; text-align: center; }
.kh-success-card__icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(0,212,170,0.15); color: var(--kh-success); font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.kh-success-steps { text-align: left; margin: 2rem 0; padding: 1rem; background: rgba(255,255,255,0.03); border-radius: 8px; }
.kh-success-step { padding: 0.5rem 0; font-size: 0.9375rem; }
.kh-success-step.is-done { color: var(--kh-success); }
.kh-success-step.is-pending { color: var(--kh-warning); }
.kh-success-details { display: grid; gap: 0.75rem; text-align: left; margin: 1.5rem 0; }
.kh-success-detail { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--kh-glass-border); font-size: 0.875rem; }
.kh-success-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 2rem; }

/* Toast */
.kh-toast-container { position: fixed; top: 5rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.kh-toast { padding: 0.875rem 1.25rem; border-radius: 10px; background: rgba(30,30,30,0.95); border: 1px solid var(--kh-glass-border); color: #fff; font-size: 0.875rem; opacity: 0; transform: translateX(100%); transition: all 0.3s cubic-bezier(0.4,0,0.2,1); pointer-events: auto; max-width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.kh-toast.is-visible { opacity: 1; transform: translateX(0); }
.kh-toast--success { border-color: var(--kh-success); }
.kh-toast--error { border-color: #ff6b6b; }

/* Modal */
.kh-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.kh-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.kh-modal__content { position: relative; width: 100%; max-width: 480px; padding: 2rem; z-index: 1; animation: kh-modal-in 0.3s ease; }
.kh-modal__actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }
@keyframes kh-modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: none; } }

/* Tickets */
.kh-tickets-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; min-height: 400px; }
.kh-ticket-item { display: block; padding: 1rem; margin-top: 0.5rem; text-decoration: none; color: inherit; transition: all 0.2s; }
.kh-ticket-item.is-active, .kh-ticket-item:hover { border-color: var(--kh-primary); }
.kh-ticket-messages { max-height: 360px; overflow-y: auto; margin: 1rem 0; }
.kh-ticket-msg { padding: 0.75rem; margin-bottom: 0.5rem; border-radius: 8px; background: rgba(255,255,255,0.03); }
.kh-ticket-msg.is-admin { background: rgba(0,212,170,0.08); border-left: 3px solid var(--kh-success); }
.kh-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* Empty state */
.kh-empty-state { padding: 3rem; text-align: center; }
.kh-empty-state__icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

/* Dash stats in user panel */
.kh-dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }

/* Admin premium extras */
.kh-admin-premium .kh-admin-header { margin-bottom: 1.5rem; }
.kh-admin-premium .kh-admin-header p { color: #a7aaad; margin: 0; }
.kh-admin-stats--6 { grid-template-columns: repeat(6, 1fr); }
.kh-admin-stat-card--purple .kh-admin-stat-value { color: #a855f7; }
.kh-admin-top-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.kh-admin-top-list li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #2c3338; font-size: 0.875rem; }
.kh-admin-badges label { display: inline-block; margin-right: 1rem; margin-bottom: 0.5rem; }

@media (max-width: 1024px) {
	.kh-stats-row { grid-template-columns: repeat(2, 1fr); }
	.kh-profile-layout { grid-template-columns: 1fr; }
	.kh-profile-sidebar { order: -1; }
	.kh-sticky-booking { position: static; }
	.kh-tickets-layout { grid-template-columns: 1fr; }
	.kh-admin-stats--6 { grid-template-columns: repeat(3, 1fr); }
	.kh-detail-card__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
	.kh-app-header__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(15,15,15,0.98); padding: 1rem; border-bottom: 1px solid var(--kh-glass-border); }
	.kh-app-header__nav.is-open { display: flex; }
	.kh-app-header__toggle { display: flex; }
	.kh-hero__search { flex-direction: column; }
	.kh-stats-row { grid-template-columns: 1fr 1fr; }
	.kh-model-card__actions { grid-template-columns: 1fr; }
	.kh-form-row { grid-template-columns: 1fr; }
	.kh-success-actions { flex-direction: column; }
	.kh-admin-stats--6 { grid-template-columns: repeat(2, 1fr); }
}
