﻿@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sora/Sora-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sora/Sora-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sora/Sora-Bold.ttf") format("truetype");
}

:root {
  --tms-ink: #0b1020;
  --tms-slate: #141a2b;
  --tms-panel: rgba(20, 26, 43, 0.92);
  --tms-card: rgba(24, 32, 54, 0.8);
  --tms-soft: #f1f5ff;
  --tms-muted: rgba(223, 234, 255, 0.7);
  --tms-accent: #22b5a4;
  --tms-accent-strong: #37d1bf;
  --tms-gold: #f0b429;
  --tms-border: rgba(120, 138, 180, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 6% -10%, rgba(34, 181, 164, 0.35), transparent 55%),
    radial-gradient(1000px 760px at 92% 6%, rgba(240, 180, 41, 0.25), transparent 55%),
    var(--tms-ink);
  color: var(--tms-soft);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
  opacity: 0.45;
  z-index: -1;
}

.tms-shell {
  display: flex;
  min-height: 100vh;
}

.tms-sidebar {
  width: 280px;
  background: var(--tms-panel);
  border-right: 1px solid var(--tms-border);
  padding: 28px 22px;
}

.tms-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.tms-brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
}

.tms-brand h1 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tms-brand span {
  display: block;
  font-size: 0.75rem;
  color: var(--tms-muted);
}

.tms-nav {
  display: grid;
  gap: 8px;
}

.tms-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--tms-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tms-nav a:hover,
.tms-nav a.active {
  background: rgba(34, 181, 164, 0.16);
  border-color: rgba(34, 181, 164, 0.4);
  transform: translateX(2px);
}

.tms-nav .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--tms-accent);
  box-shadow: 0 0 12px rgba(34, 181, 164, 0.8);
}

.tms-sidebar .tms-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(223, 234, 255, 0.5);
  margin: 26px 0 10px;
}

.tms-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tms-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--tms-border);
  background: rgba(12, 18, 34, 0.7);
  backdrop-filter: blur(16px);
}

.tms-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 999px;
  min-width: 260px;
}

.tms-search input {
  border: none;
  background: transparent;
  color: var(--tms-soft);
  outline: none;
  width: 100%;
}

.tms-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tms-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 181, 164, 0.6), rgba(240, 180, 41, 0.6));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b1020;
}

.tms-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 181, 164, 0.2);
  color: var(--tms-soft);
  font-size: 0.75rem;
  border: 1px solid rgba(34, 181, 164, 0.45);
}

.tms-card {
  background: var(--tms-card);
  border: 1px solid var(--tms-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(4, 8, 19, 0.35);
}

.tms-card h3 {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.tms-card .tms-value {
  font-size: 2rem;
  font-weight: 700;
}

.tms-card .tms-sub {
  color: var(--tms-muted);
  font-size: 0.85rem;
}

.tms-card--highlight {
  background: linear-gradient(145deg, rgba(34, 181, 164, 0.28), rgba(24, 32, 54, 0.9));
}

.tms-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tms-table {
  width: 100%;
  color: var(--tms-soft);
}

.tms-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(223, 234, 255, 0.6);
  border-bottom: 1px solid var(--tms-border);
  padding-bottom: 10px;
}

.tms-table td {
  padding: 14px 0;
  border-bottom: 1px solid rgba(120, 138, 180, 0.18);
}

.form-control,
.form-select {
  background: rgba(12, 18, 34, 0.6);
  border: 1px solid rgba(120, 138, 180, 0.35);
  color: var(--tms-soft);
}

.form-control:disabled,
.form-select:disabled {
  background: rgba(12, 18, 34, 0.45);
  color: rgba(223, 234, 255, 0.6);
  border-color: rgba(120, 138, 180, 0.2);
}

.form-control::placeholder {
  color: rgba(223, 234, 255, 0.45);
}

.form-control:focus,
.form-select:focus {
  background: rgba(12, 18, 34, 0.75);
  border-color: rgba(34, 181, 164, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(34, 181, 164, 0.2);
  color: var(--tms-soft);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.8) contrast(1.1) !important;
  opacity: 1 !important;
  cursor: pointer;
}

.form-control[type="month"]::-webkit-calendar-picker-indicator,
.form-control[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.8) contrast(1.1) !important;
  opacity: 1 !important;
}

.tms-upload-form {
  display: grid;
  gap: 6px;
  width: min(260px, 100%);
}

.tms-upload-form .form-control {
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
}

.tms-file-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tms-file-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.tms-file-name {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-check-input {
  background-color: rgba(12, 18, 34, 0.8);
  border-color: rgba(120, 138, 180, 0.5);
}

.form-check-input:checked {
  background-color: var(--tms-accent);
  border-color: var(--tms-accent-strong);
}

.alert {
  border-radius: 16px;
  background: rgba(12, 18, 34, 0.7);
  border: 1px solid rgba(120, 138, 180, 0.35);
  color: var(--tms-soft);
}

.btn-close {
  filter: invert(1);
}

.offcanvas {
  background: var(--tms-panel);
  color: var(--tms-soft);
}

.offcanvas .offcanvas-title {
  color: var(--tms-soft);
}

.tms-offcanvas-wide {
  width: min(1100px, 95vw);
}

.tms-offcanvas-bottom {
  --bs-offcanvas-height: 55vh;
  height: var(--bs-offcanvas-height);
  max-height: 85vh;
}

.tms-offcanvas-bottom .offcanvas-body {
  overflow-y: auto;
}

.accordion-item {
  background: transparent;
  border: 1px solid var(--tms-border);
  border-radius: 16px;
  overflow: hidden;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  background: rgba(20, 26, 43, 0.92);
  color: var(--tms-soft);
  box-shadow: none;
  border: none;
  padding: 16px 20px;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-button:not(.collapsed) {
  background: rgba(34, 181, 164, 0.2);
  color: var(--tms-soft);
}

.accordion-body {
  background: rgba(12, 18, 34, 0.9);
  border-top: 1px solid var(--tms-border);
}

.tms-modal {
  background: var(--tms-panel);
  color: var(--tms-soft);
  border: 1px solid var(--tms-border);
}

.tms-modal .modal-header,
.tms-modal .modal-footer {
  border-color: var(--tms-border);
}

.tms-receipt-frame {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 12px;
  background: #fff;
}

.btn-tms {
  background: linear-gradient(135deg, var(--tms-accent), var(--tms-accent-strong));
  color: #07111f;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(34, 181, 164, 0.35);
}

.btn-tms-outline {
  border: 1px solid rgba(240, 180, 41, 0.6);
  color: var(--tms-soft);
  background: transparent;
  border-radius: 12px;
  padding: 10px 18px;
}

.tms-animate {
  animation: tms-rise 0.6s ease forwards;
  opacity: 0;
  transform: translateY(12px);
}

@keyframes tms-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tms-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.tms-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 181, 164, 0.9), rgba(240, 180, 41, 0.8));
}

.tms-footer {
  color: rgba(223, 234, 255, 0.5);
  font-size: 0.75rem;
  padding: 14px 32px 24px;
}

.tms-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tms-btn-row form {
  margin: 0;
}

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

.tms-login-logo {
  width: min(260px, 70vw);
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

.tms-onboarding-float-actions {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1040;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--tms-border);
  border-radius: 14px;
  background: rgba(10, 18, 36, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 992px) {
  .tms-topbar {
    padding: 18px 20px;
  }

  .tms-search {
    display: none;
  }
}

@media (max-width: 768px) {
  .tms-header-actions .btn {
    flex: 1 1 100%;
  }

  .tms-onboarding-float-actions {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: stretch;
  }

  .tms-onboarding-float-actions .btn {
    flex: 1 1 50%;
  }

  .tms-table--stack thead {
    display: none;
  }

  .tms-table--stack,
  .tms-table--stack tbody,
  .tms-table--stack tr,
  .tms-table--stack td {
    display: block;
    width: 100%;
  }

  .tms-table--stack tr {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--tms-border);
    border-radius: 16px;
    background: rgba(12, 18, 34, 0.55);
  }

  .tms-table--stack td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(120, 138, 180, 0.2);
    overflow-wrap: anywhere;
  }

  .tms-table--stack td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--tms-muted);
    flex: 0 0 42%;
  }

  .tms-table--stack td:last-child {
    border-bottom: 0;
  }

  .tms-table--stack td[colspan] {
    display: block;
    border-bottom: 0;
    padding: 8px 0;
  }

  .tms-table--stack td[colspan]::before {
    content: none;
  }

  .tms-table--form td {
    flex-direction: column;
    align-items: stretch;
  }

  .tms-table--form td::before {
    flex: none;
    margin-bottom: 6px;
  }

  .tms-table--form td > .form-control,
  .tms-table--form td > .form-select,
  .tms-table--form td > .input-group,
  .tms-table--form td > .btn,
  .tms-table--form td > .tms-file-picker {
    width: 100%;
  }

  .tms-table--form td > .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    align-self: flex-start;
    flex: 0 0 auto;
    margin-top: 2px;
  }

  .table-responsive {
    overflow-x: visible;
  }

  .tms-table--stack {
    width: 100%;
    min-width: 0;
  }
}
