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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #eef1f6;
  color: #1c2536;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ---- İnce animasyonlar ---- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  0% { transform: scale(0.94); opacity: 0; }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
.card { animation: riseIn 0.35s ease-out; }
.success-panel { animation: popIn 0.3s ease-out; }
#file-list .file-line { animation: fadeIn 0.25s ease-out; }
.activity-item, .share-row { animation: fadeIn 0.2s ease-out; }
button.primary, button.secondary { transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease; }
button.primary:hover, button.secondary:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(16, 24, 40, 0.12); }
button:active { transform: translateY(0); }
.panel-tab { transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.panel-tab:hover { color: #1b7dfc; }
.dz-icon { transition: transform 0.15s ease; }
.dropzone:hover .dz-icon { transform: translateY(-2px); }
table tbody tr { transition: background 0.12s ease; }
table tbody tr:hover td { background: #f8fafd; }
.badge-new { animation: fadeIn 0.4s ease-out; }

/* ---- Üst bar ---- */
header {
  background: #fff;
  border-bottom: 1px solid #e4e8f0;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1b7dfc);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.brand strong { display: block; font-size: 16px; }
.brand small { color: #7a869a; font-size: 12px; }

.lang-dropdown {
  position: relative;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #d4dbe8;
  border-radius: 7px;
  font-size: 11px;
  font-family: inherit;
  background: #fff;
  color: #1c2536;
  cursor: pointer;
}
.lang-trigger:hover { border-color: #1b7dfc; }
.lang-trigger:focus { outline: 2px solid #1b7dfc; border-color: transparent; }
.lang-flag { display: inline-flex; align-items: center; line-height: 1; font-size: 16px; }
.lang-chevron { color: #7a869a; flex-shrink: 0; }
.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
  overflow: hidden;
  z-index: 20;
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #1c2536;
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.lang-menu button:hover { background: #f0f4fa; }
.lang-menu button:focus { outline: none; background: #eef4ff; }
.lang-menu .lang-flag { font-size: 16px; }

/* ---- Ana içerik ---- */
main {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

.card {
  background: #f2f5f9;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 16px rgba(16, 24, 40, 0.05);
  padding: 14px;
}

/* ---- Gönderim formu: daha kompakt ---- */
.send-card {
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 10px;
}
.send-card .send-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 2px;
}
.send-card .send-head h2 { margin-bottom: 0; }
.send-card .send-head .hint { margin-bottom: 0; }
.send-card .send-head .lang-select { margin-left: auto; }
.send-card #send-form .form-grid.gone { gap: 6px; margin-top: 4px; }
.send-card .dropzone { padding: 6px 6px; }
.send-card textarea { min-height: auto; }

h2 { font-size: 14px; margin-bottom: 2px; }
.hint { color: #7a869a; font-size: 11px; margin-bottom: 6px; }
.opt { color: #9aa5b6; font-weight: 400; font-size: 11px; }

@keyframes dashFlow {
  0% { border-color: #c6cfdd; }
  25% { border-color: #7fb3ff; }
  50% { border-color: #9fb6d9; }
  75% { border-color: #7fb3ff; }
  100% { border-color: #c6cfdd; }
}

/* ---- Bırakma alanı ---- */
.dropzone {
  border: 2px dashed #c6cfdd;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  color: #64748b;
  cursor: pointer;
  background: #fafbfd;
  animation: dashFlow 8s ease-in-out infinite;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { background: #f7f9ff; }
.dropzone.dragging { border-color: #1b7dfc; background: #edf5ff; animation-play-state: paused; }
.dz-icon { color: #2b7ef7; margin-bottom: 2px; }
.dz-icon svg { width: 26px; height: 26px; }
.dz-title { font-size: 11px; color: #47546b; line-height: 1.3; }
.dz-title .link-like { color: #1b7dfc; text-decoration: underline; font-weight: 600; }
.dz-drag-size { display: block; margin-top: 6px; font-size: 11px; color: #1b7dfc; font-weight: 600; }
.dz-limit { margin-top: 4px; font-size: 10px; color: #97a1b3; }

/* ---- Kare kod + araç ipucu ---- */
.dz-qr {
  position: relative;
  display: inline-block;
  margin-top: 8px;
  cursor: pointer;
}
.dz-qr img {
  width: 80px;
  height: 80px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  display: block;
}
/* ---- Kare kod tarama animasyonu ---- */
.dz-qr-frame {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 8px;
}
.dz-qr-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -32%;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(27, 125, 252, 0),
    rgba(27, 125, 252, 0.55),
    rgba(120, 210, 255, 0.95),
    rgba(27, 125, 252, 0.55),
    rgba(27, 125, 252, 0)
  );
  box-shadow: 0 0 10px 2px rgba(27, 125, 252, 0.55);
  animation: dzQrScan 2.6s linear infinite;
}
@keyframes dzQrScan {
  0% { top: -32%; }
  100% { top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-qr-scan { animation: none; display: none; }
}
.dz-qr-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #1c2536;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 240px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 6;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.2);
}
.dz-qr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1c2536;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 6;
}
.dz-qr:hover .dz-qr-tip,
.dz-qr:focus-within .dz-qr-tip,
.dz-qr:hover::after,
.dz-qr:focus-within::after { opacity: 1; }

/* ---- Seçili dosyalar ---- */
.selected-panel {
  background: #f6f8fc;
  border: 1px solid #e7ebf3;
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 8px;
  margin-bottom: 2px;
}
.selected-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #47546b;
  margin-bottom: 4px;
}
.file-list { max-height: 150px; overflow-y: auto; }
.file-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dashed #e3e8f0;
  font-size: 12px;
}
.file-line:last-child { border-bottom: none; }
.f-icon { color: #8b94a5; flex: 0 0 auto; }
.f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #33415a; }
.f-size { color: #97a1b3; font-size: 11px; flex: 0 0 auto; }
.file-more { padding: 5px 0; font-size: 11px; color: #97a1b3; }

/* ---- Form ---- */
.form-grid { margin-top: 6px; display: grid; gap: 6px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #47546b;
  margin-bottom: 2px;
}
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d4dbe8;
  border-radius: 7px;
  font-size: 11px;
  font-family: inherit;
  background: #fff;
  color: #1c2536;
}
textarea { resize: vertical; }
input:focus,
textarea:focus { outline: 2px solid #1b7dfc; border-color: transparent; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }
.pw-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #1b7dfc;
  border: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 8px;
  width: auto;
  border-radius: 7px;
}
.pw-toggle:hover { background: #eef4ff; }

.folder-row { margin: 6px 0 4px; display: flex; align-items: center; }

/* ---- Butonlar ---- */
button {
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: inherit;
  padding: 5px 9px;
  font-family: inherit;
}
button.primary { background: #1b7dfc; color: #fff; }
button.primary:hover { background: #0f6ce6; }
button.secondary { background: #eef2fa; color: #2b52c9; width: auto; }
button.secondary:hover { background: #e2e9f8; }
button.ghost { background: transparent; color: #7a869a; width: auto; }
button.ghost:hover { color: #1c2536; }
button.small { font-size: 10px; padding: 5px 8px; border-radius: 6px; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-send {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  border-radius: 8px;
  margin-top: 7px;
}

/* ---- Panel içi sekme (Gönder / Gelen) ---- */
.panel-tabs {
  display: flex;
  gap: 4px;
  background: #eef1f6;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 12px;
  align-items: center;
}
.tab-with-pin {
  display: flex;
  flex: 1;
  gap: 2px;
  align-items: center;
}
.panel-tab {
  flex: 1;
  padding: 5px;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.panel-tab.active {
  background: #fff;
  color: #1b7dfc;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.pin-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa5b6;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pin-btn:hover {
  background: #e2e8f0;
  color: #1b7dfc;
}
.pin-btn.pinned {
  color: #1b7dfc;
  background: #eef4ff;
}
.pin-btn.pinned:hover {
  background: #dbe9ff;
  color: #0f6ce6;
}
.panel-tab-sep {
  color: #9aa5b6;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  padding: 0 4px;
  line-height: 1;
}

/* ---- Gelen paneli ---- */
.inbox-browse {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.inbox-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
button.secondary.danger,
button.ghost.danger {
  color: #c62828;
  background: #fdecec;
}
button.secondary.danger:hover { background: #fad5d5; }
button.ghost.danger { background: transparent; color: #c62828; }
.inbox-browse label {
  font-size: 13px;
  font-weight: 600;
  color: #47546b;
}
.inbox-browse input {
  flex: 1;
  min-width: 160px;
}
.inbox-browse button { width: auto; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e7ebf3;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: #7a869a;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px;
  border-bottom: 1px solid #e7ebf3;
  background: #f8fafd;
}
td {
  padding: 7px;
  border-bottom: 1px solid #eef1f6;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
td.empty { text-align: center; color: #9aa5b6; padding: 26px; }
td.actions { white-space: nowrap; text-align: right; }
td.name { min-width: 110px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.msg { max-width: 170px; }
td.msg .cell-message { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.msg:hover .cell-message { white-space: normal; overflow-wrap: anywhere; }
td.size { white-space: nowrap; }
td a.download,
td a.action {
  color: #1b7dfc;
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
}
td a.download:hover,
td a.action:hover { text-decoration: underline; }
td a.action.danger { color: #c62828; }
td.cell-name { word-break: break-all; min-width: 160px; }
td.cell-message { color: #64748b; font-size: 12px; max-width: 180px; }

.badge-new,
.badge-lock,
.badge-msg {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.badge-new { background: #e8f8ef; color: #16a34a; border: 1px solid #b4e6c8; }
.badge-lock { background: #eef2fa; color: #47546b; border: 1px solid #d4dbe8; }
.badge-msg { background: #fff7df; color: #94690c; border: 1px solid #f1dfa8; cursor: help; }

/* ---- İlerleme ---- */
.progress { margin: 14px 0 4px; }
.progress.hidden { display: none; }
.progress-bar-shell {
  background: #eef1f6;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: #1b7dfc;
  border-radius: 999px;
  transition: width 0.2s;
}
.progress span {
  display: block;
  font-size: 12px;
  color: #7a869a;
  margin-top: 6px;
}

.error { color: #c62828; font-size: 13px; margin-top: 12px; min-height: 1em; }
.success { color: #1e7d46; font-size: 13px; margin-top: 12px; }

/* ---- Başarı ekranı ---- */
.success-panel { text-align: center; padding: 10px 0; }
.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f8ef;
  color: #16a34a;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.success-panel h2 { margin-bottom: 4px; }

.share-links {
  text-align: left;
  margin: 18px 0;
  border-top: 1px solid #eef1f6;
}
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid #eef1f6;
}
.share-name { min-width: 0; }
.share-name strong {
  display: block;
  font-size: 14px;
  color: #33415a;
  word-break: break-all;
}
.share-name span { font-size: 12px; color: #97a1b3; }
.copy-link { flex: 0 0 auto; }

.qr-area {
  width: 13cm;
  height: 7cm;
  max-width: 100%;
  margin: 14px auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
}
.qr-area img {
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  padding: 6px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #fff;
}
.qr-area span { display: block; font-size: 12px; color: #97a1b3; }

.form-total {
  margin-top: 14px;
  text-align: center;
  color: #7a869a;
  font-size: 12px;
  font-weight: 600;
}

.form-note {
  margin-top: 4px;
  text-align: center;
  color: #9aa5b6;
  font-size: 11px;
}

.form-credit {
  margin-top: 4px;
  text-align: center;
  color: #9aa5b6;
  font-size: 11px;
}

footer {
  text-align: center;
  color: #9aa5b6;
  font-size: 12px;
  padding: 20px;
}

@media (max-width: 520px) {
  .card { padding: 14px; }
  .dropzone { padding: 22px 12px; }
  .share-row { flex-direction: column; align-items: stretch; text-align: center; }
  .copy-link { width: 100%; }
}