/* ══════════════════════════════════════════════════════════════
   ATAMA BİLDİRİM — Ortak tema (dosyalar.php + admin paneli)
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg-deep: #070512;
  --bg-section: #0c0824;
  --bg-elevated: #110c30;
  --surface: rgba(255, 255, 255, .05);
  --glass: rgba(255, 255, 255, .055);
  --glass-border: rgba(255, 255, 255, .11);
  --glass-border-hi: rgba(255, 255, 255, .22);
  --text-primary: #f4f3fb;
  --text-secondary: rgba(244, 243, 251, .62);
  --text-tertiary: rgba(244, 243, 251, .42);
  --accent-1: #7c5cfc;
  --accent-2: #00d4aa;
  --accent-3: #ff6b9d;
  --accent-4: #ffb547;
  --danger: #ff5f6d;
  --gradient-accent: linear-gradient(135deg, #7c5cfc 0%, #00d4aa 100%);
  --gradient-text: linear-gradient(120deg, #a78bfa 0%, #34e3c0 55%, #7dd3fc 100%);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 92, 252, .30), transparent 60%),
    radial-gradient(760px 460px at 92% 4%, rgba(0, 212, 170, .17), transparent 58%);
}

body > * { position: relative; z-index: 1; }

::selection { background: rgba(124, 92, 252, .4); color: #fff; }

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070512; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 252, .35); border-radius: 10px; border: 2px solid #070512; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

.grad-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Üst bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 5, 18, .82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-brand img { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.tb-brand b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-brand small { display: block; font-size: 11px; color: var(--text-tertiary); font-weight: 600; margin-top: 1px; }

.tb-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Butonlar ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--radius-md);
  font-family: inherit; font-size: 14px; font-weight: 700;
  border: 1px solid var(--glass-border); background: var(--surface);
  color: var(--text-primary); cursor: pointer;
  transition: all .25s var(--ease); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--glass-border-hi); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gradient-accent); color: #07051a; border-color: transparent; box-shadow: 0 8px 22px rgba(124, 92, 252, .28); }
.btn-primary:hover { background: var(--gradient-accent); box-shadow: 0 12px 30px rgba(124, 92, 252, .4); }
.btn-danger { color: #ffb4bb; border-color: rgba(255, 95, 109, .3); background: rgba(255, 95, 109, .1); }
.btn-danger:hover { background: rgba(255, 95, 109, .2); border-color: rgba(255, 95, 109, .5); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── Sayfa başlığı ────────────────────────────────────────── */
.page-head { padding: 44px 0 30px; text-align: center; }
.page-head .overline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--glass-border);
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px;
}
.page-head h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 900; letter-spacing: -1.2px; line-height: 1.15; margin-bottom: 12px; }
.page-head p { font-size: 15px; color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ── Kartlar / paneller ───────────────────────────────────── */
.card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); backdrop-filter: blur(12px);
  padding: 22px; box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.card-head p { font-size: 13px; color: var(--text-tertiary); margin-top: 3px; }

/* ── Arama ────────────────────────────────────────────────── */
.searchbar { position: relative; max-width: 460px; margin: 0 auto 28px; }
.searchbar input {
  width: 100%; padding: 14px 16px 14px 44px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-primary); font-family: inherit; font-size: 15px;
  transition: border-color .25s, background .25s;
}
.searchbar input::placeholder { color: var(--text-tertiary); }
.searchbar input:focus { outline: none; border-color: rgba(124, 92, 252, .5); background: rgba(124, 92, 252, .07); }
.searchbar .si { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .55; }

/* ── Klasör ızgarası ──────────────────────────────────────── */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.folder-card {
  display: block; padding: 22px 20px; border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(12px); transition: all .35s var(--ease);
  position: relative; overflow: hidden;
}
.folder-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-accent); opacity: 0; transition: opacity .35s;
}
.folder-card:hover { transform: translateY(-5px); border-color: var(--glass-border-hi); box-shadow: 0 20px 50px rgba(124, 92, 252, .18); }
.folder-card:hover::before { opacity: 1; }

.fc-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 25px; margin-bottom: 15px;
  background: rgba(124, 92, 252, .16); border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 0 24px rgba(124, 92, 252, .2);
}
.folder-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 6px; }
.folder-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px; }
.fc-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-tertiary); font-weight: 600; }
.fc-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ── Dosya listesi ────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 10px; }

.file-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border); background: var(--glass);
  transition: all .28s var(--ease);
}
.file-row:hover { border-color: var(--glass-border-hi); background: rgba(255, 255, 255, .085); transform: translateX(3px); }

.fr-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 21px; flex-shrink: 0;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.fr-info { flex: 1; min-width: 0; }
.fr-info strong { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-tertiary); margin-top: 4px; font-weight: 600; }
.fr-actions { display: flex; gap: 7px; flex-shrink: 0; }

.fr-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

.file-row.open {
  border-color: rgba(124, 92, 252, .45);
  background: rgba(124, 92, 252, .1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: -10px;
}

/* ── Dosya düzenleme paneli ───────────────────────────────── */
.file-editor {
  border: 1px solid rgba(124, 92, 252, .45);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(124, 92, 252, .07);
  padding: 18px 16px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

.name-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.name-row .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.ext-tag {
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--glass-border);
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, .07);
  color: var(--text-tertiary);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.props {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, .22);
  padding: 14px;
}

.props-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.prop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: 12.5px;
}

.prop:last-child { border-bottom: 0; }

.prop span { color: var(--text-tertiary); flex-shrink: 0; }

.prop b {
  color: var(--text-secondary);
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.prop b.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.badge.green { background: rgba(0, 212, 170, .14); border-color: rgba(0, 212, 170, .3); color: var(--accent-2); }
.badge.purple { background: rgba(124, 92, 252, .16); border-color: rgba(124, 92, 252, .32); color: #b9a5ff; }
.badge.amber { background: rgba(255, 181, 71, .14); border-color: rgba(255, 181, 71, .3); color: var(--accent-4); }
.badge.red { background: rgba(255, 95, 109, .14); border-color: rgba(255, 95, 109, .3); color: #ffb4bb; }

/* ── Boş durum ────────────────────────────────────────────── */
.empty { text-align: center; padding: 54px 20px; }
.empty .e-emoji { font-size: 44px; margin-bottom: 14px; opacity: .8; }
.empty h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.empty p { font-size: 14px; color: var(--text-secondary); max-width: 380px; margin: 0 auto; line-height: 1.7; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-tertiary); margin-bottom: 20px; font-weight: 600; flex-wrap: wrap; }
.crumb a { color: var(--text-secondary); transition: color .2s; }
.crumb a:hover { color: var(--accent-2); }

/* ── Formlar ──────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 7px; letter-spacing: .2px; }
.field .hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; line-height: 1.5; }

.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-border);
  color: var(--text-primary); font-family: inherit; font-size: 15px;
  transition: border-color .25s, background .25s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: rgba(124, 92, 252, .55); background: rgba(124, 92, 252, .07); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; padding-right: 38px; }
.select option { background: #14103a; color: #f4f3fb; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Dropzone ─────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--glass-border-hi); border-radius: var(--radius-xl);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: all .3s var(--ease); background: rgba(255, 255, 255, .025);
}
.dropzone:hover, .dropzone.over { border-color: var(--accent-1); background: rgba(124, 92, 252, .1); }
.dropzone .dz-emoji { font-size: 36px; margin-bottom: 12px; }
.dropzone strong { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 6px; }
.dropzone span { font-size: 13px; color: var(--text-tertiary); }
.dz-files { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; text-align: left; }
.dz-file { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 13px; }
.dz-file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-file b { font-size: 11.5px; color: var(--text-tertiary); font-weight: 600; }

/* ── İstatistik kutuları ──────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-box { padding: 18px 16px; border-radius: var(--radius-lg); background: var(--glass); border: 1px solid var(--glass-border); }
.stat-box .sb-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); margin-bottom: 8px; }
.stat-box .sb-value { font-size: 24px; font-weight: 900; letter-spacing: -.8px; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-box .sb-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 5px; font-weight: 600; }

.meter { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--gradient-accent); transition: width .6s var(--ease); }
.meter.warn i { background: linear-gradient(135deg, #ffb547, #ff6b9d); }
.meter.crit i { background: linear-gradient(135deg, #ff5f6d, #ff2d55); }

/* ── Uyarılar ─────────────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; margin-bottom: 16px; line-height: 1.55; border: 1px solid; }
.alert.ok { background: rgba(0, 212, 170, .12); border-color: rgba(0, 212, 170, .34); color: #7cf0d5; }
.alert.err { background: rgba(255, 95, 109, .12); border-color: rgba(255, 95, 109, .34); color: #ffb4bb; }
.alert.info { background: rgba(124, 92, 252, .12); border-color: rgba(124, 92, 252, .34); color: #c3b2ff; }

/* ── Ortalanmış sayfa (giriş / hata) ──────────────────────── */
.center-page { display: grid; place-items: center; padding: 24px; min-height: 100vh; }
.msg-box, .login-box {
  width: 100%; max-width: 420px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 34px 28px;
  backdrop-filter: blur(14px); box-shadow: var(--shadow-card);
}
.msg-box .msg-emoji, .login-box .lb-emoji { font-size: 40px; margin-bottom: 14px; }
.msg-box h1, .login-box h1 { font-size: 22px; font-weight: 900; letter-spacing: -.6px; margin-bottom: 10px; }
.msg-box p, .login-box > p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 22px; }
.login-box form { text-align: left; }

/* ── Alt bilgi ────────────────────────────────────────────── */
.foot { text-align: center; padding: 40px 18px 34px; font-size: 12.5px; color: var(--text-tertiary); line-height: 1.8; }
.foot a { color: var(--text-secondary); }
.foot a:hover { color: var(--accent-2); }

/* ── Sekmeler ─────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 16px; border-radius: 11px; font-size: 14px; font-weight: 700;
  border: 1px solid transparent; color: var(--text-secondary);
  background: none; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .25s var(--ease);
}
.tab:hover { background: var(--surface); color: var(--text-primary); }
.tab.active { background: rgba(124, 92, 252, .18); border-color: rgba(124, 92, 252, .38); color: #c3b2ff; }

/* ══════════════════════════════════════════════════════════
   MOBİL
   ══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  .page-head { padding: 30px 0 22px; }
  .card { padding: 17px 15px; border-radius: 18px; }
  .folder-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .tb-brand small { display: none; }
  .file-row { padding: 12px 13px; gap: 11px; }
  .fr-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 11px; }
  .fr-info strong { font-size: 14px; white-space: normal; }
  .fr-actions .btn:not(.btn-primary) span { display: none; }
  .fr-actions .btn:not(.btn-primary) { padding: 9px 11px; }
  .file-editor { grid-template-columns: 1fr; gap: 16px; padding: 15px 13px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dropzone { padding: 26px 14px; }
  .card-head { margin-bottom: 14px; }
}

@media (max-width: 400px) {
  .tb-brand b { font-size: 14px; }
  .btn { padding: 9px 13px; font-size: 13.5px; }
  .stat-box .sb-value { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
