/* ===== Aspect clasic Windows (stil Archivarius 3000) ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 11px Tahoma, "Segoe UI", sans-serif;
  background: #9db3c8;
  color: #000;
  display: flex; flex-direction: column;
}
.win {
  display: flex; flex-direction: column;
  height: 100%;
  background: #ece9d8;
  border: 1px solid #0a246a;
}
/* bara de titlu */
.titlebar {
  background: linear-gradient(180deg, #2664c9 0%, #1548a8 8%, #0c3d9e 40%, #0a2f89 88%, #0c3d9e 100%);
  color: #fff; font-weight: bold; font-size: 12px;
  padding: 4px 8px; display: flex; align-items: center; gap: 7px;
  text-shadow: 1px 1px 1px #00114d;
  flex: 0 0 auto;
}
.titlebar .tb-ico { font-size: 14px; }
.titlebar .tb-right { margin-left: auto; font-weight: normal; font-size: 11px; opacity: .85; }
.titlebar a { color: #fff; }
/* meniu */
.menubar {
  background: #ece9d8; border-bottom: 1px solid #aca899;
  padding: 1px 2px; display: flex; gap: 1px; flex: 0 0 auto; user-select: none;
}
.menubar span {
  padding: 3px 8px; cursor: default;
}
.menubar span:hover { background: #316ac5; color: #fff; }
/* toolbar */
.toolbar {
  background: linear-gradient(180deg, #fdfdfb, #ece9d8);
  border-bottom: 1px solid #aca899;
  padding: 3px 6px; display: flex; gap: 4px; align-items: stretch; flex: 0 0 auto;
}
.tbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 64px; padding: 4px 8px;
  border: 1px solid transparent; background: transparent;
  font: 11px Tahoma; cursor: pointer; color: #000; text-decoration: none;
}
.tbtn:hover { border-color: #316ac5; background: #dce8f7; }
.tbtn:active { background: #c1d7f1; }
.tbtn .ico { font-size: 20px; }
.tsep { width: 1px; background: #aca899; margin: 3px 3px; }
/* zona de cautare */
.searchrow {
  padding: 8px 10px 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  flex: 0 0 auto;
}
.searchrow label { white-space: nowrap; }
input[type=text], input[type=password], select {
  font: 12px Tahoma; padding: 3px 5px;
  border: 1px solid #7f9db9; background: #fff;
}
#q { flex: 1 1 320px; font-size: 13px; }
button, .btn {
  font: 11px Tahoma; padding: 4px 14px; cursor: pointer;
  background: linear-gradient(180deg, #fff, #ece9d8);
  border: 1px solid #003c74; border-radius: 3px; color: #000; text-decoration: none;
}
button:hover, .btn:hover { background: linear-gradient(180deg, #fff, #ffe7a2); }
button:active { background: #ece9d8; }
.optrow {
  padding: 2px 10px 6px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  color: #333; flex: 0 0 auto;
}
/* corpul: panou stanga + rezultate */
.body { flex: 1 1 auto; display: flex; min-height: 0; padding: 0 6px 6px; gap: 6px; }
.panel {
  background: #fff; border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #fff;
}
.sidebar {
  flex: 0 0 240px; display: flex; flex-direction: column; min-height: 0;
}
.sidebar .phead, .results .phead {
  background: linear-gradient(180deg, #fdfdfb, #d8d4c8);
  border-bottom: 1px solid #aca899; padding: 4px 8px; font-weight: bold; flex: 0 0 auto;
}
.sidebar .plist { overflow: auto; flex: 1 1 auto; padding: 4px; }
.baserow { display: flex; align-items: center; gap: 4px; padding: 2px 2px; cursor: pointer; }
.baserow:hover { background: #dce8f7; }
.baserow .cnt { margin-left: auto; color: #777; }
.sidebar .pfoot { border-top: 1px solid #d5d2c6; padding: 4px 8px; color: #555; flex: 0 0 auto; }
.results { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.hits { overflow: auto; flex: 1 1 auto; padding: 6px 10px; }
/* un rezultat */
.hit { padding: 7px 4px 9px; border-bottom: 1px solid #e4e1d5; }
.hit .h-line1 { display: flex; align-items: baseline; gap: 7px; }
.hit .h-name { color: #0000cc; text-decoration: underline; font-size: 12px; font-weight: bold; cursor: pointer; }
.hit .h-name:visited { color: #551a8b; }
.hit .h-rel { margin-left: auto; color: #444; white-space: nowrap; }
.relbar { display: inline-block; width: 60px; height: 8px; border: 1px solid #808080; background: #fff; vertical-align: middle; margin-left: 4px; }
.relbar i { display: block; height: 100%; background: linear-gradient(180deg,#4a90e2,#1548a8); }
.hit .h-path { color: #007000; margin: 2px 0; word-break: break-all; }
.hit .h-meta { color: #777; margin-bottom: 3px; }
.hit .h-snip { color: #222; line-height: 1.5; }
.hit .h-snip b, mark { color: #c00000; background: #ffff9e; font-weight: bold; }
.hit .h-open { color: #0000cc; margin-left: 8px; text-decoration: underline; cursor: pointer; font-weight: normal; font-size: 11px; }
/* paginare */
.pager { padding: 6px 10px; border-top: 1px solid #d5d2c6; display: flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.pager button { padding: 2px 10px; }
/* bara de stare */
.statusbar {
  flex: 0 0 auto; display: flex; gap: 4px; padding: 3px 6px 4px;
  background: #ece9d8; border-top: 1px solid #fff;
}
.statusbar .cell {
  border: 1px solid; border-color: #808080 #fff #fff #808080;
  padding: 2px 8px; white-space: nowrap;
}
.statusbar .grow { flex: 1 1 auto; }
.prog { display: inline-block; width: 120px; height: 10px; border: 1px solid #808080; background: #fff; vertical-align: middle; }
.prog i { display: block; height: 100%; background: repeating-linear-gradient(90deg,#316ac5 0 8px,#6f97d8 8px 10px); }
.muted { color: #777; }
.center { text-align: center; padding: 30px; color: #666; }
/* dialog (login / despre / statistici) */
.dlg-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; z-index: 50; }
.dlg { background: #ece9d8; border: 1px solid #0a246a; box-shadow: 3px 3px 12px rgba(0,0,0,.5); min-width: 340px; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; }
.dlg .titlebar { font-size: 11px; padding: 3px 6px; }
.dlg .dlg-body { padding: 14px; overflow: auto; }
.dlg .x { margin-left: auto; cursor: pointer; background: #d64541; border: 1px solid #fff; width: 16px; height: 15px; line-height: 12px; text-align: center; font-size: 11px; border-radius: 2px; }
table.stats { border-collapse: collapse; width: 100%; background: #fff; }
table.stats th, table.stats td { border: 1px solid #c8c4b8; padding: 3px 8px; text-align: left; }
table.stats th { background: #d8d4c8; }
table.stats td.num { text-align: right; }
/* vizualizator document */
.docmeta { padding: 8px 12px; border-bottom: 1px solid #aca899; background: #f6f4ea; flex: 0 0 auto; }
.docmeta h1 { font-size: 14px; margin: 0 0 4px; }
.docmeta .h-path { color: #007000; }
#text {
  flex: 1 1 auto; overflow: auto; margin: 6px; padding: 14px 18px;
  background: #fff; border: 1px solid #808080;
  font: 13px/1.65 Georgia, "Times New Roman", serif;
  white-space: pre-wrap; word-break: break-word;
}
mark.cur { background: #ff9632; color: #000; }
@media (max-width: 760px) {
  .sidebar { display: none; }
  .tbtn { min-width: 48px; }
}
