/* Shaco Life Extended — app shell (owner: fe-core) */

/* ───────── Splash ───────── */
.splash {
    position: fixed;
    inset: 0;
    z-index: var(--z-splash);
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 380ms var(--ease), visibility 380ms;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.splash-mark {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: var(--accent-fg);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 10px 40px -8px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: splash-breathe 1.8s var(--ease-in-out) infinite;
}
.splash-mark svg { width: 34px; height: 34px; }
.splash-bar { width: 96px; height: 2px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.splash-bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--accent); animation: progress-slide 1.1s var(--ease-in-out) infinite; }
.splash-error { display: none; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--text-2); font-size: var(--fs-sm); }
.splash.has-error .splash-bar { display: none; }
.splash.has-error .splash-error { display: flex; }
.splash.has-error .splash-mark { animation: none; }
@keyframes splash-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.94); } }

#auth-root, #app-root { position: relative; z-index: var(--z-shell); }
#app-root { height: 100vh; height: 100dvh; }
#app-root:empty, #auth-root:empty { display: none; }

/* ───────── Brand ───────── */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.brand-mark {
    width: 28px; height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--accent-fg);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff), var(--accent));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 2px 10px -2px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark .i { width: 19px; height: 19px; }
.brand-word { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; line-height: 1; }
.brand-word span { color: var(--text-3); font-weight: 500; }
.brand-pill {
    display: inline-flex;
    align-items: center;
    height: 17px;
    padding: 0 5px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent-line);
    line-height: 1;
}
:root[data-accent="mono"][data-theme="dark"] .brand-mark,
:root[data-accent="mono"][data-theme="dark"] .splash-mark { background: linear-gradient(180deg, #fafafa, #d4d4d8); }

/* ───────── Shell grid ───────── */
.shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    height: 100%;
    transition: grid-template-columns var(--dur-3) var(--ease);
}
:root[data-sidebar="collapsed"] .shell { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }

/* ───────── Sidebar ───────── */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding: 12px 10px 10px 12px;
    overflow: hidden;
}
.sb-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 40px; padding: 0 2px 0 4px; margin-bottom: 10px; }
.sb-brand { border-radius: 9px; padding: 4px; margin: -4px; }
.sb-brand:focus-visible { border-radius: 9px; }
.sb-collapse { color: var(--text-3); }
.sb-collapse:hover { color: var(--text); }

.sb-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 34px;
    padding: 0 6px 0 10px;
    margin: 0 0 6px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--hover);
    color: var(--text-3);
    font-size: var(--fs-sm);
    text-align: left;
    transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.sb-search:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--active); }
.sb-search .i { width: 15px; height: 15px; }
.sb-search-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.sb-search .kbd { height: 18px; min-width: 18px; font-size: 10px; border-bottom-width: 1px; background: transparent; }

.sb-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -6px; padding: 0 6px 12px; scrollbar-width: none; }
.sb-nav::-webkit-scrollbar { display: none; }
.sb-group { margin-top: 14px; }
.sb-group:first-child { margin-top: 8px; }
.sb-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 24px;
    padding: 0 10px;
    margin-bottom: 2px;
    font-size: var(--fs-2xs);
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: .02em;
    white-space: nowrap;
    border-radius: 6px;
}
a.sb-group-label:hover { color: var(--text-2); }
a.sb-group-label .i { width: 13px; height: 13px; opacity: 0; transform: translateX(-3px); transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
a.sb-group-label:hover .i, a.sb-group-label:focus-visible .i { opacity: 1; transform: none; }
a.sb-group-label.is-active { color: var(--text); }
.sb-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--nav-h);
    padding: 0 8px 0 10px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.sb-item + .sb-item { margin-top: 1px; }
.sb-item > .i { width: 17px; height: 17px; color: var(--text-3); transition: color var(--dur-1) var(--ease); }
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-item:hover > .i { color: var(--text-2); }
.sb-item.is-active { background: var(--active); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.sb-item.is-active > .i { color: var(--accent); }
.sb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-item .count { margin-left: auto; }
.sb-item .sb-lock { width: 13px; height: 13px; color: var(--text-4); }

.sb-footer { padding-top: 8px; border-top: 1px solid var(--border); margin: 0 -2px; }
.sb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px 6px 6px;
    border-radius: 10px;
    text-align: left;
    transition: background-color var(--dur-1) var(--ease);
}
.sb-user:hover, .sb-user[aria-expanded="true"] { background: var(--hover); }
.sb-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-user-nick { font-size: var(--fs-sm); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.sb-user-status { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user > .i { width: 15px; height: 15px; color: var(--text-3); }
.sb-user .avatar { --avatar-ring: var(--bg); }
.sb-new-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Collapsed rail */
:root[data-sidebar="collapsed"] .sidebar { padding-left: 10px; padding-right: 10px; }
:root[data-sidebar="collapsed"] .sb-top { justify-content: center; padding: 0; }
:root[data-sidebar="collapsed"] .brand-word,
:root[data-sidebar="collapsed"] .brand-pill,
:root[data-sidebar="collapsed"] .sb-label,
:root[data-sidebar="collapsed"] .sb-search-label,
:root[data-sidebar="collapsed"] .sb-search .kbd-group,
:root[data-sidebar="collapsed"] .sb-user-text,
:root[data-sidebar="collapsed"] .sb-user > .i,
:root[data-sidebar="collapsed"] .sb-lock { display: none; }
:root[data-sidebar="collapsed"] .sb-collapse { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; opacity: 0; background: var(--surface-2); }
:root[data-sidebar="collapsed"] .sb-top:hover .sb-collapse,
:root[data-sidebar="collapsed"] .sb-collapse:focus-visible { opacity: 1; }
:root[data-sidebar="collapsed"] .sb-top:hover .sb-brand { opacity: 0; }
:root[data-sidebar="collapsed"] .sb-search { justify-content: center; padding: 0; width: 40px; margin-left: auto; margin-right: auto; }
:root[data-sidebar="collapsed"] .sb-group-label { height: 1px; padding: 0; margin: 10px 10px 10px; background: var(--border); font-size: 0; overflow: hidden; }
:root[data-sidebar="collapsed"] .sb-item { justify-content: center; padding: 0; width: 40px; height: 36px; margin-left: auto; margin-right: auto; }
:root[data-sidebar="collapsed"] .sb-item + .sb-item { margin-top: 2px; }
:root[data-sidebar="collapsed"] .sb-item .count { position: absolute; top: 5px; right: 6px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--bg); }
:root[data-sidebar="collapsed"] .sb-user { justify-content: center; padding: 6px 0; }
:root[data-sidebar="collapsed"] .sb-user .sb-new-dot { position: absolute; }

/* ───────── Main panel ───────── */
.main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 8px 8px 8px 0;
    border-radius: var(--r-xl);
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md), inset 0 1px 0 var(--highlight);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    overflow: hidden;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .main { background: var(--panel-solid); }
}

.page-header {
    position: relative;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
    padding: 0 14px 0 24px;
    flex-shrink: 0;
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.page-header.is-scrolled { border-bottom-color: var(--border); }
.ph-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.ph-logo { display: none; }
.ph-back { margin-left: -8px; color: var(--text-2); }
.ph-titles { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ph-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.ph-subtitle { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-subtitle:empty { display: none; }
.ph-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ph-actions:empty { display: none; }
.ph-global { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ph-actions:not(:empty) + .ph-global { padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--border); }
.ph-bell { position: relative; color: var(--text-2); }
.ph-bell .count { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; box-shadow: 0 0 0 2px var(--panel-solid); pointer-events: none; }
.ph-bell.has-unread .i { animation: bell-ring .9s var(--ease) 1; transform-origin: 50% 2px; }
.ph-avatar { display: none; border-radius: 50%; padding: 2px; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }

.page-scroll {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}
.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 6px var(--page-pad-x) 56px;
    min-height: 100%;
    animation: page-in var(--dur-3) var(--ease) both;
}
.main.is-full .page-scroll { overflow: hidden; }
.main.is-full .page { max-width: none; padding: 0; height: 100%; min-height: 0; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-loading { padding-top: 18px; }
.page-error { padding: 40px 0; }

/* Shell transitions */
#app-root.is-entering .shell { animation: shell-in 620ms var(--ease) both; }
#app-root.is-leaving .shell { animation: shell-out 700ms var(--ease-in-out) both; pointer-events: none; }
@keyframes shell-in { from { opacity: 0; transform: scale(1.012); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes shell-out { to { opacity: 0; transform: scale(.985); filter: blur(8px); } }
.shell.is-nudged .main { animation: nudge 520ms var(--ease) 1; }
@keyframes nudge { 0%, 100% { transform: none; } 15% { transform: translateX(-7px) rotate(-.4deg); } 30% { transform: translateX(6px) rotate(.3deg); } 45% { transform: translateX(-5px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* ───────── Mobile tab bar ───────── */
.tabbar { display: none; }

@media (max-width: 959px) {
    .shell, :root[data-sidebar="collapsed"] .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: none; }
    .main {
        margin: 0;
        border-radius: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .page-header {
        height: calc(var(--header-h) + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 8px 0 16px;
        background: color-mix(in srgb, var(--bg) 72%, transparent);
        -webkit-backdrop-filter: blur(18px) saturate(150%);
        backdrop-filter: blur(18px) saturate(150%);
        border-bottom-color: var(--border);
    }
    .ph-logo { display: inline-flex; margin-right: 4px; }
    .page-header.has-back .ph-logo { display: none; }
    .ph-back { margin-left: -6px; }
    .ph-title { font-size: 16px; }
    .ph-avatar { display: inline-flex; margin-left: 2px; }
    .ph-actions .btn:not(.btn-icon) > span { display: none; }
    .ph-actions .btn:not(.btn-icon) { width: var(--h-md); padding: 0; }
    .ph-actions:not(:empty) + .ph-global { border-left: 0; padding-left: 0; }
    .page { padding: 4px var(--page-pad-x) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); }
    .main.is-full .page-scroll { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

    .tabbar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: var(--z-tabbar);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
        padding: 0 6px env(safe-area-inset-bottom);
        background: color-mix(in srgb, var(--bg) 80%, transparent);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
        backdrop-filter: blur(20px) saturate(160%);
        border-top: 1px solid var(--border);
    }
    .tab-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 44px;
        color: var(--text-3);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: .01em;
        transition: color var(--dur-1) var(--ease);
        -webkit-touch-callout: none;
    }
    .tab-item .i { width: 22px; height: 22px; stroke-width: 1.7; transition: transform var(--dur-2) var(--ease); }
    .tab-item:active .i { transform: scale(.9); }
    .tab-item.is-active { color: var(--text); }
    .tab-item.is-active .i { color: var(--accent); stroke-width: 2; }
    .tab-item .count { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; box-shadow: 0 0 0 2px var(--bg); }
    .tab-item:focus-visible { box-shadow: none; }
    .tab-item:focus-visible .i { box-shadow: var(--focus-ring); border-radius: 6px; }
    #app-root .toast-root { bottom: auto; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    @media (max-width: 959px) {
        .page-header, .tabbar { background: var(--panel-solid); }
    }
}

/* ───────── Menu sheet (mobil "Menü") ───────── */
.msheet-user { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; }
.msheet-user-text { flex: 1; min-width: 0; }
.msheet-user-nick { font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--tracking-tight); display: flex; align-items: center; gap: 8px; }
.msheet-user-status { font-size: var(--fs-sm); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 6px; margin: 0 -4px; }
.msheet-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 10px 2px 8px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-2);
    text-align: center;
    line-height: 1.2;
    min-width: 0;
}
.msheet-app span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.msheet-app:active { background: var(--active); }
.msheet-app.is-active { color: var(--text); }
.msheet-list { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.msheet-list .row { min-height: 48px; padding: 8px 6px; }
.msheet-list .row > .i { width: 20px; height: 20px; color: var(--text-2); }
.msheet-list .row.is-danger, .msheet-list .row.is-danger > .i { color: var(--danger); }

/* ───────── Command palette ───────── */
.palette-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-overlay) + 5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12vh 16px 16px;
}
.palette-overlay .overlay-backdrop { background: color-mix(in srgb, var(--scrim) 80%, transparent); }
.palette {
    position: relative;
    width: min(640px, 100%);
    max-height: min(560px, 76vh);
    display: flex;
    flex-direction: column;
    background: var(--surface-overlay);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: palette-in var(--dur-3) var(--ease) both;
}
.palette-overlay.is-leaving .palette { animation: modal-out var(--dur-1) var(--ease) both; }
@keyframes palette-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.palette-head { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.palette-head > .i { width: 18px; height: 18px; color: var(--text-3); }
.palette-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    letter-spacing: -0.005em;
}
.palette-input::placeholder { color: var(--text-3); }
.palette-input:focus, .palette-input:focus-visible { box-shadow: none; outline: none; }
.palette-head .spinner { width: 14px; height: 14px; color: var(--text-3); }
.palette-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; overscroll-behavior: contain; scroll-padding: 8px; }
.palette-group-label { padding: 10px 10px 5px; font-size: var(--fs-2xs); font-weight: 500; color: var(--text-3); letter-spacing: .02em; }
.palette-group-label:first-child { padding-top: 6px; }
.palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 9px;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    scroll-margin: 6px;
}
.palette-item.is-active { background: var(--active); }
.palette-item-icon { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; color: var(--text-2); }
.palette-item-icon .i { width: 17px; height: 17px; }
.palette-item-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.palette-item-title { font-size: var(--fs-md); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; max-width: 70%; }
.palette-item-sub { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.palette-item-hint { font-size: var(--fs-2xs); color: var(--text-3); flex-shrink: 0; display: flex; gap: 3px; align-items: center; }
.palette-item.is-active .palette-item-hint .palette-enter { opacity: 1; }
.palette-enter { opacity: 0; color: var(--text-2); }
.palette-enter .i { width: 14px; height: 14px; }
.palette-item mark { background: transparent; color: var(--accent); font-weight: 600; }
.palette-empty { padding: 36px 16px; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }
.palette-empty .i { width: 22px; height: 22px; margin: 0 auto 10px; color: var(--text-4); }
.palette-foot { display: flex; align-items: center; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: var(--fs-2xs); color: var(--text-3); flex-shrink: 0; background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette-foot .kbd { height: 18px; min-width: 18px; font-size: 10px; }
.palette-foot .palette-brand { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-4); }
.palette-foot .palette-brand .i { width: 13px; height: 13px; }
@media (max-width: 640px) {
    .palette-overlay { padding: max(8px, env(safe-area-inset-top)) 8px 8px; }
    .palette { max-height: 70vh; }
    .palette-foot { display: none; }
    .palette-item { min-height: 48px; }
}

/* ───────── Notifications drawer ───────── */
.notif-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.notif-list { padding: 4px 0 12px; }
.notif-group-label {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 18px 6px;
    font-size: var(--fs-2xs);
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: .02em;
    background: linear-gradient(var(--surface-overlay) 70%, transparent);
}
.notif-item {
    position: relative;
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 11px 40px 11px 20px;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--dur-1) var(--ease), opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.notif-item:hover, .notif-item:focus-visible { background: var(--hover); box-shadow: none; }
.notif-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); border-radius: 0; }
.notif-item.is-unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 26px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.notif-item.is-removing { opacity: 0; transform: translateX(16px); }
.notif-avatar { position: relative; flex-shrink: 0; height: 36px; }
.notif-type {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    color: var(--text);
    box-shadow: 0 0 0 2px var(--surface-overlay);
    z-index: 3;
}
.notif-type .i { width: 11px; height: 11px; stroke-width: 2.4; }
.notif-type[data-tone="accent"] { background: var(--accent); color: var(--accent-fg); }
.notif-type[data-tone="info"] { background: var(--info); color: #0b0b0c; }
.notif-type[data-tone="success"] { background: var(--success); color: #0b0b0c; }
.notif-type[data-tone="warning"] { background: var(--warning); color: #0b0b0c; }
.notif-type[data-tone="danger"] { background: var(--danger); color: #0b0b0c; }
:root[data-theme="light"] .notif-type[data-tone] { color: #fff; }
.notif-sys { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.notif-sys .i { width: 17px; height: 17px; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.notif-text b { color: var(--text); font-weight: 600; }
.notif-item.is-unread .notif-text { color: var(--text); }
.notif-preview { font-size: var(--fs-xs); color: var(--text-3); margin-top: 3px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.notif-meta { font-size: var(--fs-2xs); color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.notif-del { position: absolute; right: 8px; top: 10px; opacity: 0; transition: opacity var(--dur-1) var(--ease); color: var(--text-3); }
.notif-item:hover .notif-del, .notif-del:focus-visible { opacity: 1; }
@media (hover: none) { .notif-del { opacity: .7; } }
.notif-more { display: flex; justify-content: center; padding: 8px 0 4px; }
.notif-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ───────── Coming soon / 404 ───────── */
.coming-soon, .nf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: min(560px, 70vh);
    padding: 40px 16px;
}
.coming-soon-art { position: relative; margin-bottom: 24px; }
.coming-soon-art::before {
    content: '';
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
    z-index: -1;
}
.coming-soon-spark { position: absolute; top: -8px; right: -10px; color: var(--accent); animation: pulse-soft 2.4s var(--ease-in-out) infinite; }
.coming-soon-title { font-size: var(--fs-xl); letter-spacing: var(--tracking-tight); }
.coming-soon-text { max-width: 400px; margin-top: 8px; color: var(--text-3); font-size: var(--fs-md); line-height: 1.6; }

.nf-art { position: relative; width: 120px; height: 120px; display: grid; place-items: center; margin-bottom: 18px; }
.nf-hat { color: var(--accent); width: 88px; height: 88px; animation: nf-vanish 4.2s var(--ease-in-out) infinite; }
.nf-hat .i { width: 88px; height: 88px; }
.nf-hat.is-twin { position: absolute; animation-delay: -2.1s; color: var(--text-3); }
.nf-shadow { position: absolute; bottom: 4px; width: 64px; height: 8px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); animation: nf-shadow 4.2s var(--ease-in-out) infinite; }
:root[data-theme="light"] .nf-shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, .15), transparent); }
@keyframes nf-vanish {
    0%, 8% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
    38% { opacity: 1; transform: translateY(-6px) scale(1); filter: blur(0); }
    50%, 58% { opacity: 0; transform: translateY(-2px) scale(.92); filter: blur(6px); }
    92%, 100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes nf-shadow { 0%, 8%, 92%, 100% { opacity: 1; transform: scale(1); } 38% { opacity: .6; transform: scale(.85); } 50%, 58% { opacity: .3; transform: scale(.7); } }
.nf-code { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .3em; color: var(--text-3); margin-bottom: 10px; padding-left: .3em; }
.nf-title { font-size: var(--fs-2xl); letter-spacing: var(--tracking-tighter); max-width: 520px; }
.nf-text { max-width: 420px; margin-top: 10px; color: var(--text-3); font-size: var(--fs-md); line-height: 1.6; }
.nf-text code { color: var(--text-2); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); word-break: break-all; }
.nf .empty-action { margin-top: 24px; }

/* ───────── Shortcuts modal ───────── */
.shortcuts { display: grid; gap: 2px; }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); }
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row .kbd-group span { color: var(--text-3); font-size: var(--fs-2xs); margin: 0 2px; }

/* ───────── Auth ───────── */
.auth {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(440px, 1fr);
    background: var(--bg);
    overflow: hidden;
}
.auth.is-entering .auth-card { animation: rise-in 520ms var(--ease) 80ms both; }
.auth.is-entering .auth-brand { animation: fade-in 700ms var(--ease) both; }
.auth.is-leaving { animation: auth-out 520ms var(--ease-in-out) both; pointer-events: none; }
@keyframes auth-out { to { opacity: 0; transform: scale(1.015); filter: blur(6px); } }

.auth-brand {
    --text: #ededef;
    --text-2: #b4b4bd;
    --text-3: #7c7c87;
    --border: rgba(255, 255, 255, .08);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 10px 0 10px 10px;
    padding: 34px 44px 32px;
    border-radius: var(--r-xl);
    overflow: hidden;
    color: var(--text);
    background: #0b0b0d url('/assets/wallpapers/aurora.webp') center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    isolation: isolate;
}
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(700px 420px at 12% 0%, rgba(200, 245, 96, .16), transparent 70%),
        linear-gradient(180deg, rgba(9, 9, 11, .25) 0%, rgba(9, 9, 11, .55) 55%, rgba(9, 9, 11, .88) 100%);
}
.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 20%, transparent 75%);
}
.auth-brand .brand-mark { --accent: #c8f560; --accent-fg: #0b0b0c; }
.auth-brand .brand-pill { --accent: #c8f560; --accent-soft: rgba(200, 245, 96, .12); --accent-line: rgba(200, 245, 96, .3); }
.auth-watermark {
    position: absolute;
    right: -70px;
    bottom: -60px;
    width: 420px;
    height: 420px;
    color: #fff;
    opacity: .035;
    z-index: -1;
    transform: rotate(-12deg);
    pointer-events: none;
}
.auth-watermark .i { width: 100%; height: 100%; }
.auth-hero { max-width: 520px; }
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-2);
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    margin-bottom: 22px;
}
.auth-eyebrow .dot { background: #c8f560; box-shadow: 0 0 0 3px rgba(200, 245, 96, .18); }
.auth-tagline {
    font-size: clamp(30px, 3.3vw, 46px);
    line-height: 1.06;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: #f4f4f5;
}
.auth-tagline span { color: #c8f560; }
.auth-lede { margin-top: 18px; max-width: 440px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.auth-features { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 34px; max-width: 520px; }
.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .065);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.auth-feature .app-tile { color: var(--app-color); }
.auth-feature-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.auth-feature-text { font-size: var(--fs-xs); color: var(--text-3); margin-top: 1px; }
.auth-brand-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--text-3); }
.auth-brand-foot .mono { font-size: var(--fs-2xs); letter-spacing: .04em; }

.auth-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    overflow-y: auto;
}
.auth-card { width: 100%; max-width: 372px; }
.auth-mobile-brand { display: none; }
.auth-title { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.auth-sub { margin-top: 6px; color: var(--text-2); font-size: var(--fs-md); }
.auth-tabs { margin: 26px 0 22px; }
.auth-tabs > button { height: 32px; font-size: var(--fs-sm); }
.auth-form .field + .field { margin-top: 14px; }
.auth-form .field-label { color: var(--text); font-weight: 500; }
.auth-caps { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); font-size: var(--fs-2xs); font-weight: 500; }
.auth-caps .i { width: 12px; height: 12px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.auth-row .check { color: var(--text-2); }
.auth-hint-text { font-size: var(--fs-xs); color: var(--text-3); }
.auth-form .inline-error { margin-top: 16px; }
.auth-submit { margin-top: 20px; }
.auth-submit .i { transition: transform var(--dur-2) var(--ease); }
.auth-submit:hover .i { transform: translateX(2px); }
.auth-card .divider-label { margin: 22px 0 16px; }
.auth-discord .i { width: 18px; height: 18px; }
.auth-foot { margin-top: 26px; font-size: var(--fs-xs); color: var(--text-3); text-align: center; line-height: 1.6; }
.auth-eye { color: var(--text-3); }
.auth-eye:hover { color: var(--text); }
.auth-theme { position: absolute; top: 16px; right: 16px; color: var(--text-3); }

@media (max-width: 959px) {
    .auth { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
    .auth-brand { display: none; }
    .auth-main {
        justify-content: flex-start;
        padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
        background:
            radial-gradient(520px 300px at 50% -60px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
        min-height: 100%;
    }
    .auth-card { max-width: 420px; margin-top: 4vh; }
    .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
    .auth-title { font-size: 26px; }
    .auth-form .input-lg { height: 46px; font-size: 16px; }
    .auth-submit, .auth-discord { height: 48px; font-size: 15px; }
}

/* ───────── Dev UI (bileşen vitrini) ───────── */
.devui-section { padding: 22px 0; border-bottom: 1px solid var(--border); }
.devui-section:last-child { border-bottom: 0; }
.devui-section > h2 { font-size: var(--fs-md); margin-bottom: 4px; }
.devui-section > p { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 16px; }
.devui-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.devui-row + .devui-row { margin-top: 12px; }
.devui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.devui-swatch { border-radius: 10px; height: 52px; box-shadow: inset 0 0 0 1px var(--border); display: flex; align-items: flex-end; padding: 6px 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); }
.devui-type > * + * { margin-top: 8px; }
.devui-nav { position: sticky; top: 0; z-index: 2; padding: 10px 0; background: linear-gradient(var(--panel-solid) 75%, transparent); }

/* Mobil arama düğmesi */
.ph-search { display: none; color: var(--text-2); }
@media (max-width: 959px) { .ph-search { display: inline-flex; } }

.sb-item .sb-new-dot { margin-left: auto; }
.sb-item .sb-new-dot[hidden] { display: none; }

/* ───────── Site turu (yeni üyeler) ───────── */
.tour { position: fixed; inset: 0; z-index: calc(var(--z-toast) + 10); animation: tour-in var(--dur-2) var(--ease) both; }
.tour.is-leaving { animation: tour-out var(--dur-1) var(--ease) both; }
@keyframes tour-in { from { opacity: 0; } }
@keyframes tour-out { to { opacity: 0; } }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62), 0 0 0 2px var(--accent); pointer-events: none; transition: left var(--dur-3) var(--ease), top var(--dur-3) var(--ease), width var(--dur-3) var(--ease), height var(--dur-3) var(--ease); }
.tour.is-center .tour-spot { left: 50%; top: 50%; width: 0; height: 0; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62); }
.tour-card { position: fixed; width: min(320px, calc(100vw - 24px)); padding: 18px 18px 14px; border-radius: var(--r-xl); background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); color: var(--text-2); outline: none; transition: left var(--dur-3) var(--ease), top var(--dur-3) var(--ease); }
.tour.is-center .tour-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 24px)); text-align: center; }
.tour-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tour-step { font-size: var(--fs-2xs); font-weight: 600; color: var(--accent); letter-spacing: .02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.tour-title { font-size: var(--fs-lg); font-weight: 650; color: var(--text); letter-spacing: var(--tracking-tight); margin: 0 0 6px; }
.tour-text { font-size: var(--fs-sm); line-height: 1.55; margin: 0 0 14px; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-foot .btn-primary { min-width: 84px; }
.tour-dots { display: flex; gap: 5px; margin-right: auto; }
.tour-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--surface-3); transition: width var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease); }
.tour-dots span.is-on { width: 16px; background: var(--accent); }
.tour.is-center .tour-foot { justify-content: center; }
.tour.is-center .tour-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
