* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f3f5f8;
  color: #1c2733;
  display: flex;
  flex-direction: column;
}

/* ---- centered pages (login / messages) ---- */
.center-page { justify-content: center; align-items: center; }
.card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  padding: 40px 48px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(20, 40, 70, .08);
}
.card h1 { margin: 0 0 6px; font-size: 24px; }
.muted { color: #66788c; }
.small { font-size: 12px; margin-top: 24px; }
.warn { color: #a15c00; background: #fff6e5; border: 1px solid #f0dcb0; border-radius: 6px; padding: 10px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid #c5cfda;
  border-radius: 6px;
  background: #fff;
  color: #1c2733;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: #eef3f9; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-ms { margin: 18px auto 0; font-size: 15px; padding: 10px 18px; }
.btn-small { padding: 4px 10px; }
.btn-danger { color: #b01e1e; border-color: #dfb3b3; }
.btn-danger:hover:not(:disabled) { background: #fbeeee; }

/* ---- app chrome ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: #14273f;
  color: #fff;
}
.topbar .brand { font-weight: 600; font-size: 16px; }
.topbar .who { font-size: 13px; opacity: .85; }
.topbar .btn { background: transparent; color: #fff; border-color: #4a5f7d; }
.topbar .btn:hover { background: #223a5b; }
.spacer { flex: 1; }

.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #dde3ea;
  flex-wrap: wrap;
}
.toolbar .sep { width: 1px; height: 22px; background: #dde3ea; }
.status { font-size: 12px; color: #66788c; }

.layout { flex: 1; display: flex; min-height: 0; }

/* ---- tree ---- */
.tree {
  width: 240px;
  overflow: auto;
  border-right: 1px solid #dde3ea;
  background: #fbfcfe;
  padding: 8px 4px;
  user-select: none;
}
.node-row {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.node-row:hover { background: #eef3f9; }
.node-row.active { background: #dbe8f8; }
.node-row.droptarget { outline: 2px solid #3a76c4; outline-offset: -2px; }
.node-kids { padding-left: 16px; }
.twist { width: 14px; text-align: center; color: #66788c; font-size: 10px; flex: none; }

/* ---- file list ---- */
.panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.crumbs { padding: 8px 16px; font-size: 13px; background: #fff; border-bottom: 1px solid #eef1f5; }
.crumbs a { color: #2a5da8; text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.crumbs a:hover { background: #eef3f9; }
.crumbs a.droptarget { outline: 2px solid #3a76c4; }
.crumbs .cur { color: #1c2733; font-weight: 600; padding: 2px 4px; }

.listwrap { flex: 1; overflow: auto; position: relative; background: #fff; }
.listwrap.droptarget .drophint { display: flex; }
.drophint {
  display: none;
  position: absolute; inset: 8px;
  border: 2px dashed #3a76c4;
  border-radius: 10px;
  background: rgba(58, 118, 196, .06);
  align-items: center; justify-content: center;
  font-size: 15px; color: #2a5da8;
  pointer-events: none;
}

table.list { width: 100%; border-collapse: collapse; user-select: none; }
table.list th {
  text-align: left; font-size: 12px; color: #66788c; font-weight: 600;
  padding: 8px 16px; border-bottom: 1px solid #eef1f5;
  position: sticky; top: 0; background: #fff;
}
table.list td { padding: 6px 16px; border-bottom: 1px solid #f2f5f8; cursor: default; }
table.list tr.sel td { background: #dbe8f8; }
table.list tr.cutmark td { opacity: .5; }
table.list tr.droptarget td { outline: 2px solid #3a76c4; outline-offset: -2px; }
table.list tr:hover td { background: #f2f6fb; }
table.list tr.sel:hover td { background: #d0e0f5; }
.col-size, .col-date { width: 110px; white-space: nowrap; color: #66788c; }
.col-date { width: 160px; }
.icon { margin-right: 8px; }
.empty { padding: 40px; text-align: center; color: #99a6b5; }
