/* ============================================================
   ImageVault — profesyonel koyu tema
   ============================================================ */
:root {
    --bg:        #0b0c10;
    --bg-soft:   #111219;
    --panel:     #15161f;
    --panel-2:   #1b1d28;
    --border:    #262838;
    --border-2:  #323548;
    --text:      #e8eaf2;
    --text-dim:  #9ca0b3;
    --text-mute: #6b7085;
    --brand:     #6366f1;
    --brand-2:   #8b5cf6;
    --brand-soft:#6366f122;
    --danger:    #ef4444;
    --danger-soft:#ef444418;
    --ok:        #22c55e;
    --radius:    16px;
    --radius-sm: 10px;
    --shadow:    0 10px 40px -12px rgba(0,0,0,.6);
    --ring:      0 0 0 3px var(--brand-soft);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:
        radial-gradient(1200px 600px at 80% -10%, #1b1a3a55, transparent 60%),
        radial-gradient(1000px 500px at 0% 0%, #10233a55, transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- Üst çubuk ---- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(11,12,16,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 4px 10px #6366f155); }
.topnav { display: flex; align-items: center; gap: 12px; }
.user-chip {
    font-size: 13px; color: var(--text-dim);
    background: var(--panel); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 999px; font-weight: 500;
}

/* ---- Butonlar ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font: inherit; font-weight: 600; font-size: 14px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer; transition: .16s ease;
    white-space: nowrap; user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; box-shadow: 0 8px 22px -10px var(--brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px var(--brand); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost {
    background: var(--panel); color: var(--text-dim);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: var(--border-2); }
.btn-danger-ghost { background: transparent; color: #f19a9a; border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: #ff6b6b; }

/* ---- Kimlik kartları (login/setup) ---- */
.auth-card {
    max-width: 420px; margin: 8vh auto 0;
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 34px 30px;
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 24px; margin-bottom: 8px; }
.auth-head p { color: var(--text-dim); font-size: 14px; margin: 0; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.field input {
    font: inherit; font-size: 15px; color: var(--text);
    background: var(--bg); border: 1px solid var(--border-2);
    border-radius: var(--radius-sm); padding: 12px 14px; transition: .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field input:disabled { opacity: .5; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: var(--danger-soft); border: 1px solid #ef444444; color: #ffb4b4; }

/* ---- Hero + istatistik ---- */
.hero {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; margin: 34px 0 22px;
}
.hero-text h1 { font-size: 30px; margin-bottom: 6px; }
.hero-text p { color: var(--text-dim); margin: 0; max-width: 520px; }
.stats { display: flex; gap: 12px; }
.stat {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 18px; min-width: 110px;
}
.stat-num { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--text-mute); }

/* ---- Dropzone ---- */
.dropzone {
    position: relative; border: 2px dashed var(--border-2);
    border-radius: var(--radius); background: var(--bg-soft);
    padding: 46px 24px; text-align: center; cursor: pointer;
    transition: .18s ease; overflow: hidden;
}
.dropzone::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(500px 200px at 50% 0%, var(--brand-soft), transparent 70%);
    opacity: 0; transition: .25s; pointer-events: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); outline: none; }
.dropzone:hover::before { opacity: 1; }
.dropzone.dragover { border-color: var(--brand); background: #14162a; transform: scale(1.005); }
.dropzone.dragover::before { opacity: 1; }
.dz-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dz-icon { color: var(--brand); margin-bottom: 4px; }
.dz-title { font-size: 17px; font-weight: 600; }
.dz-link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.dz-sub { font-size: 13px; color: var(--text-mute); }

/* ---- Yükleme kuyruğu ---- */
.queue { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.queue-item {
    display: flex; align-items: center; gap: 14px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.qi-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--panel-2); flex: none; }
.qi-body { flex: 1; min-width: 0; }
.qi-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi-bar { height: 5px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 7px; }
.qi-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }
.qi-status { font-size: 12px; color: var(--text-mute); margin-top: 5px; }
.qi-status.err { color: #ff8080; }
.qi-status.ok  { color: var(--ok); }

/* ---- Oturum sonuçları + toplu kopyala ---- */
.results-section { margin: 22px 0 8px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.results-head h2 { font-size: 16px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 6px;
    background: var(--brand-soft); color: #b9bbff; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; }
.bulk-bar { display: flex; gap: 8px; align-items: center; }
.select {
    font: inherit; font-size: 13px; color: var(--text); background: var(--panel);
    border: 1px solid var(--border-2); border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
.select:focus { outline: none; border-color: var(--brand); }
.results { display: flex; flex-direction: column; gap: 8px; }
.result-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
}
.result-thumb { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; background: var(--panel-2); flex: none; }
.result-link {
    flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--text-dim);
    background: var(--bg); border: 1px solid var(--border-2); border-radius: 7px; padding: 8px 10px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.result-link:focus { outline: none; border-color: var(--brand); color: var(--text); }

/* ---- Ayar / güvenlik sayfası ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 20px; }
.page-head h1 { font-size: 26px; }
.settings-card {
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 18px;
}
.settings-card h2 { font-size: 17px; margin-bottom: 6px; }
.settings-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.muted { color: var(--text-dim); font-size: 14px; margin: 4px 0 0; max-width: 620px; }
.badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.badge-on  { background: #22c55e22; color: #7ee2a4; border: 1px solid #22c55e44; }
.badge-off { background: #6b708522; color: var(--text-dim); border: 1px solid var(--border-2); }
.alert-ok { background: #22c55e18; border: 1px solid #22c55e44; color: #9be7b6; }
.twofa-setup { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
.steps { margin: 0 0 20px; padding-left: 20px; color: var(--text-dim); font-size: 14px; line-height: 1.9; }
.steps strong { color: var(--text); }
.twofa-grid { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; }
.qr-box { text-align: center; }
#qrcode { display: inline-grid; place-items: center; min-width: 190px; min-height: 190px; padding: 12px; background: #fff; border-radius: 12px; }
#qrcode img, #qrcode canvas { display: block; }
.qr-fallback { color: #333; font-size: 12.5px; line-height: 1.5; text-align: center; max-width: 180px; padding: 10px; }
.manual-key { margin-top: 12px; font-size: 13px; }
.manual-key code {
    display: inline-block; margin-top: 4px; padding: 6px 10px; background: var(--bg);
    border: 1px solid var(--border-2); border-radius: 7px; color: #b9bbff;
    font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; word-break: break-all;
}
.code-input { text-align: center; letter-spacing: 8px; font-size: 22px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input {
    font: inherit; font-size: 15px; color: var(--text); background: var(--bg);
    border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 10px 12px; width: 130px;
    text-align: center; letter-spacing: 4px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.link-muted { display: inline-block; text-align: center; width: 100%; margin-top: 6px; color: var(--text-mute); font-size: 13px; }
.link-muted:hover { color: var(--text-dim); }

/* ---- Kullanıcı listesi ---- */
.user-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.user-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px;
}
.user-info { display: flex; flex-direction: column; gap: 3px; }
.user-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.user-date { font-size: 12px; color: var(--text-mute); }
.tag-you { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: #b9bbff; }
.tag-2fa { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #22c55e22; color: #7ee2a4; }
.tag-role { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag-admin { background: #8b5cf622; color: #c4b5fd; }
.tag-uploader { background: #f59e0b22; color: #fcd07a; }
.user-actions { display: flex; align-items: center; gap: 8px; }
.pw-details { position: relative; }
.pw-details summary { list-style: none; cursor: pointer; }
.pw-details summary::-webkit-details-marker { display: none; }
.pw-form { margin-top: 10px; }

/* ---- Sunucu uygunluk kontrolü (setup) ---- */
.reqs { margin: 0 0 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.req-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--border); }
.req-item:first-child { border-top: none; }
.req-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.req-ok  .req-ic { background: #22c55e22; color: #7ee2a4; }
.req-bad .req-ic { background: #ef444422; color: #ff9b9b; }
.req-warn .req-ic{ background: #f59e0b22; color: #fcd07a; }
.req-item .req-hint { color: var(--text-mute); font-size: 12.5px; margin-left: auto; }

@media (max-width: 560px) {
    .twofa-grid { grid-template-columns: 1fr; }
}

/* ---- Galeri ---- */
.gallery-section { margin: 40px 0 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 18px; }
.gallery {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.empty {
    grid-column: 1 / -1; text-align: center; color: var(--text-mute);
    padding: 50px 20px; border: 1px dashed var(--border); border-radius: var(--radius);
}
.card {
    margin: 0; background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; transition: .16s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-thumb { display: block; aspect-ratio: 4/3; background: var(--panel-2); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .3s; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 11px 12px; }
.card-meta { font-size: 12px; color: var(--text-mute); margin-bottom: 9px; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Modal (kod kutuları) ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.72); backdrop-filter: blur(4px); }
.modal-card {
    position: relative; width: 100%; max-width: 560px;
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border-2); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 22px; max-height: 88vh; overflow: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-size: 17px; }
.modal-x { background: none; border: none; color: var(--text-dim); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-preview { text-align: center; margin-bottom: 18px; }
.modal-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.code-boxes { display: flex; flex-direction: column; gap: 12px; }
.code-box { }
.code-box label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
.code-row { display: flex; gap: 8px; }
.code-row input {
    flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--text);
    background: var(--bg); border: 1px solid var(--border-2);
    border-radius: 8px; padding: 9px 11px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.code-row input:focus { outline: none; border-color: var(--brand); }

/* ---- Görüntüleyici (i.php) ---- */
.viewer { max-width: 900px; margin: 40px auto; }
.viewer-image { text-align: center; }
.viewer-image img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.viewer-meta { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--text-dim); font-size: 14px; margin-top: 16px; }
.viewer-meta a { color: var(--brand); }
.dot { color: var(--text-mute); }

/* ---- Toast ---- */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px);
    background: #10131c; border: 1px solid var(--border-2); color: var(--text);
    padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow); z-index: 60; opacity: 0; transition: .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok  { border-color: #22c55e55; }
.toast.err { border-color: #ef444455; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 24px 0; }
.site-footer .wrap { display: flex; align-items: center; gap: 8px; color: var(--text-mute); font-size: 13px; }

@media (max-width: 560px) {
    .hero { flex-direction: column; align-items: stretch; }
    .stats { width: 100%; }
    .stat { flex: 1; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
