* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BODY: dark-blue starfield ── */
body {
  background-color: #000080;
  background-image: radial-gradient(white 1px, transparent 1px), radial-gradient(white 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
  font-family: 'Comic Sans MS', 'Comic Neue', cursive;
  color: #fff;
  min-height: 100vh;
  padding: 8px;
}

/* ── RAINBOW BAR ── */
.rainbow-bar {
  height: 6px;
  background: linear-gradient(90deg, #f00 0%, #f90 14%, #ff0 28%, #0f0 42%, #00f 57%, #90f 71%, #f0f 85%, #f00 100%);
  background-size: 200% 100%;
  animation: rainbow-shift 2s linear infinite;
}

@keyframes rainbow-shift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── HEADER ── */
.hdr {
  background: #000;
  border: 3px outset #c0c0c0;
  margin: 6px 0;
  padding: 10px 16px;
}

.hdr h1 {
  font-size: 26px;
  color: #ffff00;
  text-shadow: 2px 2px 0 #f00;
  line-height: 1.2;
  margin-bottom: 2px;
}

.hdr .sub {
  font-size: 11px;
  color: #00ffff;
  margin-bottom: 6px;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  margin: 8px 0 6px;
}

.tab {
  background: #c0c0c0;
  color: #000;
  border: 2px outset #c0c0c0;
  padding: 3px 12px;
  font-size: 12px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.tab.active {
  background: #000080;
  color: #fff;
  border-style: inset;
}

.tab:hover:not(.active) {
  background: #d4d4d4;
}

/* ── WHOAMI ── */
.whoami {
  font-size: 12px;
  color: #fff;
  font-family: Arial, sans-serif;
  margin-top: 4px;
}

.whoami select {
  background: #c0c0c0;
  border: 2px inset #888;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
  padding: 1px 4px;
}

/* ── MARQUEE ── */
.marquee-wrap {
  background: #000;
  border: 2px solid #00ff00;
  padding: 3px 0;
  overflow: hidden;
  white-space: nowrap;
  margin: 4px 0;
}

.marquee-inner {
  display: inline-block;
  animation: marquee-scroll 22s linear infinite;
  color: #00ff00;
  font-size: 12px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

@keyframes marquee-scroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ── NOTICE BANNERS ── */
.offline-banner {
  background: #cc0000;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border: 2px inset #880000;
  margin: 4px 0;
}

.stale-banner {
  background: #ff8800;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border: 2px inset #cc6600;
  margin: 4px 0;
}

/* ── PORTAL LAYOUT ── */
.portal {
  display: flex;
  gap: 8px;
  margin: 6px 0;
}

.portal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── WIN98 BOX ── */
.box {
  background: #c0c0c0;
  border: 3px outset #fff;
}

.box-title {
  background: #000080;
  color: #fff;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box-body {
  padding: 8px;
}

/* ── WIN98 CONTROLS ── */
.win98-btn {
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  padding: 3px 12px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  cursor: pointer;
  color: #000;
  font-weight: bold;
}

.win98-btn:active {
  border-style: inset;
}

.win98-btn:hover {
  background: #d4d4d4;
}

.win98-input {
  width: 100%;
  border: 2px inset #888;
  background: #fff;
  padding: 3px 5px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  margin-bottom: 6px;
  outline: none;
  color: #000;
}

.mini {
  font-size: 10px;
  padding: 2px 6px;
}

/* rate editor: keep "1 USD = [..] сом" on one line, stacked */
#rates label { display: block; margin-bottom: 6px; }
#rates .win98-input { width: 70px; display: inline-block; margin: 0 4px; }

/* ── DASHBOARD GRID ── */
.dash-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-cell {
  background: #fff;
  border: 2px inset #808080;
  padding: 6px 10px;
  min-width: 120px;
  font-family: Arial, sans-serif;
}

.dash-label {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-value {
  font-size: 16px;
  font-weight: bold;
  color: #000080;
  font-family: monospace;
}

.exchange-note {
  font-size: 10px;
  color: #555;
  font-family: Arial, sans-serif;
  font-style: italic;
  margin-top: 4px;
}

/* ── TRANSFER ROWS ── */
.tr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  margin-bottom: 5px;
  background: #fff;
  border: 2px inset #808080;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.tr-from {
  font-weight: bold;
  min-width: 55px;
}

.tr-mid {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tr-line {
  flex: 1;
  border-top: 2px solid #999;
}

.tr-arrow {
  color: #cc0000;
  font-size: 18px;
}

.tr-to {
  font-weight: bold;
  min-width: 55px;
  text-align: right;
}

.tr-amt {
  background: #cc0000;
  color: #fff;
  font-weight: bold;
  font-family: monospace;
  font-size: 15px;
  padding: 2px 10px;
  border: 2px outset #ff6666;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}

.tr-amt-sub {
  display: block;
  font-size: 9px;
  font-weight: normal;
  opacity: 0.85;
}

.settle-note {
  background: #ffffcc;
  border: 2px inset #808080;
  padding: 5px 8px;
  font-size: 11px;
  color: #000066;
  font-family: Arial, sans-serif;
}

/* ── TABLE ── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: Arial, sans-serif;
}

.tbl th {
  background: #000080;
  color: #ff0;
  padding: 5px 7px;
  font-size: 10px;
  text-align: left;
  border: 1px solid #00f;
}

.tbl td {
  padding: 4px 7px;
  border-bottom: 1px solid #a0a0a0;
  color: #000;
  background: #fff;
}

.tbl tr:nth-child(even) td {
  background: #e8e8ff;
}

.base-row td {
  color: #888 !important;
  background: #f0f0f0 !important;
  font-style: italic;
}

.row-actions {
  display: flex;
  gap: 3px;
}

/* ── PAYER COLOR CLASSES ── */
.vlad  { color: #000099; font-weight: bold; }
.vitya { color: #006600; font-weight: bold; }
.zhenya { color: #660066; font-weight: bold; }
.rinat { color: #cc6600; font-weight: bold; }
.petya { color: #cc0000; font-weight: bold; }

/* ── PENDING ROW ── */
.pending-row {
  background: #fff8cc;
  border: 2px inset #808080;
  padding: 6px 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #333;
  margin-bottom: 4px;
}

.empty {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #555;
  font-style: italic;
  padding: 6px 0;
}

/* ── VALIDATION ROWS ── */
.val-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #fff;
  border: 2px inset #808080;
  margin-bottom: 5px;
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.val-name {
  font-weight: bold;
  min-width: 58px;
}

.val-note {
  flex: 1;
  color: #555;
  font-style: italic;
  font-size: 11px;
}

.btn {
  padding: 3px 10px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  border: 2px outset #c0c0c0;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ok {
  background: #009900;
  color: #fff;
  border-color: #006600;
}

.btn-wait {
  background: #ff8800;
  color: #fff;
  border-color: #cc6600;
}

.btn-no {
  background: #cc0000;
  color: #fff;
  border-color: #880000;
  animation: bl 1.2s step-end infinite;
}

@keyframes bl {
  50% { opacity: 0.4; }
}

/* ── HISTORY LOG ROWS ── */
.log-row {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #000;
  padding: 3px 6px;
  border-bottom: 1px solid #ccc;
  background: #fff;
}

.log-row:nth-child(even) {
  background: #f0f0ff;
}

/* ── SIDEBAR ADS ── */
.ad-hotel {
  background: #fff;
  border: 3px outset #c0c0c0;
  color: #000;
  font-family: Arial, Verdana, sans-serif;
  overflow: hidden;
}

.ad-hotel-photo {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.ad-hotel-body {
  padding: 6px 8px;
}

.ad-hotel-name {
  font-size: 13px;
  font-weight: bold;
  color: #000080;
  line-height: 1.2;
}

.ad-hotel-stars {
  color: #ffa500;
  font-size: 14px;
  letter-spacing: -1px;
}

.ad-hotel-price {
  font-size: 11px;
  color: #cc0000;
  font-weight: bold;
  margin-top: 3px;
}

.ad-label {
  font-size: 9px;
  color: #999;
  text-align: right;
  font-family: Arial, sans-serif;
}

.ad-tall {
  background: #fff;
  border: 3px outset #c0c0c0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: #000;
}

.ad-tall-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.ad-tall-body {
  padding: 6px 8px;
}

.ad-tall-title {
  font-size: 12px;
  font-weight: bold;
  color: #cc0000;
  text-align: center;
}

/* ── FOOTER ── */
.footer {
  background: #c0c0c0;
  border: 3px outset #fff;
  margin: 6px 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #000;
  flex-wrap: wrap;
}

.counter {
  background: #000;
  color: #0f0;
  font-family: monospace;
  font-size: 20px;
  padding: 3px 10px;
  border: 2px inset #333;
  letter-spacing: 3px;
}

.ie-badge {
  background: #fff;
  border: 2px outset #c0c0c0;
  padding: 4px 8px;
  font-size: 10px;
  color: #000;
  text-align: center;
}

/* ── MODAL ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  background: #c0c0c0;
  border: 3px outset #fff;
  padding: 0;
  min-width: 300px;
  max-width: 480px;
  width: 90%;
}

.modal label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
  margin-bottom: 2px;
  margin-top: 6px;
}

.modal-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding: 8px;
  border-top: 1px solid #808080;
  margin-top: 8px;
}

.m-error {
  color: #cc0000;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
}
