:root {
  --irm-navy:     #061626;
  --irm-blue:     #1b75bc;
  --irm-blue-dark:#14477d;
  --irm-magenta:  #a2115e;
  --ftp-border:   #dee2e6;
  --ftp-row-hover:#e8f3fb;
  --ftp-toolbar-h: 52px;
  --ftp-navbar-h:  58px;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; margin: 0; }

/* ── NAVBAR ─────────────────────────────────────────────────────────────── */
.ftp-navbar {
  background: var(--irm-navy) !important;
  height: var(--ftp-navbar-h);
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.ftp-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.ftp-brand img {
  height: 36px;
  width: auto;
}
.ftp-brand-host {
  font-size: .72rem;
  font-weight: 400;
  opacity: .75;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-left: .5rem;
}

/* ── CONNECT PAGE ────────────────────────────────────────────────────────── */
.ftp-body-connect {
  background: linear-gradient(150deg, var(--irm-navy) 0%, #0d2d4a 60%, #14477d 100%);
  min-height: 100vh;
}
.connect-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--ftp-navbar-h));
  padding: 2rem 1rem;
}
.connect-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.connect-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.connect-logo img {
  height: 112px;
  width: auto;
}
.connect-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .25rem;
  color: var(--irm-navy);
}
.connect-subtitle {
  text-align: center;
  color: #6c757d;
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

/* Protocol toggle */
.btn-check:checked + .btn-outline-primary {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
  color: #fff;
}
.btn-outline-primary {
  border-color: var(--irm-blue);
  color: var(--irm-blue);
}
.btn-outline-primary:hover {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
  color: #fff;
}

.ftp-input {
  border-radius: 8px;
  border-color: #ced4da;
  font-size: .9rem;
}
.ftp-input:focus {
  border-color: var(--irm-blue);
  box-shadow: 0 0 0 3px rgba(27,117,188,.15);
}
.ftp-btn-primary {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  padding: .6rem 1.25rem;
  letter-spacing: .2px;
}
.ftp-btn-primary:hover {
  background: var(--irm-blue-dark);
  border-color: var(--irm-blue-dark);
  color: #fff;
}

/* ── MANAGER PAGE ────────────────────────────────────────────────────────── */
.ftp-body-manager {
  background: #f0f4f8;
  min-height: 100vh;
}

/* ── TOOLBAR ─────────────────────────────────────────────────────────────── */
.ftp-toolbar {
  background: #fff;
  border-bottom: 1px solid var(--ftp-border);
  height: var(--ftp-toolbar-h);
  display: flex;
  align-items: center;
  padding: 0;
  position: sticky;
  top: var(--ftp-navbar-h);
  z-index: 1020;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ftp-toolbar .container-fluid { padding: 0 1rem; }

.ftp-breadcrumb { font-size: .875rem; }
.ftp-breadcrumb .breadcrumb-item a {
  color: var(--irm-blue);
  text-decoration: none;
  font-weight: 500;
}
.ftp-breadcrumb .breadcrumb-item.active { color: #495057; }

.ftp-btn-action {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
  color: #fff;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
}
.ftp-btn-action:hover {
  background: var(--irm-blue-dark);
  border-color: var(--irm-blue-dark);
  color: #fff;
}

/* ── MAIN ────────────────────────────────────────────────────────────────── */
.ftp-main {
  padding: 1rem;
  min-height: calc(100vh - var(--ftp-navbar-h) - var(--ftp-toolbar-h));
}

/* ── TABLE ───────────────────────────────────────────────────────────────── */
.ftp-table-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  overflow: hidden;
}
.ftp-table { font-size: .875rem; margin: 0; }
.ftp-table thead th {
  background: var(--irm-navy);
  color: rgba(255,255,255,.8);
  border-bottom: none;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .7rem 1rem;
}
.ftp-table tbody tr {
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid #f0f2f5;
}
.ftp-table tbody tr:hover { background: var(--ftp-row-hover); }
.ftp-table tbody tr.selected { background: #dbeafe; }
.ftp-table td { padding: .6rem 1rem; vertical-align: middle; }

.ftp-name-cell { display: flex; align-items: center; gap: .6rem; }
.ftp-icon-dir  { color: #f6a623; font-size: 1.1rem; }
.ftp-icon-file { color: #6c757d; font-size: 1.1rem; }
.ftp-name-link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.ftp-name-link:hover { color: var(--irm-blue); }

/* ── DROPDOWN MENU ───────────────────────────────────────────────────────── */
.ftp-menu-btn {
  padding: .2rem .45rem;
  line-height: 1;
  color: #6c757d;
  border-color: transparent;
  background: transparent;
}
.ftp-menu-btn:hover { background: #e9ecef; color: #212529; border-color: #dee2e6; }
.dropdown-menu { font-size: .85rem; min-width: 170px; z-index: 2000; }
.dropdown-item { padding: .45rem .9rem; }
.font-monospace { font-family: monospace; font-size: .9rem; }

/* ── SELECTION BAR ───────────────────────────────────────────────────────── */
.ftp-selection-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--irm-navy);
  color: #fff;
  border-radius: 50px;
  padding: .6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  font-size: .875rem;
  z-index: 1010;
  min-width: 300px;
}

/* ── DROP ZONE ───────────────────────────────────────────────────────────── */
.ftp-drop-zone {
  position: fixed;
  inset: 0;
  background: rgba(27,117,188,.1);
  border: 3px dashed var(--irm-blue);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--irm-blue);
  font-size: 1.25rem;
  font-weight: 600;
  pointer-events: none;
}

/* ── UPLOAD AREA ─────────────────────────────────────────────────────────── */
.ftp-upload-area {
  border: 2px dashed var(--ftp-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.ftp-upload-area.drag-over {
  border-color: var(--irm-blue);
  background: #e8f3fb;
}
.ftp-upload-file-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .6rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-top: .4rem;
  font-size: .8rem;
}
.ftp-upload-file-item .remove-file {
  cursor: pointer;
  color: #dc3545;
  border: none;
  background: none;
  padding: 0;
}

/* ── MODALS ──────────────────────────────────────────────────────────────── */
.modal-content { border-radius: 12px; border: none; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.modal-header { border-bottom: 1px solid #f0f0f0; }
.modal-footer { border-top: 1px solid #f0f0f0; }

/* Primary buttons inside modals */
.modal .btn-primary {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
}
.modal .btn-primary:hover {
  background: var(--irm-blue-dark);
  border-color: var(--irm-blue-dark);
}

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast { min-width: 280px; }
.toast.bg-success { color: #fff; }
.toast.bg-danger  { color: #fff; }

/* ── NAVBAR LANG BUTTONS ─────────────────────────────────────────────────── */
.ftp-navbar .btn-light {
  background: var(--irm-blue);
  border-color: var(--irm-blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
}
.ftp-navbar .btn-outline-light {
  border-color: rgba(255,255,255,.35);
  color: rgba(255,255,255,.75);
  font-size: .75rem;
}
.ftp-navbar .btn-outline-light:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
