:root {
  --primary: #2563eb;
  --accent: #0f766e;
  --ink: #172438;
  --muted: #69778b;
  --line: #e6ebf2;
  --bg: #f5f7fb;
  --radius: 15px;
  font-family:
    Inter,
    "Noto Sans Georgian",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 10px 15px;
  font-weight: 600;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #edf2fa;
  box-shadow: 0 2px 8px #1521390a;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.primary:hover {
  background: var(--primary);
  filter: brightness(0.94);
}
.danger {
  color: #b42318;
}
.small {
  padding: 6px 10px;
  font-size: 12px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
input,
select,
textarea {
  border: 1px solid #d9e1ed;
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}
textarea {
  min-height: 92px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #47546a;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  background: #101b2f;
  color: #a8b5ca;
  padding: 28px 17px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: white;
  padding: 0 10px 30px;
}
.brand-symbol {
  background: var(--primary);
  border-radius: 10px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}
.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}
.brand b {
  font-size: 15px;
  display: block;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: #8495ae;
  font-size: 10px;
  letter-spacing: 1.5px;
}
.nav-caption {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 7px 13px 12px;
  color: #65768e;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #aebdd2;
  font-size: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 500;
}
.nav a:hover {
  background: #1c2b42;
  color: white;
}
.nav a.active {
  background: #263d65;
  color: white;
  box-shadow: inset 3px 0 var(--primary);
}
.nav svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}
.side-foot {
  margin-top: auto;
  padding: 25px 12px 0;
  font-size: 11px;
  color: #7f91ac;
}
.side-foot p {
  margin-bottom: 6px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: #ffffffef;
  backdrop-filter: blur(12px);
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 0 35px;
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 540px;
}
.search-wrap input {
  border: 0;
  background: #f4f6fa;
  font-size: 12px;
  padding: 13px 16px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7edff;
  color: var(--primary);
  font-weight: bold;
}
.top-user {
  font-size: 12px;
}
.top-user small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.content {
  padding: 34px;
  max-width: 1680px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-head h1 {
  margin: 5px 0 7px;
}
.page-head p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 3px 7px #20334e02;
}
.metric-label {
  color: var(--muted);
  font-size: 11px;
}
.metric-value {
  display: block;
  font-size: 29px;
  font-weight: 650;
  margin: 14px 0 9px;
  letter-spacing: -1px;
}
.metric-foot {
  font-size: 10px;
  color: var(--accent);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.panel-body {
  padding: 23px;
}
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #7e8ba0;
  font-weight: 600;
  background: #f9fafc;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #edf1f6;
  font-size: 12px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcff;
}
.badge {
  display: inline-block;
  font-size: 10px;
  border-radius: 6px;
  padding: 5px 9px;
  background: #eaf0fc;
  color: #3d5e98;
  font-weight: 600;
}
.badge.active,
.badge.delivered,
.badge.paid,
.badge.ready {
  background: #e4f5ee;
  color: #137f56;
}
.badge.suspended,
.badge.cancelled,
.badge.urgent,
.badge.unpaid {
  background: #fdeae8;
  color: #b74b45;
}
.badge.in_progress,
.badge.grace {
  background: #fff2d8;
  color: #aa781d;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 240px;
}
.toolbar input[type="date"] {
  max-width: 155px;
}
.toolbar select {
  max-width: 180px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-size: 11px;
  color: var(--muted);
}
.empty {
  padding: 55px 20px;
  text-align: center;
  color: var(--muted);
}
.empty b {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 10px;
}
.error {
  background: #fff0ee;
  color: #aa3028;
  padding: 15px;
  border: 1px solid #ffd8d3;
  border-radius: 9px;
  margin-bottom: 15px;
  line-height: 1.6;
}
.notice {
  padding: 12px 20px;
  background: #fff4d8;
  border-bottom: 1px solid #f2dfac;
  font-size: 12px;
  color: #8b651e;
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #142138;
  color: white;
  box-shadow: 0 12px 30px #0013;
  padding: 16px 24px;
  z-index: 200;
  border-radius: 10px;
  max-width: min(430px, 90vw);
}
.toast.bad {
  background: #942b2b;
}
.board {
  display: flex;
  gap: 17px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 15px;
}
.board-column {
  flex: 0 0 280px;
  background: #edf1f7;
  border-radius: 12px;
  padding: 13px;
}
.board-column h3 {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px;
}
.job-card {
  background: white;
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 11px;
  margin-bottom: 12px;
  box-shadow: 0 3px 5px #13294003;
}
.job-card h3 {
  font-size: 14px;
  padding: 0;
  margin: 12px 0 8px;
}
.job-card p {
  font-size: 11px;
  margin-bottom: 12px;
  color: var(--muted);
}
.job-card select {
  margin-top: 12px;
  padding: 8px;
  font-size: 11px;
}
.job-card .card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.bars {
  display: grid;
  gap: 17px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 7px;
}
.bar-track {
  height: 8px;
  background: #f0f3f8;
  border-radius: 8px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 8px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  font-size: 12px;
}
.list-row:last-child {
  border: 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0b183a73;
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal {
  width: 760px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 18px;
  box-shadow: 0 24px 90px #08142840;
}
.modal.wide {
  width: 1080px;
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
}
.modal-head h2 {
  margin: 0;
  font-size: 18px;
}
.modal-body {
  padding: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-footer {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 12px;
}
.checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 0;
}
.permission-table td {
  padding: 10px;
}
.permission-table label {
  align-items: center;
}
.key-value {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.key-value span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}
.key-value b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.section-title {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.initial-loader {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.mobile-menu {
  display: none;
}
.login-page {
  background: #fff;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.login-story {
  background:
    radial-gradient(ellipse at 30% 20%, #274b81, transparent 55%), #101d34;
  color: white;
  padding: 55px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-story h1 {
  font-size: 44px;
  line-height: 1.45;
  margin-top: 24px;
}
.login-story p {
  max-width: 440px;
  color: #acbcd3;
}
.login-story .eyebrow {
  color: #8da9d0;
}
.wordmark {
  letter-spacing: 3px;
  font-weight: bold;
}
.login-story > span:last-child {
  color: #8ca1c0;
  font-size: 12px;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: 360px;
  max-width: calc(100% - 40px);
  padding: 50px 0;
}
.login-card h2 {
  font-size: 30px;
  margin: 15px 0 10px;
}
.login-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 30px;
}
.login-card form {
  display: grid;
  gap: 20px;
  margin-bottom: 22px;
}
.login-card a {
  font-size: 12px;
}
.search-results {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px #0a234322;
  padding: 15px;
  max-height: 60vh;
  overflow: auto;
  z-index: 50;
}
.search-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  font-size: 12px;
}
.search-results h3 {
  font-size: 10px;
  margin: 12px 7px 7px;
  color: var(--muted);
}
.job-sheet {
  max-width: 950px;
  margin: 35px auto;
  background: white;
  padding: 50px;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 25px;
}
.sheet-totals {
  max-width: 300px;
  margin: 30px 0 30px auto;
}
.sheet-totals p {
  display: flex;
  justify-content: space-between;
}
.print-page {
  background: #eceff4;
}
.print-page footer {
  margin-top: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.loading {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 1150px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .top-user {
    display: none;
  }
  .content {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    width: 210px;
  }
  .brand b {
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .workspace {
    width: 100%;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 240px;
    box-shadow: 15px 0 50px #0002;
  }
  .sidebar.open {
    transform: none;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    height: 66px;
    padding: 0 15px;
    gap: 10px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions > a {
    font-size: 11px;
  }
  .avatar {
    display: none;
  }
  .content {
    padding: 22px 15px;
  }
  .page-head {
    align-items: flex-start;
    gap: 15px;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .page-head .actions button {
    font-size: 11px;
    padding: 9px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric-value {
    font-size: 25px;
  }
  .metric-label {
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .checks {
    grid-template-columns: 1fr 1fr;
  }
  .modal-backdrop {
    padding: 8px;
  }
  .modal {
    border-radius: 13px;
    max-height: 96vh;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-head {
    padding: 16px;
  }
  .key-value {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar {
    padding: 12px;
    gap: 7px;
  }
  .toolbar input {
    max-width: 100%;
  }
  .login-layout {
    display: block;
  }
  .login-story {
    padding: 28px;
    min-height: 250px;
  }
  .login-story h1 {
    font-size: 28px;
    margin: 20px 0 10px;
  }
  .login-story > span:last-child,
  .login-story p,
  .login-story .eyebrow {
    display: none;
  }
  .login-card {
    margin: auto;
    padding: 40px 0;
  }
  .sheet-header {
    flex-wrap: wrap;
  }
  .job-sheet {
    padding: 20px;
    margin: 0;
  }
  .badge {
    font-size: 9px;
  }
  .pagination {
    gap: 10px;
  }
}
@media print {
  body.print-page {
    background: white;
  }
  .job-sheet {
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .no-print {
    display: none;
  }
  table {
    white-space: normal;
  }
  tr {
    break-inside: avoid;
  }
  thead {
    display: table-header-group;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}
/* Keep translated labels and currency amounts inside narrow mobile grid tracks. */
.metric,
.search-wrap {
  min-width: 0;
}
@media (max-width: 1150px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .metric-value {
    font-size: 22px;
    overflow-wrap: anywhere;
  }
}
