/* ============================================================
   NewBe Transfer — Main Stylesheet
   Warm, minimal, modern. Accent: #c45e1a
   ============================================================ */

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

:root {
  --bg:        #f5f3ef;
  --bg-card:   #faf9f7;
  --bg-input:  #ffffff;
  --border:    #e2ddd6;
  --border-2:  #ccc7be;
  --text:      #1a1714;
  --text-2:    #6b6560;
  --text-3:    #9c958e;
  --accent:    #c45e1a;
  --accent-h:  #a84e16;
  --accent-bg: #f9ede5;
  --success:   #2d7a4f;
  --error:     #b91c1c;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── Header ── */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-title { font-weight: 600; font-size: 15px; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 13px; color: var(--text-2); }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-h); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary.btn-large { padding: 12px 32px; font-size: 15px; width: 100%; border-radius: var(--radius); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { background: var(--accent-bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--border-2); color: var(--text); }
.btn-small { padding: 4px 10px; font-size: 12px; }

/* ── Login Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 14px;
}
.modal-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.modal-box h2 { font-size: 20px; font-weight: 600; }
.modal-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text);
  outline: none;
  transition: border .15s;
}
.modal-box input:focus { border-color: var(--accent); }
.login-note { font-size: 12px; color: var(--text-3); text-align: center; }
.error-msg { background: #fef2f2; border: 1px solid #fca5a5; color: var(--error); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }

/* ── Main layout ── */
.main { max-width: 820px; margin: 0 auto; padding: 32px 24px 64px; }
.page-title { font-size: 22px; font-weight: 600; margin-bottom: 20px; }

/* ── Drop zone ── */
.upload-section { margin-bottom: 40px; }
.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.drop-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-icon { opacity: .7; }
.drop-text { font-size: 15px; color: var(--text-2); }
.file-label { color: var(--accent); cursor: pointer; text-decoration: underline; }
.drop-sub { font-size: 12px; color: var(--text-3); }

/* ── File list ── */
.file-list {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.file-item:last-child { border-bottom: none; }
.file-item-name { color: var(--text); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-3); margin-left: 12px; flex-shrink: 0; }
.file-item-remove { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 2px 6px; font-size: 16px; line-height: 1; margin-left: 8px; }
.file-item-remove:hover { color: var(--error); }

/* ── Upload options ── */
.upload-options {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.option-group { display: flex; flex-direction: column; gap: 6px; }
.option-group.full-width { grid-column: 1 / -1; }
.option-group label { font-size: 12px; font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.option-group input, .option-group select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  background: var(--bg-input);
  color: var(--text);
  outline: none;
  transition: border .15s;
}
.option-group input:focus, .option-group select:focus { border-color: var(--accent); }

/* ── Progress overlay ── */
.progress-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  backdrop-filter: blur(3px);
}
.progress-box {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: var(--shadow-md);
  min-width: 280px;
}
.progress-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); font-weight: 500; }
.progress-ring-wrap { position: relative; width: 140px; height: 140px; }
.progress-ring { width: 140px; height: 140px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border); stroke-width: 7; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset .4s ease;
}
.progress-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
}
#progress-percent { font-size: 26px; font-weight: 700; color: var(--text); }
.progress-files-count { font-size: 12px; color: var(--text-3); }
.progress-filename { font-size: 12px; color: var(--text-3); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Resultaat ── */
.result-section { margin-bottom: 32px; }
.result-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.result-icon { width: 52px; height: 52px; background: #dcfce7; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--success); }
.result-box h2 { font-size: 18px; font-weight: 600; }
.result-links { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.result-link-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}
.result-link-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.result-link-row { display: flex; gap: 8px; align-items: center; }
.result-link-url { flex: 1; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-copy { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; cursor: pointer; flex-shrink: 0; transition: all .15s; }
.btn-copy:hover { background: var(--accent); color: white; }

/* ── Transfers lijst ── */
.transfers-section { margin-top: 8px; }
.transfers-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.transfers-header h2 { font-size: 17px; font-weight: 600; }
.transfers-list { display: flex; flex-direction: column; gap: 8px; }
.loading-placeholder { color: var(--text-3); font-size: 13px; padding: 24px; text-align: center; }

.transfer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color .15s;
}
.transfer-card:hover { border-color: var(--border-2); }
.transfer-card-icon { font-size: 20px; flex-shrink: 0; }
.transfer-card-info { flex: 1; min-width: 0; }
.transfer-card-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-card-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.transfer-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.transfer-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-locked { background: var(--accent-bg); color: var(--accent); }
.badge-expired { background: #fef2f2; color: var(--error); }
.badge-active { background: #f0fdf4; color: var(--success); }
.empty-state { text-align: center; padding: 40px; color: var(--text-3); font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .main { padding: 20px 16px 48px; }
  .options-grid { grid-template-columns: 1fr; }
  .transfer-card { flex-wrap: wrap; }
  .transfer-card-actions { width: 100%; justify-content: flex-end; }
}
