@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #FCFBF8;
  --surface: #FFFFFF;
  --surface-muted: #F1EFEA;
  --navy: #0F223D;
  --navy-deep: #0B1D3A;
  --navy-hover: #18345C;
  --text: #0F1C2E;
  --muted: #5A6B87;
  --gold: #C69D53;
  --gold-hover: #B58B41;
  --gold-soft: rgba(198, 157, 83, 0.14);
  --border: #DAE0E8;
  --border-strong: #B8C4D4;
  --emerald: #0F766E;
  --emerald-bg: rgba(15, 118, 110, 0.1);
  --amber: #B45309;
  --amber-bg: rgba(180, 83, 9, 0.1);
  --red: #B91C1C;
  --red-bg: rgba(185, 28, 28, 0.08);
  --radius: 4px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 34, 61, 0.05);
  --shadow-md: 0 6px 20px -4px rgba(15, 34, 61, 0.08), 0 2px 6px -2px rgba(15, 34, 61, 0.04);
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  background: var(--navy);
  color: #FCFBF8;
  border-bottom: 1px solid rgba(198, 157, 83, 0.35);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.brand-sub {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid rgba(252, 251, 248, 0.22);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill {
  font-size: 12px;
  color: rgba(252, 251, 248, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 5px 10px;
}

.storage-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 12px;
  color: rgba(252, 251, 248, 0.85);
}

.storage-bar {
  width: 54px;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  overflow: hidden;
}

.storage-bar > span {
  display: block;
  height: 100%;
  background: var(--gold);
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-hover);
  margin-bottom: 10px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy);
  color: #FCFBF8;
  border-color: var(--navy);
}
.btn-primary:hover:not(:disabled) {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--navy);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: var(--navy);
}

.btn-nav-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(198, 157, 83, 0.55);
  color: #FCFBF8;
  min-height: 34px;
  padding: 6px 13px;
  font-size: 13px;
}
.btn-nav-ghost:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

.btn-danger {
  background: var(--red-bg);
  border-color: rgba(185, 28, 28, 0.35);
  color: var(--red);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.16);
}

.btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12.5px;
}

.btn-cta {
  background: var(--gold);
  color: var(--navy-deep);
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}
.btn-cta:hover { background: var(--gold-hover); }

/* Layout */
.container {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.center-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 18px 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.login-card {
  width: 100%;
  max-width: 440px;
}

.public-card {
  width: 100%;
  max-width: 680px;
}

/* Quick Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.share-bar-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius);
}

/* Forms */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.field-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.input, .textarea, .select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 44px;
  font-size: max(1rem, 1em);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--navy);
  background: var(--surface);
}

:is(.input, .textarea, .select):user-invalid {
  border-color: var(--red);
  background: #FEF2F2;
}

.textarea {
  resize: vertical;
  min-height: 82px;
}

.otp-input {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 12px 14px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--navy);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 16px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--navy);
  color: #FCFBF8;
}

.tab:hover:not(.active) {
  color: var(--navy);
  background: var(--surface-muted);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 16px;
}

.dropzone:hover {
  border-color: var(--gold-hover);
  background: rgba(198, 157, 83, 0.05);
}

.dropzone.dragover {
  border-color: var(--navy);
  background: rgba(15, 34, 61, 0.06);
}

.dropzone-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--muted);
}

/* Queued / File Rows */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13.5px;
}

.file-name {
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.file-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Progress */
.progress-wrap {
  margin: 14px 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--navy);
  transition: width 0.12s linear;
}

/* Transfer Cards */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
  flex-wrap: wrap;
}

.filter-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.transfer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.t-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.t-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.t-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
  line-height: 1.2;
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
}

.badge-navy { background: rgba(15, 34, 61, 0.1); color: var(--navy); }
.badge-emerald { background: var(--emerald-bg); color: var(--emerald); }
.badge-gold { background: var(--gold-soft); color: #8A6522; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--navy);
}

.link-box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  user-select: all;
}

.link-url-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.link-url-btn:hover { color: var(--gold-hover); }

.link-url-btn .link-url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
}

.slug-edit-hint {
  flex: 0 0 auto !important;
  font-size: 12px;
  color: var(--muted);
}

.slug-edit-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex-wrap: wrap;
}

.slug-prefix {
  flex: 0 0 auto !important;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  user-select: none;
}

.slug-input {
  flex: 1;
  min-width: 110px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

.slug-input.is-invalid { border-color: var(--red); background: #FEF2F2; }
.slug-input.is-valid { border-color: var(--emerald); }

.slug-feedback {
  font-size: 12px;
  margin-top: -4px;
  padding: 0 2px;
}
.slug-feedback.ok { color: var(--emerald); }
.slug-feedback.err { color: var(--red); }

.modal-dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  cursor: pointer;
}
.modal-dropzone.dragover {
  border-color: var(--navy);
  background: rgba(15, 34, 61, 0.05);
}

.t-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Native Dialog Modal */
dialog.v-dialog {
  margin: auto;
  width: calc(100% - 28px);
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(11, 29, 58, 0.35);
}

dialog.v-dialog.v-dialog-wide {
  max-width: 920px;
}

dialog.v-dialog::backdrop {
  background: rgba(11, 29, 58, 0.62);
  backdrop-filter: blur(2px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(252, 251, 248, 0.72);
  border-top: 1px solid rgba(198, 157, 83, 0.35);
  padding: 20px 24px;
  font-size: 13px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: #FCFBF8;
}

.footer-brand span {
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--gold);
}

/* Toast & Helpers */
.toast {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 60;
  background: var(--navy);
  border: 1px solid var(--gold);
  color: #FCFBF8;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(11, 29, 58, 0.32);
}

.visually-hidden {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error-text { color: var(--red); font-size: 13px; font-weight: 500; margin-top: 8px; }
.success-text { color: var(--emerald); font-size: 13px; font-weight: 500; margin-top: 8px; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .storage-pill, .brand-sub { display: none; }
  .topbar { padding: 10px 14px; }
  .container { padding: 20px 14px 48px; }
  .card { padding: 20px 16px; }
}
