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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #eef0f3;
  color: #1a1a2e;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEADER */
header {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: white;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 1.6rem;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.subtitle {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-left: 0.5rem;
}

/* MAIN LAYOUT */
main {
  display: flex;
  flex: 1;
  gap: 0;
  padding: 1rem;
  overflow: hidden;
}

/* PANEL */
.panel {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  gap: 0.6rem;
  background: #fafafa;
  border-radius: 12px 12px 0 0;
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-placeholder {
  display: flex;
  align-items: center;
}

.panel-label {
  font-size: 0.9rem;
  color: #888;
  font-weight: 500;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.account-details {
  min-width: 0;
}

.account-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-email {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* BUTTONS */
.btn {
  padding: 0.35rem 0.85rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: #0078d4;
  color: white;
}

.btn-primary:hover {
  background: #005a9e;
}

.btn-danger {
  background: transparent;
  color: #c42b2b;
  border: 1px solid #c42b2b;
}

.btn-danger:hover {
  background: #c42b2b;
  color: white;
}

/* BREADCRUMB */
.breadcrumb {
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: #666;
  background: #f5f6f8;
  border-bottom: 1px solid #ebebeb;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
  min-height: 30px;
  overflow: hidden;
}

.breadcrumb:empty {
  display: none;
}

.back-btn {
  background: none;
  border: none;
  color: #0078d4;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.back-btn:hover {
  background: #e8f3fd;
}

.crumb-sep {
  color: #ccc;
}

.crumb-item {
  color: #0078d4;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb-item:hover {
  background: #e8f3fd;
}

.crumb-current {
  color: #444;
  font-weight: 500;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FILE LIST */
.file-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem;
  transition: background 0.2s, outline 0.2s;
}

.file-list.drag-over {
  background: #deeffe;
  outline: 3px dashed #0078d4;
  outline-offset: -3px;
  border-radius: 0 0 12px 12px;
}

/* FILE ITEM */
.file-item {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  gap: 0.65rem;
  user-select: none;
  transition: background 0.12s;
  cursor: default;
}

.file-item:hover {
  background: #f4f6f9;
}

.file-item.is-folder {
  cursor: pointer;
}

.file-item[draggable="true"] {
  cursor: grab;
}

.file-item[draggable="true"]:active {
  cursor: grabbing;
}

.file-item.dragging {
  opacity: 0.35;
  background: #f0f0f0;
}

.file-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a2e;
}

.file-meta {
  display: block;
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 1px;
}

/* EMPTY / LOADING */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1rem;
  color: #bbb;
  font-size: 0.88rem;
}

.empty-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

.empty-state.error {
  color: #c42b2b;
}

.loading {
  text-align: center;
  padding: 2.5rem;
  color: #aaa;
  font-size: 0.875rem;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #0078d4;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* DIVIDER */
.divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  flex-shrink: 0;
  gap: 0.4rem;
}

.transfer-icon {
  font-size: 1.4rem;
  color: #0078d4;
  background: white;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,120,212,0.2);
}

.divider-hint {
  font-size: 0.65rem;
  color: #bbb;
  text-align: center;
  line-height: 1.3;
}

/* OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.overlay-card {
  background: white;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  min-width: 240px;
}

.overlay-card p {
  font-size: 0.9rem;
  color: #444;
  text-align: center;
  max-width: 280px;
  word-break: break-all;
}

.progress-track {
  width: 260px;
  height: 10px;
  background: #e8f0fe;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0078d4, #005a9e);
  border-radius: 5px;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
  font-weight: 600;
  min-width: 2rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e8f3fd;
  border-top-color: #0078d4;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e;
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  pointer-events: none;
  max-width: 420px;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { background: #107c10; }
.toast.error   { background: #c42b2b; }
.toast.info    { background: #0078d4; }

/* SELECTION BAR */
.selection-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: #eaf4fe;
  border-top: 1px solid #b8d9f5;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
}

.sel-all {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
}

.sel-all input[type="checkbox"] {
  cursor: pointer;
  accent-color: #0078d4;
  width: 14px;
  height: 14px;
}

.sel-count {
  font-size: 0.8rem;
  color: #555;
  flex: 1;
  white-space: nowrap;
}

.btn-transfer {
  background: #0078d4;
  color: white;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  white-space: nowrap;
}

.btn-transfer:hover {
  background: #005a9e;
}

.btn-clear {
  background: transparent;
  color: #888;
  border: 1px solid #ccc;
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
}

.btn-clear:hover {
  background: #f0f0f0;
  color: #333;
}

/* FILE ITEM - seçim durumu */
.file-item .checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #0078d4;
  cursor: pointer;
  margin-right: 0.1rem;
}

.file-item.selected {
  background: #deeffe;
}

.file-item.selected:hover {
  background: #cce6fc;
}

/* SCROLLBAR */
.file-list::-webkit-scrollbar { width: 5px; }
.file-list::-webkit-scrollbar-track { background: transparent; }
.file-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.file-list::-webkit-scrollbar-thumb:hover { background: #ccc; }
