/* Klasik Sanatlar — shared base + components (site, admin, portal) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-16); line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .5em; color: inherit; text-wrap: balance; }
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); } h4 { font-size: var(--fs-20); }
p { margin: 0 0 1em; text-wrap: pretty; }
::selection { background: var(--bordo-700); color: var(--krem-100); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--primary); color: var(--primary-contrast); padding: 10px 16px; border-radius: var(--r-2); transition: top var(--dur-2); }
.skip-link:focus { top: 12px; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 1em; height: 1em; } .icon--lg { width: 1.5em; height: 1.5em; }

/* eyebrow + ornament */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 var(--fs-12)/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.star-divider { display: flex; align-items: center; gap: 14px; color: var(--accent); margin: var(--s-6) 0; }
.star-divider::before, .star-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor 40%, currentColor 60%, transparent); opacity: .7; }
.gold-text { background: var(--grad-altin); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gold-sheen 6s var(--ease-inout) infinite alternate; }
@keyframes gold-sheen { to { background-position: 100% 0; } }
.paper-grain { position: relative; isolation: isolate; }
.paper-grain::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: .35; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* buttons */
.btn { --_bg: var(--primary); --_fg: var(--primary-contrast); --_bd: transparent; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: var(--r-2); border: 1px solid var(--_bd); background: var(--_bg); color: var(--_fg); font-weight: 600; font-size: var(--fs-14); letter-spacing: .02em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--dur-2) var(--ease-out), color var(--dur-2), border-color var(--dur-2), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2); -webkit-tap-highlight-color: transparent; }
.btn:hover { --_bg: var(--primary-hover); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn--gold { --_bg: transparent; --_fg: var(--accent-text); --_bd: var(--accent); }
.btn--gold:hover { --_bg: var(--altin-100); }
.btn--shine { --_bg: var(--grad-altin); --_fg: var(--bordo-950); background: var(--grad-altin); background-size: 200% 100%; border: 0; }
.btn--shine:hover { background-position: 100% 0; box-shadow: var(--sh-gold); }
.btn--ghost { --_bg: transparent; --_fg: var(--text); --_bd: var(--border-2); }
.btn--ghost:hover { --_bg: var(--surface-2); box-shadow: none; }
.btn--light { --_bg: var(--krem-100); --_fg: var(--bordo-800); }
.btn--light:hover { --_bg: #fff; }
.btn--outline-light { --_bg: transparent; --_fg: var(--krem-100); --_bd: rgba(248, 241, 225, .45); }
.btn--outline-light:hover { --_bg: rgba(248, 241, 225, .1); }
.btn--danger { --_bg: var(--danger); --_fg: #fff; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-12); border-radius: var(--r-1); }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: var(--fs-16); }
.btn--icon { width: 44px; min-height: 44px; padding: 0; }
.btn--block { width: 100%; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--_fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.field .hint { font-size: var(--fs-12); color: var(--text-3); }
.field .error { font-size: var(--fs-12); color: var(--danger); display: none; }
.field.is-invalid .error { display: block; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--danger); }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-2); border: 1px solid var(--border-input, var(--border-2)); background: var(--surface); color: var(--text); transition: border-color var(--dur-2), box-shadow var(--dur-2); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a6420' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; font-size: var(--fs-14); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-14); }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--border-input, var(--border-2)); position: relative; cursor: pointer; transition: background var(--dur-2); margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--dur-2) var(--ease-out); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }

/* cards, badges, chips */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--sh-1); }
.card--pad { padding: var(--s-5); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge--online { background: var(--turkuaz-100); color: var(--turkuaz); border-color: transparent; }
.badge--yuzyuze { background: var(--bordo-100); color: var(--bordo-700); border-color: transparent; }
[data-theme="dark"] .badge--yuzyuze { color: var(--bordo-300); }
.badge--ucretsiz { background: var(--altin-100); color: var(--altin-700); border-color: transparent; }
[data-theme="dark"] .badge--ucretsiz { color: var(--altin-300); }
.badge--info { background: var(--lacivert-100); color: var(--lacivert); border-color: transparent; }
.badge--success { background: var(--success-100); color: var(--success); border-color: transparent; }
.badge--warning { background: var(--warning-100); color: var(--warning); border-color: transparent; }
.badge--danger { background: var(--danger-100); color: var(--danger); border-color: transparent; }
.badge--canli { background: var(--turkuaz); color: #fff; border-color: transparent; }
.badge--canli::before, .live-dot { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.6s infinite; }
.live-dot { display: inline-block; background: var(--turkuaz-400); color: var(--turkuaz-400); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 179, 174, .6); } 70% { box-shadow: 0 0 0 8px rgba(63, 179, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 179, 174, 0); } }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-size: var(--fs-14); font-weight: 500; cursor: pointer; transition: all var(--dur-2) var(--ease-out); white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.chip .count { font-size: 11px; opacity: .75; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--grad-bordo); color: var(--krem-100); display: inline-grid; place-items: center; font: 600 14px var(--font-body); flex: none; overflow: hidden; }
.avatar--lg { width: 72px; height: 72px; font-size: 22px; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--primary); font-size: var(--fs-24); line-height: 1; }
.price small { font-family: var(--font-body); font-size: var(--fs-12); font-weight: 500; color: var(--text-3); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 12px 16px; background: none; border: 0; cursor: pointer; font-weight: 600; font-size: var(--fs-14); color: var(--text-2); white-space: nowrap; min-height: 44px; }
.tab[aria-selected="true"] { color: var(--primary); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; }

/* table (admin) */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-3); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1); }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* modal & drawer */
.overlay { position: fixed; inset: 0; background: rgba(31, 8, 6, .55); backdrop-filter: blur(6px); z-index: var(--z-modal); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.overlay.is-open { opacity: 1; }
.modal { position: fixed; z-index: calc(var(--z-modal) + 1); left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; transform: translate(-50%, -46%) scale(.96); opacity: 0; background: var(--surface); color: var(--text); border-radius: var(--r-4); box-shadow: var(--sh-3); border: 1px solid var(--border); transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-3) var(--ease-out); }
.modal.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal--wide { width: min(880px, calc(100vw - 32px)); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal__head h2 { font-size: var(--fs-24); margin: 0; }
.modal__body { padding: 24px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.drawer { position: fixed; z-index: var(--z-drawer); top: 0; right: 0; height: 100dvh; width: min(460px, 100vw); background: var(--surface); color: var(--text); box-shadow: var(--sh-3); transform: translateX(100%); transition: transform var(--dur-3) var(--ease-out); display: flex; flex-direction: column; }
.drawer.is-open { transform: none; }

/* toast */
.toasts { position: fixed; z-index: var(--z-toast); right: 16px; bottom: 16px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-3); background: var(--bordo-900); color: var(--krem-100); box-shadow: var(--sh-3); border: 1px solid rgba(212, 170, 90, .35); animation: toast-in var(--dur-3) var(--ease-out); font-size: var(--fs-14); }
.toast .icon { color: var(--altin-400); margin-top: 2px; }
.toast strong { display: block; font-weight: 600; }
.toast.is-leaving { animation: toast-out 220ms var(--ease-in) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* misc */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-2); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: var(--s-8) var(--s-5); color: var(--text-2); }
.empty .icon { width: 44px; height: 44px; color: var(--accent); margin: 0 auto 12px; }
.divider { height: 1px; background: var(--border); margin: var(--s-5) 0; border: 0; }
.stack { display: grid; gap: var(--s-4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.row--between { justify-content: space-between; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-14); }
.xsmall { font-size: var(--fs-12); }
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.demo-note { font-size: 11px; color: var(--text-3); font-style: italic; }

/* Cormorant defaults to old-style figures (1 looks like I) — force lining numerals everywhere */
h1, h2, h3, h4, .price, [class*="stat"], [data-count] { font-variant-numeric: lining-nums proportional-nums; font-feature-settings: "lnum" 1; }
.table, .num, time { font-variant-numeric: lining-nums tabular-nums; }
[hidden] { display: none !important; }

/* ---------- skeleton loaders (site router, portal + admin lazy routes) ---------- */
.sk { display: block; border-radius: 8px; background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 70%); background-size: 220% 100%; animation: sk-shimmer 1.3s ease-in-out infinite; }
.sk--dark { background: linear-gradient(100deg, rgb(var(--cream-rgb) / .08) 30%, rgb(var(--cream-rgb) / .16) 50%, rgb(var(--cream-rgb) / .08) 70%); background-size: 220% 100%; }
@keyframes sk-shimmer { to { background-position: -120% 0; } }
.sk-site { min-height: 100vh; }
.sk-hero { background: var(--grad-bordo-deep); padding: clamp(96px, 12vw, 160px) 0 clamp(48px, 6vw, 80px); }
.sk-hero .container { display: grid; gap: 16px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; padding-block: 48px; }
.sk-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--border); }
.sk-media { aspect-ratio: 4 / 3; border-radius: var(--r-2); }
.sk-app { display: grid; gap: 14px; padding: 8px 0; }
.sk-title { margin-bottom: 4px; }
.sk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 12px; }
.sk-kpi { display: grid; gap: 10px; padding: 18px; border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--border); }
.sk-rows { display: grid; gap: 10px; margin-top: 8px; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--border); }
.sk-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* image placeholder + fade-in (JS adds .ks-fade until the image has decoded) */
img.ks-fade { opacity: 0; transition: opacity .5s var(--ease-out); background-color: var(--krem-100); }
img.ks-fade.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { img.ks-fade { transition: none; } }

/* focus: programmatic focus targets (route change → h1) don't need a ring */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
h1[tabindex="-1"]:focus { outline: none; }
