﻿:root {
  --bg: #2a2928;
  --panel: #3f3d3b;
  --panel-dark: #2f2e2c;
  --text: #f8f8f8;
  --muted: #c8c5c2;
  --field-width: 160px;
  --field-height: 35px;
  --accent: linear-gradient(135deg, #4b6bff, #a35bff);
  --accent-strong: linear-gradient(135deg, #4b6bff, #a35bff);
  --border: rgba(85, 80, 76, 0.9);
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 28px;
  border-bottom: 1px solid rgba(60, 56, 52, 0.9);
  background: #242322;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 21px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.header-search {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  align-items: center;
}

.top-nav {
  display: flex;
  gap: 16px;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.top-nav a:hover,
.top-nav a.active {
  color: #f5d24a;
}

.site-main {
  padding: 12px 28px 32px;
}

.sheet {
  display: grid;
  gap: 12px;
}

.row {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.doc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-button {
  flex: 0 0 var(--field-width);
  width: var(--field-width);
  min-width: var(--field-width);
  height: var(--field-height);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f5d24a;
  color: #1b1a17;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
}

.row-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.row-head .row-title {
  margin-bottom: 0;
}

.search-box {
  position: relative;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: flex-start;
}

.search-left {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: center;
}

.search-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  flex: 0 0 auto;
  align-self: center;
}

.home-page .site-header {
  padding-top: 0;
  padding-bottom: 0;
}

.home-page .search-right {
  padding-top: 15px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form input,
.inline-form button {
  width: var(--field-width);
}

.header-search input,
.header-search button {
  height: var(--field-height);
  border-radius: 12px;
  line-height: 1;
}

.header-search input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 14px;
}

.header-search input::placeholder {
  color: #f2a3a3;
}

.active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.active-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #b0d5f2;
}

.search-actions {
  flex: 1 1 auto;
  height: var(--field-height);
}

.search-row .search-box input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 15px;
  height: var(--field-height);
}

.search-row .search-box.search-box--compact input {
  width: 30vw;
  min-width: 260px;
  max-width: 420px;
}

.header-search .search-box.search-box--compact input {
  width: var(--field-width);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 15px;
  height: var(--field-height);
}

.row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-form > * {
  flex: 0 0 var(--field-width);
  max-width: var(--field-width);
  min-width: var(--field-width);
  height: var(--field-height);
}

.row-form .month-grid {
  flex: 1 1 auto;
  max-width: none;
  min-width: 0;
  width: auto;
  align-items: center;
}

.input-wrap {
  position: relative;
  width: var(--field-width);
  height: var(--field-height);
}

.input-wrap input {
  width: 100%;
  height: 100%;
}

.input-wrap .dropdown {
  left: 0;
  right: 0;
  top: calc(100% + 6px);
}

.row-form input,
.row-form select,
.row-form textarea {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 15px;
  width: var(--field-width);
  min-width: var(--field-width);
  text-overflow: clip;
  overflow-x: auto;
  white-space: nowrap;
  height: var(--field-height);
}

.row-form input:not([type="checkbox"]),
.row-form select,
.row-form textarea,
.header-search input,
.report-input,
.admin-narrow input,
.admin-grid table input {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.row-form input:not([type="checkbox"]):hover,
.row-form select:hover,
.row-form textarea:hover,
.header-search input:hover,
.report-input:hover,
.admin-narrow input:hover,
.admin-grid table input:hover {
  background: #4a4744;
  border-color: rgba(110, 105, 100, 0.9);
  transition-duration: 0.12s;
}

.row-form input::placeholder,
.row-form textarea::placeholder,
.search-row .search-box input::placeholder,
.header-search .search-box input::placeholder {
  color: #f2a3a3;
}

.pulse-alert {
  animation: pulseAlert 1.6s ease-in-out infinite;
  color: #5a1115;
}

.pulse-alert::placeholder {
  color: #5a1115;
}

@keyframes pulseAlert {
  0% {
    background-color: #45423f;
    color: #ffffff;
  }
  50% {
    background-color: #ffffff;
    color: #5a1115;
  }
  100% {
    background-color: #45423f;
    color: #ffffff;
  }
}

.row-form select.is-placeholder {
  color: #f2a3a3;
}

.row-form button {
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  background: #b0d5f2;
  color: #1b1a17;
  font-weight: 700;
  cursor: pointer;
  width: var(--field-width);
  height: var(--field-height);
}

.row-form button,
.primary,
.ghost,
.doc-button,
.month-btn,
.copy-btn {
  transition: filter 0.15s ease;
}

.row-form button:hover,
.primary:hover,
.ghost:hover,
.doc-button:hover,
.month-btn:hover,
.copy-btn:hover {
  filter: brightness(0.92);
}

.row-form button:active,
.primary:active,
.ghost:active,
.doc-button:active,
.month-btn:active,
.copy-btn:active {
  filter: brightness(0.8);
}

.row-center {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.primary {
  background: #b0d5f2;
  border: none;
  color: #1b1a17;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  width: var(--field-width);
  height: var(--field-height);
}

.link-button {
  background: #f5d24a;
  color: #1b1a17;
}

.ghost {
  background: #b0d5f2;
  color: #1b1a17;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  width: var(--field-width);
  height: var(--field-height);
}

.file-field {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  width: var(--field-width);
  height: var(--field-height);
}

.file-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-input .file-label {
  pointer-events: none;
}

.file-input.has-file .file-label {
  font-weight: 700;
}

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #3f3d3b;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}

.dropdown.hidden {
  display: none;
}

.dropdown-item {
  padding: 8px 10px;
  cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: #4a4845;
}

.month-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.month-btn {
  width: var(--field-width);
  height: var(--field-height);
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}

.month-btn.unpaid {
  background: #f6b3b3;
  color: #1b1a17;
}

.month-btn.paid {
  background: #bfe8c8;
  color: #1b1a17;
}

.month-btn.selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  border-radius: 12px;
  background: #3f3d3b;
  padding: 8px 10px;
  border: 1px solid var(--border);
}

.list-title {
  font-weight: 700;
  font-size: 13px;
}

.list-sub,
.list-date,
.list-empty {
  font-size: 12px;
  color: var(--muted);
}

.due-section {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.due-card {
  display: grid;
  gap: 8px;
  background: #3f3d3b;
  border-radius: var(--radius);
  border: 1px solid #ffffff;
  padding: 10px 12px;
}

.due-title {
  font-weight: 700;
  margin: 0;
}

.due-table th,
.due-table td {
  font-size: 12px;
  border-bottom: 1px solid #ffffff;
}

.due-table thead th {
  border-bottom: 2px solid #ffffff;
}

.due-table tbody tr:last-child td {
  border-bottom: none;
}

.due-table tbody tr:nth-child(odd) td {
  background: #42403d;
}

.due-table tbody tr:nth-child(even) td {
  background: #2f2d2b;
}

.tg-link {
  color: var(--text);
  text-decoration: none;
}

.tg-link:hover {
  text-decoration: underline;
}

.monitor-section {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monitor-section .due-table tbody td {
  height: 26px;
  line-height: 26px;
  padding-top: 0;
  padding-bottom: 0;
}

.monitor-section .due-table tbody tr {
  height: 26px;
}

.monitor-bold td {
  font-weight: 700;
}

.monitor-vehicle {
  cursor: pointer;
}

.monitor-vehicle:hover td {
  background: #4a4845;
}

@media (max-width: 1400px) {
  .monitor-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .monitor-section {
    grid-template-columns: 1fr;
  }
}

.reports-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-input {
  width: var(--field-width);
  height: var(--field-height);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 14px;
}

.reports-table-wrap {
  max-height: 70vh;
}

.reports-table th,
.reports-table td {
  white-space: nowrap;
}

.reports-income-form {
  display: grid;
  gap: 12px;
}

.reports-income-table th,
.reports-income-table td,
.reports-expense-table th,
.reports-expense-table td {
  white-space: nowrap;
  font-size: 12px;
}

.reports-income-table tbody tr:nth-child(odd) {
  --row-shade: rgba(0, 0, 0, 0.14);
}

.reports-income-table tbody tr:nth-child(even) {
  --row-shade: rgba(0, 0, 0, 0.28);
}

.reports-income-table tbody td:not(.month-cell) {
  background-color: var(--row-shade) !important;
}

.reports-income-table td.month-cell,
.reports-income-table th.month-cell {
  color: #1b1a17;
  background-color: var(--month-bg) !important;
}

.reports-income-table tbody tr:nth-child(odd) .month-cell {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.14) !important;
}

.reports-income-table tbody tr:nth-child(even) .month-cell {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.28) !important;
}

.reports-income-table tbody td {
  transition: background-color 0.2s ease;
}

.reports-income-table tbody tr:hover td:not(.month-cell) {
  background-color: rgba(255, 255, 255, 0.08);
}

.reports-income-table tbody tr:hover .month-cell {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.12) !important;
}

.month-cell.month-1 { --month-bg: #a9d7ff; }
.month-cell.month-2 { --month-bg: #7fc4ff; }
.month-cell.month-3 { --month-bg: #b6e6b3; }
.month-cell.month-4 { --month-bg: #8fd98b; }
.month-cell.month-5 { --month-bg: #6fca70; }
.month-cell.month-6 { --month-bg: #ffb3b3; }
.month-cell.month-7 { --month-bg: #ff8f8f; }
.month-cell.month-8 { --month-bg: #ff6f6f; }
.month-cell.month-9 { --month-bg: #ffd2a6; }
.month-cell.month-10 { --month-bg: #ffb978; }
.month-cell.month-11 { --month-bg: #ff9f5a; }
.month-cell.month-12 { --month-bg: #b3c9ff; }

.reports-income-select {
  text-align: center;
}

.reports-income-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #b0d5f2;
}

@media print {
  .reports-controls {
    display: none;
  }

  .reports-table-wrap {
    max-height: none;
  }
}
.sms-cell {
  text-align: center;
}

.sms-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #b0d5f2;
}

@media (max-width: 1200px) {
  .due-section {
    grid-template-columns: 1fr;
  }
}

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.login-card {
  background: var(--panel);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: min(380px, 90vw);
  display: grid;
  gap: 12px;
}

.login-card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 15px;
}

.alert {
  background: #3b1f28;
  color: #ffd2dc;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.alert.success {
  background: #113221;
  color: #c6f6d5;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.admin-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
}

.admin-grid {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.admin-grid--two {
  grid-template-columns: max-content max-content;
  align-items: start;
  gap: 10px;
  justify-content: start;
}

.admin-grid--two .admin-card {
  max-width: 360px;
}

.admin-grid table input {
  width: 100%;
  min-width: 120px;
}

.admin-grid table form {
  display: contents;
}

.admin-narrow {
  max-width: 320px;
}

.admin-narrow table input,
.admin-narrow input {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  font-size: 14px;
  height: var(--field-height);
}
.table-wrap {
  overflow-x: auto;
}

.roman-controls {
  display: flex;
  align-items: center;
 }

.roman-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.roman-filter {
  display: inline-flex;
  align-items: center;
}

.roman-model-select {
  width: var(--field-width);
  height: var(--field-height);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 14px;
}

.roman-number {
  width: var(--field-width);
  height: var(--field-height);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #45423f;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 14px;
}

.roman-number::placeholder {
  color: #f2a3a3;
}

.roman-table th,
.roman-table td {
  white-space: nowrap;
}

.roman-vin {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roman-repair {
  text-align: center;
}

.roman-repair input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f6b3b3;
}

.copy-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #3a3836;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.roman-table thead th:nth-child(odd),
.roman-table tbody td:nth-child(odd) {
  background: #3b3937;
}

.roman-table thead th:nth-child(even),
.roman-table tbody td:nth-child(even) {
  background: #353432;
}

.roman-table td {
  font-size: 14px;
}

.roman-table th {
  font-size: 14px;
}

.roman-table tbody tr.repair-row td {
  background: #f6b3b3 !important;
  color: #1b1a17;
}

.roman-table td.roman-remain--mid {
  background: #f5d24a !important;
  color: #1b1a17;
  font-weight: 700;
}

.roman-table td.roman-remain--low {
  background: #f6b3b3 !important;
  color: #1b1a17;
  font-weight: 700;
}

.roman-table td.roman-remain--neg {
  background: #7d1f24 !important;
  color: #ffffff;
  font-weight: 700;
}

.table-empty {
  text-align: center;
  color: var(--muted);
}

.roman-print {
  display: none;
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header,
  .roman-page {
    display: none;
  }

  .site-main {
    padding: 0;
  }

  .roman-print {
    display: block;
  }

  .roman-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #000;
  }

  .roman-print-table th,
  .roman-print-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    text-align: left;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(90, 85, 80, 0.5);
}

.documents .doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.doc-card {
  text-decoration: none;
  color: var(--text);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #3f3d3b;
}

.print-panel {
  min-height: 70vh;
}

.print-placeholder {
  border: 2px dashed rgba(80, 75, 70, 0.8);
  padding: 40px 20px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-top: 18px;
}

.float-tip {
  position: absolute;
  z-index: 20;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #3a3836;
  color: #ffffff;
  font-size: 13px;
  box-shadow: var(--shadow);
  pointer-events: none;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .row-form input,
  .row-form select {
    min-width: var(--field-width);
    width: var(--field-width);
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
.due-table tbody td,
.roman-table tbody td,
.reports-table tbody td,
.admin-grid table tbody td {
  transition: background-color 0.22s ease;
}

.due-table tbody tr:hover td,
.roman-table tbody tr:hover td,
.reports-table tbody tr:hover td,
.admin-grid table tbody tr:hover td {
  background: #4a4845;
  transition-duration: 0.12s;
}
.pulse-alert {
  animation: pulseAlert 1.6s ease-in-out infinite;
  color: #5a1115;
}

@keyframes pulseAlert {
  0% {
    background-color: #45423f;
    color: #ffffff;
  }
  50% {
    background-color: #ffffff;
    color: #5a1115;
  }
  100% {
    background-color: #45423f;
    color: #ffffff;
  }
}
