/* mewlBILL 4 — интерфейс образца 2010 года. Скругления запрещены. */
* { box-sizing: border-box; border-radius: 0 !important; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: #E8EEF5; color: #1E2B38; font: 12px Tahoma, Arial, sans-serif; }
a { color: #1F4E8C; }
a:hover { color: #C0392B; }
b { font-weight: bold; }
.mono { font-family: "Courier New", Courier, monospace; font-size: 11px; }

/* ---------- Окна ---------- */
.win { background: #FFFFFF; border: 1px solid #99A8B8; }
.win-title {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 4px 8px; border-bottom: 1px solid #99A8B8;
  background: linear-gradient(#F6F9FC, #D0DCE8);
  color: #1E3A5C; font-weight: bold; font-size: 12px;
}
.crumbs { font-weight: normal; font-size: 11px; color: #4A5D70; }
.win-body { padding: 12px; }
.win-foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #F2F6FA; border-top: 1px solid #C5D2DF; }

/* ---------- Формы ---------- */
table.form { border-collapse: collapse; width: 100%; }
table.form td { padding: 3px 4px; vertical-align: middle; }
table.form .lbl { width: 140px; text-align: right; white-space: nowrap; color: #33475B; }
.inp { height: 20px; width: 100%; padding: 1px 3px; font: 12px Tahoma, Arial, sans-serif; color: #1E2B38; background: #FFFFFF; border: 1px solid #7F9DB9; }
select.inp { padding: 0 0 0 2px; }
.inp:focus { outline: none; border-color: #4A76A8; background: #FFFFF0; }
.inp[readonly] { background: #F2F4F6; color: #4A5D70; }
.inp-s { width: auto; height: 19px; font-size: 11px; }
.inp-m { width: 420px; max-width: 100%; }
.chk { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.chk input { margin: 0; }
.rb { display: flex; margin: 3px 0; }
fieldset { margin: 0 0 10px; padding: 6px 10px 10px; border: 1px solid #99A8B8; }
legend { padding: 0 4px; color: #1E3A5C; font-weight: bold; }
.hint { color: #6B7C8D; font-size: 11px; }
.form-actions { display: flex; gap: 6px; padding-top: 4px; }
.order-total { margin: 4px 0 8px; padding: 6px 8px; background: #F2F6FA; border: 1px solid #C5D2DF; }
.total { font-size: 14px; font-weight: bold; color: #1E3A5C; }

/* ---------- Кнопки ---------- */
.btn {
  min-width: 75px; height: 22px; padding: 1px 14px; cursor: pointer;
  font: 12px Tahoma, Arial, sans-serif; color: #1E2B38;
  border: 1px solid #6E89A6;
  background: linear-gradient(#FFFFFF 0%, #E6EDF4 49%, #D3DEEA 50%, #E2EAF3 100%);
}
.btn:hover { border-color: #4A76A8; background: linear-gradient(#FFFFFF 0%, #EEF4FA 49%, #DCE8F4 50%, #EAF2FA 100%); }
.btn:active { background: linear-gradient(#C9D6E4, #E6EDF5); padding-top: 2px; padding-bottom: 0; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn-s { min-width: 0; height: 19px; padding: 0 8px; font-size: 11px; }

/* ---------- Сообщения ---------- */
.msg { position: relative; margin: 8px 0; padding: 6px 8px 6px 30px; border: 1px solid; font-size: 12px; line-height: 1.4; }
.msg::before { position: absolute; left: 7px; top: 5px; width: 16px; height: 16px; line-height: 16px; text-align: center; font: bold 11px Arial, sans-serif; color: #FFFFFF; }
.msg-err  { background: #FFF0F0; border-color: #D98C8C; color: #7A1F1F; }
.msg-err::before  { content: "!"; background: #D04545; }
.msg-info { background: #F0F6FF; border-color: #9DB6D3; color: #1E3A5C; }
.msg-info::before { content: "i"; background: #4A76A8; }
.msg-warn { background: #FFFBE6; border-color: #E0C46C; color: #6B5310; }
.msg-warn::before { content: "!"; background: #E0A800; }

/* ---------- Логин ---------- */
.login-wrap {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px;
  background: #E8EEF5 linear-gradient(#C9D7E6, #E8EEF5 260px) no-repeat;
}
.login-logo, .top-logo { font: bold 26px Tahoma, Arial, sans-serif; letter-spacing: -1px; color: #4A76A8; text-shadow: 1px 1px 0 #FFFFFF; }
.login-logo { margin-bottom: 12px; display: flex; align-items: center; }
.top-logo { display: flex; align-items: center; }
.bl-mark { width: 30px; height: 30px; margin-right: 6px; flex: none; }
.top-logo .bl-mark { width: 24px; height: 24px; }
.login-logo span { color: #E8742A; }
.login-logo sup, .top-logo sup { font-size: 11px; margin-left: 2px; color: #7A8A9A; letter-spacing: 0; }
.login-win { width: 400px; max-width: 100%; }
.login-win table.form .lbl { width: 110px; }
.login-note { width: 400px; max-width: 100%; margin-top: 12px; text-align: center; font-size: 11px; line-height: 1.5; color: #6B7C8D; }
.login-copy { margin-top: 18px; font-size: 11px; color: #8A9AAA; }

/* ---------- Каркас панели ---------- */
#app { min-height: 100%; min-width: 1000px; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 10px;
  background: linear-gradient(#6A93C2, #4A76A8 55%, #3F6A9A); border-bottom: 1px solid #2F5580; color: #FFFFFF;
}
.top-logo { font-size: 20px; color: #FFFFFF; text-shadow: 1px 1px 0 #2F5580; }
.top-logo span { color: #FFD27A; }
.top-logo sup { color: #C9D7E6; }
.top-info { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.top-info a { color: #FFFFFF; }
.top-info a:hover { color: #FFD27A; }
.top-info .sep { color: #9DB6D3; }
.neg { color: #FFC2C2; }
.menubar {
  display: flex; align-items: center; gap: 18px; height: 24px; padding: 0 10px;
  background: linear-gradient(#F6F9FC, #D0DCE8); border-bottom: 1px solid #99A8B8; font-size: 11px; color: #33475B;
}
.menubar-r { margin-left: auto; }
.layout { flex: 1; display: flex; gap: 6px; padding: 6px; align-items: flex-start; }
.side { width: 210px; flex: none; }
.main { flex: 1; min-width: 0; }
.win-main { min-height: calc(100vh - 110px); }

/* ---------- Дерево ---------- */
.tree { background: #FFFFFF; border: 1px solid #99A8B8; }
.tree-head {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; cursor: pointer; user-select: none;
  background: linear-gradient(#F6F9FC, #D0DCE8); color: #1E3A5C; font-weight: bold;
}
.tree-group + .tree-group .tree-head { border-top: 1px solid #99A8B8; }
.open .tree-head { border-bottom: 1px solid #C5D2DF; }
.tg { position: relative; flex: none; width: 9px; height: 9px; background: #FFFFFF; border: 1px solid #7F9DB9; }
.tg::before { content: ""; position: absolute; left: 1px; right: 1px; top: 3px; height: 1px; background: #1E3A5C; }
.tg::after  { content: ""; position: absolute; top: 1px; bottom: 1px; left: 3px; width: 1px; background: #1E3A5C; }
.open .tg::after { display: none; }
.tree ul { display: none; margin: 0; padding: 3px 0 4px; list-style: none; }
.open ul { display: block; }
.tree li a { display: block; padding: 2px 6px 2px 20px; color: #1E2B38; text-decoration: none; }
.tree li a::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 6px; vertical-align: middle; background: #7F9DB9; }
.tree li a:hover { background: #E8EEF5; text-decoration: underline; }
.tree li a.active { background: #FFF3C4; outline: 1px solid #E0C46C; outline-offset: -1px; font-weight: bold; }

.side-box { margin-top: 6px; background: #FFFFFF; border: 1px solid #99A8B8; }
.side-box-title { padding: 4px 6px; background: linear-gradient(#F6F9FC, #D0DCE8); border-bottom: 1px solid #99A8B8; font-weight: bold; color: #1E3A5C; }
table.kv { width: 100%; border-collapse: collapse; font-size: 11px; }
table.kv td { padding: 2px 6px; border-bottom: 1px dotted #D0DCE8; }
table.kv td:first-child { color: #6B7C8D; white-space: nowrap; width: 1%; }
.kv-wide { font-size: 12px; }
.kv-wide td { padding: 4px 8px; }

/* ---------- Тулбар / фильтр ---------- */
.toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 4px; background: linear-gradient(#FCFDFE, #E8EEF5); border-bottom: 1px solid #C5D2DF; }
.tb {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 2px 6px; cursor: pointer;
  font: 11px Tahoma, Arial, sans-serif; color: #1E2B38; background: transparent; border: 1px solid transparent;
}
.tb:hover:not(:disabled) { border-color: #99A8B8; background: linear-gradient(#FFFFFF, #DCE6F0); }
.tb:active:not(:disabled) { background: #C9D6E4; }
.tb:disabled { color: #9AA8B5; cursor: default; }
.tb:disabled .ic { filter: grayscale(1); opacity: .45; }
.tb-sep { width: 1px; height: 18px; margin: 0 3px; background: #B5C3D1; box-shadow: 1px 0 0 #FFFFFF; }
.ic {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px;
  font: bold 11px/1 Arial, sans-serif; color: #FFFFFF; border: 1px solid rgba(0, 0, 0, .3);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.ic-add, .ic-start { background: linear-gradient(#7FD07F, #3D9A3D); }
.ic-edit, .ic-reboot { background: linear-gradient(#8FB3DE, #4A76A8); }
.ic-stop, .ic-del { background: linear-gradient(#EC8C8C, #C0392B); }
.ic-money { background: linear-gradient(#F6CF7F, #D9931E); }
.ic-add::before { content: "+"; font-size: 13px; }
.ic-edit::before { content: "\270E"; }
.ic-start::before { content: "\25B6"; font-size: 8px; }
.ic-stop::before { content: "\25A0"; font-size: 9px; }
.ic-reboot::before { content: "\21BB"; }
.ic-money::before { content: "\20BD"; }
.ic-del::before { content: "\00D7"; font-size: 13px; }
.filter { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #F7F9FB; border-bottom: 1px solid #C5D2DF; font-size: 11px; }
.filter-r { margin-left: auto; color: #8A9AAA; }

/* ---------- Таблицы ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 11px; }
table.grid th {
  padding: 4px 6px; text-align: left; white-space: nowrap; cursor: pointer;
  background: linear-gradient(#FCFDFE, #D0DCE8); border: 1px solid #99A8B8; color: #1E3A5C; font-weight: bold;
}
table.grid th:hover { background: linear-gradient(#FFFFFF, #DCE6F0); }
table.grid td { padding: 3px 6px; border: 1px solid #D0DCE8; white-space: nowrap; }
table.grid tbody tr:nth-child(even) td { background: #F4F7FA; }
table.grid tbody tr:hover td { background: #E6F0FA; }
table.grid.selectable tbody tr { cursor: default; user-select: none; }
table.grid tbody tr.sel td { background: #FFF3C4; border-color: #E0C46C; }
table.grid tfoot td { padding: 4px 6px; background: #EEF3F8; border: 1px solid #C5D2DF; }
.r { text-align: right !important; }
.st { display: inline-flex; align-items: center; gap: 4px; }
.st::before { content: ""; width: 8px; height: 8px; border: 1px solid rgba(0, 0, 0, .3); }
.st-ok { color: #2B6E2B; }   .st-ok::before { background: #3D9A3D; }
.st-susp { color: #A02A1E; } .st-susp::before { background: #C0392B; }
.st-wait { color: #8A6A00; } .st-wait::before { background: #E0A800; }
.st-off { color: #6B7C8D; }  .st-off::before { background: #B5C3D1; }

/* ---------- Прочее ---------- */
.view-body { padding: 10px; }
.view-body-tight { padding-bottom: 0; }
.thread { border-top: 1px solid #C5D2DF; background: #FAFBFD; }
.post { margin-bottom: 6px; background: #FFFFFF; border: 1px solid #C5D2DF; }
.post-head { display: flex; justify-content: space-between; padding: 3px 6px; background: #EEF3F8; border-bottom: 1px solid #C5D2DF; font-size: 11px; }
.post-body { padding: 6px 8px; line-height: 1.5; }
.post.staff { border-color: #E0C46C; }
.post.staff .post-head { background: #FFF3C4; border-color: #E0C46C; }
.news-item { padding: 7px 0; border-bottom: 1px dotted #99A8B8; line-height: 1.5; }
.news-date { font-size: 11px; color: #6B7C8D; }
.statusbar {
  display: flex; justify-content: space-between; gap: 20px; padding: 3px 8px;
  background: linear-gradient(#F6F9FC, #D0DCE8); border-top: 1px solid #99A8B8; font-size: 11px; color: #33475B;
}
#status.warn { color: #A02A1E; font-weight: bold; }
