/* SmartStoring — rebuilt UI, keeping the shape and colours of the ASP system. */

:root {
  --ink: #333;
  --head: #054477;
  --blue: #034d86;
  --link: #1f6fb2;
  --line: #d4dbe2;
  --soft: #f3f6f9;
  --bar: #e8eef5;
  --panel: #fff;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 13px/1.5 Arial, "Helvetica Neue", Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { border: 0; }

.page { max-width: 1180px; margin: 0 auto; padding: 0 12px 40px; }

/* ---------------------------------------------------------------- cookie bar */
.cookiebar {
  background: #111; color: #fff; padding: 12px 16px; font-size: 12px;
  display: flex; gap: 16px; align-items: center; justify-content: center;
}
.cookiebar button {
  background: transparent; color: #fff; border: 1px solid #fff;
  padding: 7px 22px; cursor: pointer; font: inherit;
}
.cookiebar button:hover { background: #fff; color: #111; }

/* -------------------------------------------------------------------- header */
.brand { padding: 14px 0 10px; }
.brand img { display: block; }

/* --------------------------------------------------------------------- frame */
.frame { border: 1px solid var(--line); background: var(--panel); }
.frame-cols { display: flex; align-items: stretch; }
.col-side { width: 260px; flex: 0 0 260px; border-inline-end: 1px solid var(--line); }
.col-main { flex: 1 1 auto; min-width: 0; }

.box { border-bottom: 1px solid var(--line); padding: 14px 16px; }
.box h2 {
  margin: 0 0 10px; font-size: 15px; color: var(--head); font-weight: bold;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}

/* ---------------------------------------------------------------- top menu */
.topmenu {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.topmenu .sep { color: #b9c4cf; }
.topmenu .spacer { flex: 1 1 auto; }
.topmenu form { display: inline; margin: 0; }
.topmenu .linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer;
}
.topmenu .linkbtn:hover { text-decoration: underline; }

.banner { padding: 10px 16px; }
.banner img { max-width: 100%; height: auto; }

/* -------------------------------------------------------------- search bar */
.searchbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.searchbar input[type=text] {
  padding: 5px 8px; border: 1px solid #a9bacb; width: 230px; font: inherit;
}
.searchbar label { font-size: 12px; }
.searchbar .btn { padding: 5px 16px; }

.btn {
  display: inline-block; width: auto;
  background: var(--blue); color: #fff; border: 0; border-radius: var(--radius);
  padding: 7px 16px; font: inherit; cursor: pointer;
}
.btn:hover { opacity: .9; text-decoration: none; color: #fff; }
.btn.secondary { background: #6c7a89; }

/* -------------------------------------------------------------- breadcrumb */
.crumbbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bar); border-bottom: 1px solid var(--line);
}
.crumbbar .crumbs { font-weight: bold; color: var(--head); }
.crumbbar .crumbs a { color: var(--head); }
.crumbbar .spacer { flex: 1 1 auto; }
.crumbbar .tools { display: flex; gap: 6px; align-items: center; }

/* ------------------------------------------------------------ folder cards */
.cards { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; }
.card {
  width: 172px; border: 1px solid var(--line); background: #fff;
  display: flex; flex-direction: column;
}
.card .cap {
  background: var(--soft); border-bottom: 1px solid var(--line);
  padding: 6px 8px; text-align: center; font-size: 12px; min-height: 30px;
}
.card .pic {
  height: 150px; display: flex; align-items: center; justify-content: center; padding: 8px;
}
.card .pic img { max-width: 100%; max-height: 134px; }
.card .foot {
  border-top: 1px solid var(--line); background: var(--soft);
  padding: 5px 8px; text-align: center; font-size: 11px; color: #6b7883;
}

/* -------------------------------------------------------------- asset list */
.assets { padding: 0 16px 16px; }

.arow { border: 1px solid var(--line); margin-top: 14px; }
.arow .head {
  background: var(--soft); border-bottom: 1px solid var(--line);
  padding: 7px 10px; font-weight: bold; color: #262f38;
}
.arow .body { display: flex; gap: 14px; padding: 12px 10px; align-items: flex-start; }
.arow .meta { flex: 1 1 auto; min-width: 0; }
.arow .thumb { flex: 0 0 150px; text-align: center; }
.arow .thumb img { max-width: 100%; max-height: 140px; }

.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 12px; }
.facts div { min-width: 180px; }
.facts b { display: block; color: #262f38; }
.facts span { font-style: italic; color: #5d6a75; }

.actions {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #eef3f8; border: 1px solid #dde5ed; padding: 7px 10px; border-radius: 20px;
}
.actions form { display: inline; margin: 0; }
.actions button { background: none; border: 0; padding: 0; cursor: pointer; }
.actions img { width: 34px; height: 34px; display: block; }
.actions .off { opacity: .35; cursor: default; }

.tags { margin-top: 10px; font-size: 12px; }
.tags b { display: block; color: #262f38; margin-bottom: 2px; }

/* -------------------------------------------------------------- asset grid */
.agrid { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; }
.acard { width: 232px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.acard .cap {
  background: var(--soft); border-bottom: 1px solid var(--line); padding: 6px 8px;
  font-size: 12px; font-weight: bold; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acard .pic { height: 170px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.acard .pic img { max-width: 100%; max-height: 154px; }
.acard .actions { border-radius: 0; border: 0; border-top: 1px solid var(--line); justify-content: center; }

/* ------------------------------------------------------------------ paging */
.paging { padding: 12px 16px; font-size: 12px; color: #5d6a75; }
.paging a { padding: 0 3px; }
.paging .cur { font-weight: bold; color: #000; }

/* -------------------------------------------------------------------- tree */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-inline-start: 16px; }
.tree li { margin: 3px 0; }
.tree .row { display: flex; gap: 6px; align-items: center; }
.tree .twisty {
  width: 13px; height: 13px; line-height: 11px; text-align: center; cursor: pointer;
  border: 1px solid #9fb0c0; background: #fff; font-size: 11px; color: #456; flex: 0 0 13px;
}
.tree .twisty.blank { border: 0; background: none; cursor: default; }
.tree a { color: #262f38; font-weight: bold; }
.tree li.on > .row > a { color: #c0392b; }
.tree ul.collapsed { display: none; }

/* edit mode switch */
.editmode { display: flex; gap: 8px; align-items: center; margin: -4px 0 10px; }
.editmode button {
  border: 1px solid #c3cfda; background: #fff; color: #3f5160;
  padding: 4px 11px; border-radius: 4px; font: inherit; font-size: 12px; cursor: pointer;
}
.editmode button:hover { background: #eef5fb; border-color: #8fb0cd; color: #034d86; }
.editmode button.exit { border-color: #d7a6a1; color: #a4190f; }
.editmode button.exit:hover { background: #fdecea; border-color: #c0392b; color: #a4190f; }
.editmode .badge {
  background: #c0392b; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px;
}

/* editing affordances, shown only in edit mode */
.tree .nodeops { display: none; gap: 2px; margin-inline-start: 4px; }
.tree .row:hover .nodeops, .tree .row:focus-within .nodeops { display: inline-flex; }
.tree .nodeops button {
  border: 1px solid #c3cfda; background: #fff; color: #5a6b7a;
  width: 18px; height: 18px; line-height: 1; padding: 0; border-radius: 3px;
  font-size: 11px; cursor: pointer;
}
.tree .nodeops button:hover { background: #eef5fb; border-color: #8fb0cd; color: #034d86; }
.tree .row[draggable=true] a { cursor: grab; }
.tree .row.dropok { outline: 2px solid #034d86; outline-offset: 1px; background: #eef5fb; }

.dragging { opacity: .45; }
.head[draggable=true], .cap[draggable=true] { cursor: grab; }

#dropmenu {
  position: absolute; z-index: 400; display: none;
  background: #fff; border: 1px solid #9fb0c0; border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 4px; min-width: 150px;
}
#dropmenu button {
  display: block; width: 100%; text-align: start; background: none; border: 0;
  padding: 7px 10px; font: inherit; cursor: pointer; color: #26323d; border-radius: 3px;
}
#dropmenu button:hover { background: #eef5fb; }

#toast {
  position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 500;
  background: #26323d; color: #fff; padding: 11px 16px; border-radius: 5px;
  display: none; max-width: 340px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
#toast.bad { background: #a4190f; }

/* -------------------------------------------------------------- tag cloud */
.cloud a { margin-inline-end: 6px; color: #4f4f4f; }
.cloud .sep { color: #9aa7b2; }

/* ------------------------------------------------------------------ basket */
.btable { width: 100%; border-collapse: collapse; }
.btable th, .btable td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.btable th { background: var(--soft); font-size: 12px; color: #4a5a68; }
.btable img.th { max-width: 72px; max-height: 60px; }

.bulk { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.bulk form { display: inline; margin: 0; }

/* ------------------------------------------------------------ bulk tagging */
.bulktags { border-bottom: 1px solid var(--line); background: #fbfcfd; }
.bulktags .toggle {
  display: flex; gap: 8px; align-items: center; width: 100%;
  background: none; border: 0; padding: 9px 16px; font: inherit;
  color: var(--link); cursor: pointer; text-align: start;
}
.bulktags .toggle:hover { text-decoration: underline; }
.bulktags .panel { display: none; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 16px 14px; }
.bulktags.open .panel { display: flex; }
.bulktags input[type=text] {
  flex: 1 1 260px; min-width: 200px; padding: 6px 9px; border: 1px solid #a9bacb; font: inherit;
}
.bulktags .hint { flex: 1 1 100%; color: #6b7883; font-size: 12px; }

.msg { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.msg.success { background: #e8f5e9; color: #1b5e20; }
.msg.error { background: #fdecea; color: #a4190f; }
.msg.info { background: #e8f1fb; color: #0d3d6b; }

.empty { color: #7b8893; padding: 24px 16px; }

/* ------------------------------------------------------------------- login */
.loginwrap { display: flex; gap: 18px; align-items: flex-start; padding: 18px; flex-wrap: wrap; }
.loginbox { width: 330px; border: 1px solid var(--line); padding: 16px; }
.loginbox h2 { margin: 0 0 10px; font-size: 17px; color: var(--head); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.loginbox .f { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.loginbox .f label { width: 90px; color: #262f38; }
.loginbox input[type=text], .loginbox input[type=password] {
  flex: 1 1 auto; padding: 5px 7px; border: 1px solid #a9bacb; background: #eef3f8; font: inherit;
}
.publicmenu {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  padding: 10px 16px; background: var(--bar); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.welcome { padding: 18px; }
.welcome h3 { margin: 0 0 8px; color: #262f38; font-size: 14px; }

/* ------------------------------------------------------------------- zoom */
.zoomwrap { padding: 16px; text-align: center; }
.zoomwrap img { max-width: 100%; height: auto; border: 1px solid var(--line); }

/* ------------------------------------------------------------------ share */
.form-rows { padding: 16px; max-width: 620px; }
.form-rows .f { margin-bottom: 12px; }
.form-rows label { display: block; margin-bottom: 4px; color: #4a5a68; }
.form-rows input[type=text], .form-rows input[type=email], .form-rows select, .form-rows textarea {
  width: 100%; padding: 6px 8px; border: 1px solid #a9bacb; font: inherit;
}
.form-rows textarea { min-height: 110px; }

@media (max-width: 860px) {
  .frame-cols { display: block; }
  .col-side { width: auto; flex: none; border-inline-end: 0; border-bottom: 1px solid var(--line); }
}
