/*
 * Ova Disk web arayuzu.
 * Yerlesim ve davranis Yandex Disk ile ayni; logo, simge ve renkler bizim.
 * Renkler degiskenlerde: acik tema varsayilan, koyu tema [data-theme=dark].
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f5f3;
    --surface-3: #eceae6;
    --hover: #f4f3f0;
    --line: #e8e6e2;
    --line-strong: #d6d3ce;

    --text: #1d1c1a;
    --text-2: #67645f;
    --text-3: #9d9a94;

    --accent: #ffd84d;
    --accent-hover: #ffcc1a;
    --accent-ink: #1d1c1a;
    --accent-soft: #fff6d2;

    --blue: #2563eb;
    --blue-soft: #e8efff;
    --sel: #e9f0ff;
    --sel-line: #8fb0f4;

    --danger: #dc3a3a;
    --danger-soft: #fdecec;
    --ok: #1f9a54;
    --ok-soft: #e2f5ea;
    --warn: #b77400;
    --warn-soft: #fff1d6;

    --overlay: rgba(20, 19, 17, .38);
    --toast: #1d1c1a;
    --shadow-sm: 0 1px 2px rgba(20, 19, 17, .06), 0 1px 1px rgba(20, 19, 17, .04);
    --shadow: 0 10px 30px rgba(20, 19, 17, .12), 0 2px 6px rgba(20, 19, 17, .06), 0 0 0 1px rgba(20, 19, 17, .05);
    --skeleton: linear-gradient(90deg, #f1efec 0%, #f8f7f5 40%, #f1efec 80%);

    --radius: 14px;
    --header-h: 68px;
    --sidebar-w: 256px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #161615;
    --surface: #1f1f1d;
    --surface-2: #252523;
    --surface-3: #31302d;
    --hover: #2a2a27;
    --line: #2f2e2b;
    --line-strong: #44423e;

    --text: #f1efea;
    --text-2: #b0ada6;
    --text-3: #7d7a74;

    --accent: #ffd84d;
    --accent-hover: #ffe27a;
    --accent-soft: #3a3214;

    --blue: #6b9bff;
    --blue-soft: #1d2a45;
    --sel: #1f2b44;
    --sel-line: #4d72bf;

    --danger: #ff6b6b;
    --danger-soft: #3b1f1f;
    --ok: #4cc47f;
    --ok-soft: #173325;
    --warn: #f0b44c;
    --warn-soft: #3a2e14;

    --overlay: rgba(0, 0, 0, .6);
    --toast: #2f2e2b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
    --skeleton: linear-gradient(90deg, #252523 0%, #2d2d2a 40%, #252523 80%);

    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font: 14px/1.45 var(--font);
    font-feature-settings: "cv11", "ss01";
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ------------------------------------------------------------ acilis */

.app-loading { display: grid; place-items: center; height: 100%; }

.boot-spinner, .spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--surface-3);
    border-top-color: var(--text-2);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.spinner.small { width: 18px; height: 18px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------------ dugmeler */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px;
    border: 0; border-radius: 12px;
    background: var(--surface-2); color: var(--text);
    font-weight: 550; white-space: nowrap;
    transition: background-color .15s, transform .1s, box-shadow .15s;
}

.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .06); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.94); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.outline { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.outline:hover { background: var(--hover); }
.btn.big { height: 48px; font-size: 15px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn > svg { width: 20px; height: 20px; flex: none; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px;
    border: 0; border-radius: 12px;
    background: transparent; color: var(--text-2);
    transition: background-color .15s, color .15s;
}

.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.active { background: var(--surface-3); color: var(--text); }
.icon-btn > svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ alanlar */

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }

.input, .select {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: 12px;
    background: var(--surface); outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus { border-color: var(--accent-hover); box-shadow: 0 0 0 4px rgba(255, 216, 77, .35); }
.input.code { height: 60px; font-size: 28px; font-weight: 600; letter-spacing: 12px; text-align: center; font-variant-numeric: tabular-nums; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--text); }

.form-error { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; }

/* ------------------------------------------------------------ giris */

#app { min-height: 100%; }
.auth { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); min-height: 100vh; background: var(--bg); }

.brand-panel {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 40px 48px;
    background: radial-gradient(120% 90% at 0% 0%, #fff3b8 0%, #ffd84d 45%, #ffbf1f 100%);
    color: #1d1c1a;
}

.brand-panel .logo { color: #1d1c1a; font-size: 24px; }
.brand-panel .pitch { position: relative; z-index: 1; }
.brand-panel h2 { max-width: 440px; margin: 0 0 14px; font-size: 40px; line-height: 1.1; letter-spacing: -1px; font-weight: 750; }
.brand-panel p { max-width: 400px; margin: 0; font-size: 16px; color: rgba(29, 28, 26, .72); }
.brand-panel .brand-art { position: absolute; right: -30px; bottom: 70px; width: 440px; max-width: 72%; pointer-events: none; }
.brand-panel .foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(29, 28, 26, .6); }

.auth-side { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 400px; animation: rise .3s var(--ease); }
.auth-card .logo.mobile-only { display: none; margin-bottom: 28px; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -.5px; font-weight: 750; }
.auth-card .lead { margin: 0 0 26px; color: var(--text-2); font-size: 15px; }
.auth-card .secondary { margin-top: 18px; text-align: center; font-size: 13.5px; }

.qr-box { display: grid; place-items: center; margin: 4px 0 14px; padding: 18px; border-radius: 18px; background: var(--surface-2); }
.qr-box canvas { width: 188px; height: 188px; image-rendering: pixelated; background: #fff; border-radius: 10px; box-shadow: var(--shadow-sm); }

.secret {
    display: block; margin: 0 0 22px; padding: 10px 12px;
    border-radius: 12px; background: var(--surface-2);
    font: 13px/1.4 ui-monospace, Consolas, monospace; letter-spacing: 1.5px;
    word-break: break-all; text-align: center; user-select: all; color: var(--text-2);
}

.steps { counter-reset: s; margin: 0 0 18px; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; margin-bottom: 10px; padding-left: 34px; color: var(--text-2); }
.steps li::before {
    content: counter(s); position: absolute; left: 0; top: -1px;
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent-soft); color: var(--text); font-size: 12px; font-weight: 700;
}

/* ------------------------------------------------------------ logo */

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 21px; letter-spacing: -.4px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { font-weight: 800; }
.logo span { font-weight: 500; }

/* ------------------------------------------------------------ yerlesim */

.layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--header-h) 1fr; height: 100%; animation: fade .25s; }

.header {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 16px;
    padding: 0 20px 0 24px;
    background: var(--bg);
    transition: box-shadow .2s;
    z-index: 15;
}

.header.scrolled { box-shadow: 0 1px 0 var(--line); }
.header .logo { width: calc(var(--sidebar-w) - 44px); flex: none; }

.search { position: relative; flex: 1; max-width: 680px; }
.search > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.search input {
    width: 100%; height: 46px; padding: 0 52px 0 46px;
    border: 1px solid transparent; border-radius: 14px;
    background: var(--surface-2); outline: none;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--text-3); }
.search input:hover { background: var(--surface-3); }
.search input:focus { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow); }
.search kbd {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line-strong);
    color: var(--text-3); font: 12px var(--font); pointer-events: none;
}
.search input:focus ~ kbd { display: none; }

.header .spacer { flex: 1; }

.avatar {
    display: grid; place-items: center;
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: linear-gradient(135deg, #8b7cf6, #5b4bd6); color: #fff; font-weight: 650; font-size: 14.5px;
    box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line);
    transition: transform .15s;
}
.avatar:hover { transform: scale(1.05); }

.sidebar { display: flex; flex-direction: column; padding: 4px 14px 16px; overflow-y: auto; background: var(--bg); }
.sidebar .actions { display: grid; gap: 8px; margin: 0 2px 18px; }

.nav { display: grid; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 14px;
    height: 44px; padding: 0 14px;
    border-radius: 12px; color: var(--text); font-weight: 450;
    transition: background-color .12s;
}
.nav a:hover { background: var(--hover); }
.nav a.active { background: var(--surface-3); font-weight: 650; }
.nav a svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.nav a.active svg { color: var(--text); }
.nav .sep { height: 1px; margin: 10px 14px; background: var(--line); }

.usage { margin-top: auto; padding: 16px 14px 4px; }
.usage .bar { height: 6px; margin: 8px 0 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.usage .bar div { width: 0; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-hover), #ffb020); transition: width .6s var(--ease); }
.usage .t { font-size: 13px; font-weight: 600; }
.usage .s { font-size: 12px; color: var(--text-3); }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.content { flex: 1; overflow-y: auto; padding: 0 36px 120px; outline: none; }

/* ------------------------------------------------------------ baslik + arac cubugu */

.page-head { display: flex; align-items: flex-end; gap: 16px; min-height: 96px; padding: 14px 0 18px; animation: rise .25s var(--ease); }
.page-head .titles { flex: 1; min-width: 0; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 750; letter-spacing: -.6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head .tools { display: flex; align-items: center; gap: 4px; }
.page-head .seg { display: flex; gap: 2px; margin-left: 6px; padding: 3px; border-radius: 13px; background: var(--surface-2); }
.page-head .seg .icon-btn { width: 36px; height: 34px; border-radius: 10px; }
.page-head .seg .icon-btn.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.page-head .seg .icon-btn > svg { width: 20px; height: 20px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 4px -6px; color: var(--text-2); font-size: 13.5px; }
.crumbs a { padding: 3px 7px; border-radius: 8px; color: var(--text-2); transition: background-color .12s; }
.crumbs a:hover { background: var(--hover); color: var(--text); }
.crumbs a.drop-target { background: var(--blue-soft); color: var(--blue); }
.crumbs .slash { color: var(--text-3); font-size: 12px; }

.sort-btn { height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.sort-btn:hover { background: var(--hover); color: var(--text); }
.sort-btn svg { width: 18px; height: 18px; }

.section-title { margin: 22px 4px 10px; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.section-title:first-child { margin-top: 0; }

/* secim cubugu: ust kisimda, secim varken */
.selbar {
    position: absolute; left: 0; right: 0; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 2px;
    height: var(--header-h); margin-top: calc(var(--header-h) * -1);
    padding: 0 20px 0 18px;
    background: var(--bg); box-shadow: 0 1px 0 var(--line);
    animation: fade .15s;
}
.selbar .count { min-width: 120px; max-width: 260px; margin: 0 14px 0 4px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbar .btn { height: 38px; padding: 0 12px; background: transparent; font-weight: 500; }
.selbar .btn:hover { background: var(--hover); }
.selbar .btn > svg { width: 20px; height: 20px; color: var(--text-2); }
.selbar .btn.danger-text, .selbar .btn.danger-text > svg { color: var(--danger); }
.selbar .spacer { flex: 1; }

/* ------------------------------------------------------------ dosya izgarasi */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 6px; user-select: none; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px 4px; }

.tile {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 8px 12px;
    border-radius: 16px;
    cursor: default; outline: none;
    transition: background-color .12s, box-shadow .12s;
    animation: rise .22s var(--ease) both;
}

.tile:hover { background: var(--hover); }
.tile.selected { background: var(--sel); box-shadow: inset 0 0 0 1.5px var(--sel-line); }
.tile:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.tile.drop-target { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }

.tile .thumb { position: relative; display: grid; place-items: center; width: 116px; height: 116px; margin-bottom: 10px; transition: transform .15s var(--ease); }
.tile:hover .thumb { transform: translateY(-2px); }
.grid.small .thumb { width: 84px; height: 84px; margin-bottom: 8px; }
.tile .thumb > svg { width: 86%; height: 86%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .07)); }
.tile .thumb.media img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; background: var(--surface-2); box-shadow: 0 2px 8px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .04); animation: fade .25s; }
.tile .thumb .play { position: absolute; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; }
.tile .thumb .play svg { width: 18px; height: 18px; margin-left: 2px; }

.tile .name {
    width: 100%; text-align: center; font-size: 13px; line-height: 18px; font-weight: 500;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    word-break: break-word;
}
.tile .meta { margin-top: 2px; font-size: 12px; color: var(--text-3); }

.tile .tick {
    position: absolute; left: 10px; top: 10px; z-index: 1;
    display: grid; place-items: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-sm);
    opacity: 0; transform: scale(.85);
    transition: opacity .12s, transform .12s, background-color .12s;
}
.tile:hover .tick { opacity: 1; transform: none; }
.tile.selected .tick { opacity: 1; transform: none; background: var(--blue); box-shadow: none; }
.tile .tick svg { width: 14px; height: 14px; color: #fff; stroke-width: 2.6; }

.badge { position: absolute; right: 12px; top: 12px; padding: 1px 7px; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 600; }
.badge.warn { background: #f29d38; }
.badge.danger { background: var(--danger); }

/* iskelet (yuklenirken) */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 6px; }
.skeleton-tile { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; }
.skeleton-tile .b, .skeleton-tile .l { background: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-tile .b { width: 104px; height: 104px; margin: 6px 0 14px; border-radius: 16px; }
.skeleton-tile .l { width: 70%; height: 11px; border-radius: 6px; }

/* liste gorunumu */
.list { width: 100%; border-collapse: separate; border-spacing: 0; user-select: none; }
.list th { position: sticky; top: 0; z-index: 1; height: 42px; padding: 0 12px; background: var(--bg); color: var(--text-3); font-weight: 500; font-size: 12.5px; text-align: left; border-bottom: 1px solid var(--line); }
.list th.sortable { cursor: pointer; }
.list th.sortable:hover { color: var(--text); }
.list td { height: 54px; padding: 0 12px; white-space: nowrap; }
.list tr.row { cursor: default; outline: none; }
.list tr.row td:first-child { border-radius: 12px 0 0 12px; }
.list tr.row td:last-child { border-radius: 0 12px 12px 0; }
.list tr.row:hover td { background: var(--hover); }
.list tr.row.selected td { background: var(--sel); }
.list tr.row.drop-target td { background: var(--blue-soft); }
.list td.name-cell { width: 100%; max-width: 0; }
.list .name-wrap { display: flex; align-items: center; gap: 14px; }
.list .name-wrap .ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; }
.list .name-wrap .ico svg { width: 32px; height: 32px; }
.list .name-wrap .ico.media img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.list .name-wrap .txt { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.list td.dim { color: var(--text-2); font-size: 13px; }

/* bos durum */
.empty { display: grid; place-items: center; padding: 56px 16px; text-align: center; color: var(--text-2); animation: rise .3s var(--ease); }
.empty > svg { width: 190px; height: 150px; margin-bottom: 18px; }
.empty h2 { margin: 0 0 8px; color: var(--text); font-size: 21px; letter-spacing: -.3px; }
.empty p { margin: 0 0 20px; max-width: 420px; }

.loading-row { display: grid; place-items: center; padding: 64px 0; }

/* secim karesi */
.marquee { position: fixed; z-index: 30; border: 1px solid var(--sel-line); border-radius: 4px; background: rgba(37, 99, 235, .08); pointer-events: none; }

/* dis dosya surukleme */
.dropzone {
    position: absolute; inset: 0; z-index: 25;
    display: grid; place-items: center; align-content: center; gap: 12px;
    margin: 8px 20px 20px; border: 2px dashed var(--blue); border-radius: 24px;
    background: var(--blue-soft); color: var(--blue); opacity: .96;
    font-size: 18px; font-weight: 650; pointer-events: none; animation: fade .15s;
}
.dropzone svg { width: 48px; height: 48px; }

/* ------------------------------------------------------------ menu */

.menu {
    position: fixed; z-index: 60;
    min-width: 230px; max-width: 320px; padding: 6px;
    border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
    animation: pop .12s var(--ease);
}
.menu button {
    display: flex; align-items: center; gap: 12px;
    width: 100%; height: 40px; padding: 0 12px;
    border: 0; border-radius: 10px; background: transparent; text-align: left; font-weight: 450;
}
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button:disabled { opacity: .4; cursor: default; background: transparent; }
.menu button svg { width: 20px; height: 20px; color: var(--text-2); flex: none; }
.menu button.danger, .menu button.danger svg { color: var(--danger); }
.menu button .mark { margin-left: auto; color: var(--text); }
.menu .sep { height: 1px; margin: 6px; background: var(--line); }
.menu .label { padding: 10px 12px 6px; color: var(--text-3); font-size: 12px; line-height: 1.35; }
.menu .label b { display: block; color: var(--text); font-size: 14px; font-weight: 650; }

/* ------------------------------------------------------------ pencere */

.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: var(--overlay); backdrop-filter: blur(2px); animation: fade .15s; }

.dialog {
    display: flex; flex-direction: column;
    width: 100%; max-width: 460px; max-height: calc(100vh - 32px);
    border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
    animation: pop .18s var(--ease);
}
.dialog.wide { max-width: 640px; }
.dialog .d-head { display: flex; align-items: center; gap: 12px; padding: 22px 22px 8px 26px; }
.dialog .d-head h2 { flex: 1; margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog .d-body { padding: 8px 26px 8px; overflow-y: auto; }
.dialog .d-body p { margin: 0 0 14px; color: var(--text-2); }
.dialog .d-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px 22px; }

/* klasor secici */
.picker-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-bottom: 10px; font-size: 13.5px; }
.picker-crumbs a { padding: 3px 7px; border-radius: 8px; color: var(--text-2); cursor: pointer; }
.picker-crumbs a:hover { background: var(--hover); color: var(--text); }
.picker-list { height: 330px; overflow-y: auto; margin: 0 -10px; padding: 4px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.picker-list .row { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px; cursor: pointer; font-weight: 500; }
.picker-list .row:hover { background: var(--hover); }
.picker-list .row.disabled { opacity: .4; cursor: default; background: transparent; }
.picker-list .row svg { width: 30px; height: 30px; flex: none; }
.picker-list .row .chev { width: 18px; height: 18px; margin-left: auto; color: var(--text-3); }

/* yetki penceresi */
.share-add { display: grid; grid-template-columns: 1fr 156px auto; gap: 8px; margin-bottom: 4px; }
.share-add .btn, .share-add .select { height: 46px; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 52px; z-index: 5; max-height: 280px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); animation: pop .12s var(--ease); }
.suggest-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.suggest-list button:hover, .suggest-list button.active { background: var(--hover); }
.suggest-list .sub { color: var(--text-3); font-size: 12px; }
.chip { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 13px; font-weight: 650; }
.chip svg { width: 18px; height: 18px; }
.chip.user { background: #ece9fd; color: #5b4bd6; }
.chip.department { background: var(--ok-soft); color: var(--ok); }
.chip.group { background: var(--warn-soft); color: var(--warn); }
.chip.everyone { background: var(--blue-soft); color: var(--blue); }
:root[data-theme="dark"] .chip.user { background: #2b2650; color: #b3a8ff; }
.grant-list { margin: 16px 0 10px; }
.grant-row { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--line); }
.grant-row:last-child { border-bottom: 0; }
.grant-row .who { flex: 1; min-width: 0; }
.grant-row .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.grant-row .who .sub { color: var(--text-3); font-size: 12px; font-weight: 400; }
.grant-row .select { width: 156px; height: 38px; }
.levels { margin-top: 6px; border-radius: 14px; background: var(--surface-2); }
.levels summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; color: var(--text-2); font-weight: 550; list-style: none; }
.levels summary::-webkit-details-marker { display: none; }
.levels summary svg { width: 18px; height: 18px; color: var(--text-3); }
.levels[open] summary { color: var(--text); }
.levels dl { display: grid; grid-template-columns: 112px 1fr; gap: 8px 12px; margin: 0; padding: 0 16px 6px; font-size: 13px; }
.levels dt { font-weight: 650; }
.levels dd { margin: 0; color: var(--text-2); }
.levels ul { margin: 8px 0 0; padding: 10px 16px 14px 32px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; }
.levels li + li { margin-top: 4px; }
.hint { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.hint > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--text-3); }

/* bilgi */
.props { width: 100%; border-collapse: collapse; }
.props th { width: 38%; padding: 9px 0; color: var(--text-2); font-weight: 400; text-align: left; vertical-align: top; }
.props td { padding: 9px 0; word-break: break-word; font-weight: 500; }
.props tr + tr th, .props tr + tr td { border-top: 1px solid var(--line); }
.versions .v-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.versions .v-row > svg { width: 20px; height: 20px; color: var(--text-3); }
.versions .v-row .grow { flex: 1; }
.versions .v-row .sub { color: var(--text-3); font-size: 12px; }

/* ------------------------------------------------------------ bildirim */

.toasts { position: fixed; left: 24px; bottom: 24px; z-index: 70; display: grid; gap: 8px; }
.toast {
    display: flex; align-items: center; gap: 12px;
    min-width: 300px; max-width: 480px; padding: 13px 16px;
    border-radius: 14px; background: var(--toast); color: #fff;
    box-shadow: var(--shadow); animation: pop .18s var(--ease);
}
.toast > svg { width: 20px; height: 20px; flex: none; color: #8fe0ae; }
.toast.error > svg { color: #ffaaa5; }
.toast .msg { flex: 1; }
.toast button { border: 0; background: transparent; color: var(--accent); font-weight: 650; padding: 4px 6px; border-radius: 8px; }
.toast button:hover { background: rgba(255, 255, 255, .1); }

/* ------------------------------------------------------------ yukleme paneli */

.uploads {
    position: fixed; right: 24px; bottom: 24px; z-index: 40;
    width: 390px; max-height: 60vh;
    display: flex; flex-direction: column;
    border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
    animation: pop .2s var(--ease);
}
.uploads .u-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; }
.uploads .u-head .ring { width: 30px; height: 30px; flex: none; }
.uploads .u-head .ring circle { fill: none; stroke-width: 3.2; }
.uploads .u-head .ring .bg { stroke: var(--surface-3); }
.uploads .u-head .ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .3s; transform: rotate(-90deg); transform-origin: 50% 50%; }
.uploads .u-head .title { flex: 1; font-weight: 650; }
.uploads .u-head .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.uploads .u-head .icon-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.uploads.collapsed .u-head .toggle svg { transform: rotate(180deg); }
.uploads .u-list { overflow-y: auto; padding: 4px 0 8px; border-top: 1px solid var(--line); }
.uploads.collapsed .u-list { display: none; }
.uploads .u-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.uploads .u-row .ico svg { width: 30px; height: 30px; }
.uploads .u-row .info { flex: 1; min-width: 0; }
.uploads .u-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.uploads .u-row .s { color: var(--text-3); font-size: 12px; }
.uploads .u-row .s.err { color: var(--danger); }
.uploads .u-row .bar { height: 4px; margin-top: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.uploads .u-row .bar div { height: 100%; border-radius: 4px; background: var(--blue); transition: width .15s; }
.uploads .u-row .state svg { width: 20px; height: 20px; }
.uploads .u-row .state .ok { color: var(--ok); }
.uploads .u-row .state .err { color: var(--danger); }

/* ------------------------------------------------------------ goruntuleyici */

.viewer { position: fixed; inset: 0; z-index: 55; display: grid; grid-template-rows: 68px 1fr; background: #0d0d0c; color: #fff; animation: fade .18s; }
.viewer .v-top { display: flex; align-items: center; gap: 6px; padding: 0 14px 0 22px; }
.viewer .v-top .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.viewer .v-top .sub { color: #9a9a96; font-size: 12px; font-weight: 400; }
.viewer .icon-btn { color: #d8d8d4; }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.viewer .v-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 4px 80px 28px; }
.viewer .v-stage video { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; animation: fade .25s; }
.viewer .zoom-box { position: absolute; inset: 0; z-index: 1; overflow: hidden; cursor: zoom-in; touch-action: none; user-select: none; }
.viewer .zoom-box.zoomed { cursor: grab; }
.viewer .zoom-box.dragging { cursor: grabbing; }
.viewer .zoom-box img { position: absolute; left: 0; top: 0; max-width: none; max-height: none; transform-origin: 0 0; animation: fade .25s; will-change: transform; }
.viewer .zoom-bar { display: flex; align-items: center; gap: 2px; margin-right: 10px; padding: 2px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.viewer .zoom-bar .btn { height: 36px; padding: 0 10px; color: #d8d8d4; background: transparent; font-size: 13px; }
.viewer .zoom-bar .btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.viewer .zoom-label { min-width: 48px; text-align: center; font-size: 12.5px; color: #c8c8c4; font-variant-numeric: tabular-nums; }
.viewer .nav-arrow { z-index: 2; }
.viewer .v-stage iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; }
.viewer .v-stage audio { width: min(520px, 100%); }
.viewer .v-stage pre { width: 100%; height: 100%; margin: 0; padding: 22px; overflow: auto; border-radius: 12px; background: #1a1a19; color: #e8e8e4; font: 13px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.viewer .v-none { text-align: center; color: #b5b5b0; }
.viewer .v-none > svg { width: 110px; height: 110px; margin-bottom: 14px; }
.viewer .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .08); }
.viewer .nav-arrow:hover { background: rgba(255, 255, 255, .18); }
.viewer .nav-arrow.prev { left: 14px; }
.viewer .nav-arrow.next { right: 14px; }
.viewer .nav-arrow > svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------ tablo sayfalari (yonetim) */

.panel { max-width: 1080px; animation: rise .25s var(--ease); }
.panel p.lead { margin: 0 0 16px; color: var(--text-2); max-width: 760px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { height: 44px; padding: 0 16px; background: var(--surface-2); color: var(--text-3); font-weight: 500; font-size: 12.5px; text-align: left; }
.table td { height: 60px; padding: 8px 16px; border-top: 1px solid var(--line); }
.table tbody tr:hover td { background: var(--hover); }
.table td.actions { text-align: right; white-space: nowrap; }
.table .sub { color: var(--text-3); font-size: 12px; }
.table .who { display: flex; align-items: center; gap: 12px; }
.table .who > svg { width: 24px; height: 24px; flex: none; color: var(--text-2); }
.pill { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 550; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.off { background: var(--danger-soft); color: var(--danger); }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 18px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.tabs a { padding: 7px 16px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--shadow-sm); }
.toolbar-row { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar-row .input { max-width: 340px; height: 42px; }

/* ------------------------------------------------------------ dar ekran */

.header .menu-toggle { display: none; }

@media (max-width: 1000px) {
    .auth { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .auth-card .logo.mobile-only { display: inline-flex; }
}

@media (max-width: 860px) {
    :root { --sidebar-w: 0px; --header-h: 60px; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: var(--header-h); bottom: 0; z-index: 45; width: 272px; box-shadow: var(--shadow); transform: translateX(-110%); transition: transform .2s var(--ease); }
    .sidebar.open { transform: none; }
    .header { padding: 0 12px; gap: 8px; }
    .header .logo { width: auto; }
    .header .logo span { display: none; }
    .header .menu-toggle { display: inline-grid; }
    .search kbd { display: none; }
    .content { padding: 0 16px 120px; }
    .page-head { min-height: 76px; }
    .page-head h1 { font-size: 24px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
    .tile .thumb { width: 92px; height: 92px; }
    .uploads { left: 12px; right: 12px; width: auto; bottom: 12px; }
    .viewer .v-stage { padding: 4px 8px 16px; }
    .list td.hide-sm, .list th.hide-sm { display: none; }
    .selbar .btn span { display: none; }
    .toasts { left: 12px; right: 12px; bottom: 12px; }
    .toast { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ cizimler */

.ill .ill-shadow { fill: var(--surface-2); }
.ill .ill-1 { fill: var(--accent); }
.ill .ill-2 { fill: #f5b800; }
.ill .ill-paper { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.ill .ill-line { fill: none; stroke: var(--line-strong); stroke-width: 4; stroke-linecap: round; }
.ill .ill-arrow { fill: none; stroke: var(--accent-ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ill .ill-ring { fill: var(--accent-soft); stroke: var(--text); stroke-width: 6; }
.ill .ill-handle { fill: none; stroke: var(--text); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.ill .ill-dot { fill: var(--accent-hover); }
.ill .ill-spark { fill: none; stroke: var(--accent-hover); stroke-width: 3; stroke-linecap: round; }
:root[data-theme="dark"] .ill .ill-arrow { stroke: #1d1c1a; }


/* ------------------------------------------------------------ hak secici */

.grant { border-bottom: 1px solid var(--line); }
.grant:last-child { border-bottom: 0; }
.grant .grant-row { border-bottom: 0; }
.grant .grant-row .btn { height: 34px; padding: 0 10px; font-size: 13px; color: var(--text-2); }
.grant .grant-row .btn > svg { width: 16px; height: 16px; }
.rights-editor { margin: 0 0 14px 48px; padding: 12px; border-radius: 14px; background: var(--surface-2); animation: fade .15s; }
.templates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-3); }
.chip-btn { height: 28px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 550; }
.chip-btn:hover { border-color: var(--text-3); }
.rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.right { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.right:hover { background: var(--hover); }
.right input { width: 17px; height: 17px; margin-top: 1px; flex: none; accent-color: var(--blue); }
.right span { display: grid; }
.right b { font-weight: 600; font-size: 13.5px; }
.right small { color: var(--text-3); font-size: 12px; }
@media (max-width: 560px) { .rights-grid { grid-template-columns: 1fr; } .rights-editor { margin-left: 0; } }


/* ------------------------------------------------------------ dis baglanti + bildirim */

.link-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.link-form .field.wide { grid-column: 1 / -1; }
.link-form .check.field { align-self: end; height: 46px; margin-bottom: 16px; }
.link-result { margin-bottom: 14px; padding: 14px; border-radius: 16px; background: var(--ok-soft); animation: pop .18s var(--ease); }
.link-ready { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; color: var(--ok); }
.link-ready > svg { width: 20px; height: 20px; }
.link-ready span { color: var(--text-2); font-size: 12.5px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font: 13px ui-monospace, Consolas, monospace; background: var(--surface); }
.copy-row .btn { height: 46px; }
.link-result .hint { margin-top: 10px; background: var(--surface); }
.link-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.link-row > svg { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.link-row .grow { flex: 1; min-width: 0; }
.link-row .sub { color: var(--text-3); font-size: 12px; }
.ico-sm { display: grid; place-items: center; width: 30px; height: 30px; flex: none; }
.ico-sm svg { width: 28px; height: 28px; }

.icon-btn.bell { position: relative; margin-right: 4px; }
.bell-badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-panel { position: fixed; z-index: 60; width: 380px; max-width: calc(100vw - 16px); max-height: 70vh; display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); animation: pop .14s var(--ease); overflow: hidden; }
.notif-head { padding: 14px 18px 10px; font-size: 15px; }
.notif-list { overflow-y: auto; padding: 0 6px 6px; }
.notif-item { display: flex; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.notif-item:hover { background: var(--hover); }
.notif-item > svg { width: 20px; height: 20px; margin-top: 2px; flex: none; color: var(--text-3); }
.notif-item span { display: grid; gap: 2px; }
.notif-item b { font-weight: 600; font-size: 13.5px; }
.notif-item small { color: var(--text-3); font-size: 12px; }
.notif-item.unread { background: var(--accent-soft); }
.notif-empty { margin: 0; padding: 18px; color: var(--text-3); }
@media (max-width: 560px) { .link-form { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ musteri sayfasi (/s/...) */

.public { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-2); }
.public-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 28px; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.public-meta { margin-left: auto; color: var(--text-2); font-size: 13px; }
.public-main { flex: 1; display: grid; justify-items: center; align-content: start; padding: 40px 20px; }
.public-foot { padding: 18px; text-align: center; color: var(--text-3); font-size: 12px; }
.public-card { width: 100%; max-width: 680px; padding: 28px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; animation: rise .3s var(--ease); }
.public-card.narrow { max-width: 420px; text-align: left; }
.public-card h1 { margin: 16px 0 6px; font-size: 24px; letter-spacing: -.4px; word-break: break-word; }
.public-card .lead { margin: 0 0 18px; color: var(--text-2); }
.public-card .lock { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); }
.public-card .lock svg { width: 28px; height: 28px; }
.public-preview { display: grid; place-items: center; min-height: 220px; border-radius: 18px; background: var(--surface-2); overflow: hidden; }
.public-preview > svg { width: 120px; height: 140px; }
.public-preview img, .public-preview video { max-width: 100%; max-height: 62vh; display: block; cursor: zoom-in; }
.public-preview audio { width: 90%; margin: 16px; }
.public-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.public-actions .sub { color: var(--text-3); font-size: 12.5px; }
.public-note { margin: 0 auto 18px; max-width: 520px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; }
.public-folder { width: 100%; max-width: 1100px; }
.public-folder .tile { cursor: pointer; background: var(--surface); }
.public-folder .tile:hover { background: var(--hover); }
.public-lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .9); animation: fade .15s; cursor: zoom-out; }
.public-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.public-lightbox .icon-btn { position: absolute; top: 14px; right: 14px; color: #ddd; }
