:root {
  --jovi-orange: #ed7d13;
  --jovi-orange-dark: #bd5700;
  --jovi-ink: #171415;
  --jovi-paper: #f6f7f8;
  --jovi-border: #dedfe2;
  --jovi-muted: #656a72;
  --jovi-success: #147a4d;
  --jovi-danger: #a93824;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  background: var(--jovi-paper);
  color: var(--jovi-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  background: #111;
  border-bottom: 4px solid var(--jovi-orange);
}

.site-header .container-xl {
  padding-bottom: .7rem !important;
  padding-top: .7rem !important;
}

.brand img {
  display: block;
  width: min(165px, 42vw);
  height: auto;
}

.service-label,
.section-kicker {
  color: var(--jovi-orange);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.service-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.quick-connect,
.workspace {
  border-radius: 1rem;
  overflow: hidden;
}

.quick-connect { border-top: 5px solid var(--jovi-orange) !important; }

.form-label {
  color: #35383d;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.form-control,
.form-select {
  border-color: #bfc3c9;
  min-height: 2.65rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--jovi-orange);
  box-shadow: 0 0 0 .22rem rgba(237, 125, 19, .18);
}

.btn-jovi {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--jovi-orange);
  --bs-btn-border-color: var(--jovi-orange);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--jovi-orange-dark);
  --bs-btn-hover-border-color: var(--jovi-orange-dark);
  --bs-btn-focus-shadow-rgb: 237, 125, 19;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #9d4800;
  --bs-btn-active-border-color: #9d4800;
  font-weight: 700;
  min-height: 2.65rem;
}

.connection-note {
  border-left: 3px solid var(--jovi-orange);
  color: var(--jovi-muted);
  font-size: .875rem;
  line-height: 1.5;
  padding: .7rem .85rem;
  background: #fff8f0;
}

.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  padding: .55rem .7rem;
  white-space: nowrap;
}

.status-offline { background: #eff0f2; color: #575e67; }
.status-pending { background: #fff3dc; color: #875000; }
.status-online { background: #e2f5ea; color: #14613e; }

.workspace-header { background: #fff; border-bottom: 0; }
.workspace.is-locked { opacity: .76; }
.workspace.is-locked .card-body { pointer-events: none; }

.pathbar { background: #fbfbfc; }
.path-label { color: var(--jovi-muted); font-size: .73rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#breadcrumb { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; margin-top: .2rem; overflow-wrap: anywhere; }
.path-link { background: transparent; border: 0; color: #085c96; cursor: pointer; padding: 0; text-decoration: underline; }
.path-link:hover { color: #063d65; }
.path-separator { color: #90949a; padding: 0 .25rem; }
.path-current { color: #25282c; font-weight: 600; }

.drop-zone { min-height: 21rem; position: relative; }
.drop-zone.is-dragging { background: #fff6ea; outline: 3px dashed var(--jovi-orange); outline-offset: -8px; }
.empty-state { align-items: center; color: var(--jovi-muted); display: flex; flex-direction: column; justify-content: center; min-height: 21rem; padding: 2rem; text-align: center; }
.empty-state h3 { color: #34383d; }

.table { --bs-table-bg: transparent; }
.table thead th { background: #f6f7f8; border-bottom-width: 1px; color: #626872; font-size: .75rem; letter-spacing: .05em; padding: .85rem 1rem; text-transform: uppercase; }
.table td { padding: .8rem 1rem; }
.file-entry { align-items: center; display: flex; gap: .65rem; min-width: 0; }
.file-name-button { background: transparent; border: 0; color: #124e75; font-weight: 650; padding: 0; text-align: left; text-decoration: none; }
.file-name-button:hover { color: #092d48; text-decoration: underline; }
.file-name-file { color: #31353a; font-weight: 600; overflow-wrap: anywhere; }
.folder-up-link { align-items: center; display: inline-flex; gap: .5rem; }
.ui-icon { display: inline-flex; flex: 0 0 auto; }
.ui-icon svg { fill: none; height: 1.15rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 1.15rem; }
.item-icon { align-items: center; border-radius: .55rem; display: inline-flex; height: 2rem; justify-content: center; width: 2rem; }
.item-icon svg { height: 1.2rem; width: 1.2rem; }
.item-icon-folder { background: #fff1de; color: #bd5700; }
.item-icon-file { background: #eef2f5; color: #59636f; }
.file-actions { align-items: center; display: inline-flex; gap: .3rem; justify-content: flex-end; white-space: nowrap; }
.file-action { align-items: center; background: #f5f7f8; border: 1px solid #d8dde2; border-radius: .5rem; color: #4e5965; display: inline-flex; height: 2rem; justify-content: center; padding: .35rem; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; width: 2rem; }
.file-action:hover { background: #e9eef2; border-color: #b8c1ca; color: #18212a; transform: translateY(-1px); }
.file-action:focus-visible { box-shadow: 0 0 0 .22rem rgba(237, 125, 19, .22); outline: 0; }
.file-action.delete { background: #fff4f2; border-color: #f1cbc4; color: var(--jovi-danger); }
.file-action.delete:hover { background: #fde6e1; border-color: #d98f82; color: #7d2518; }

.site-footer { border-top: 1px solid var(--jovi-border); color: var(--jovi-muted); font-size: .8rem; margin-top: 2rem; }

.folder-dialog { border: 0; border-radius: .85rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.25); max-width: min(460px, calc(100vw - 2rem)); padding: 0; width: 100%; }
.folder-dialog::backdrop { background: rgba(0,0,0,.5); }
.folder-dialog form { padding: 1.35rem; }
.dialog-heading { border-bottom: 1px solid var(--jovi-border); padding-bottom: 1rem; }

.alert { border: 0; border-left: 4px solid; box-shadow: 0 .25rem .85rem rgba(0,0,0,.08); }
.alert-danger { border-left-color: var(--jovi-danger); }
.alert-success { border-left-color: var(--jovi-success); }
.alert-warning { border-left-color: var(--jovi-orange); }
.upload-progress-alert { background: #fff8f0; border-left-color: var(--jovi-orange); color: #4d381f; }
.upload-progress-content { display: grid; gap: .65rem; }
.upload-progress-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.upload-progress-heading > div { display: grid; gap: .16rem; min-width: 0; }
.upload-progress-heading span { color: #6f6257; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress-percent { color: var(--jovi-orange-dark); font-variant-numeric: tabular-nums; }
.upload-progress-track { background: #f4dac0; border-radius: 999px; height: .6rem; overflow: hidden; }
.upload-progress-bar { background: linear-gradient(90deg, var(--jovi-orange), #f5a148); border-radius: inherit; height: 100%; min-width: .35rem; transition: width .18s ease; }

@media (max-width: 575.98px) {
  .brand img { width: 140px; }
  .service-title { font-size: 1rem; }
  .site-header .container-xl { padding-bottom: .6rem !important; padding-top: .6rem !important; }
  .table td, .table thead th { padding-left: .75rem; padding-right: .75rem; }
  .upload-progress-heading span { white-space: normal; }
}
