:root {
  --bg: #d6f6eb;
  --shell: #eef3f8;
  --sidebar: #f8fafc;
  --card: #ffffff;
  --line: #d9e1ea;
  --line-soft: #ebf0f5;
  --text: #142033;
  --muted: #6e7b8f;
  --accent: #2d7ff9;
  --accent-soft: #e7f0ff;
  --success: #11a36a;
  --danger: #d3485b;
  --shadow: 0 18px 45px rgba(20, 32, 51, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #8de1c8 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px;
  backdrop-filter: blur(14px);
}

.auth-card h1,
.brand h1,
.brand p,
.topbar h2,
.empty-card h3,
.modal-header h3 {
  margin: 0;
}

.auth-copy,
.brand p,
.eyebrow,
.status-message,
.sidebar-footer,
.transaction-meta {
  color: var(--muted);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
}

.auth-input,
.search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.auth-input:focus,
.search-input:focus {
  border-color: var(--accent);
}

.primary-button,
.secondary-button,
.icon-button,
.arrow-button {
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-button,
.secondary-button {
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, #1f4ed8, #56c8ff);
  color: #fff;
  margin-top: 8px;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.secondary-button {
  background: #eff5ff;
  color: var(--accent);
}

.status-message {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 14px;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--danger);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--shell);
  border-radius: 0;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 250px 1fr;
  overflow: hidden;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line-soft);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1f4ed8, #56c8ff);
  color: #fff;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-section-gap {
  height: 16px;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 14px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.main-panel {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bookings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.bookings-toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.booking-create-button {
  margin-top: 0;
  white-space: nowrap;
}

.sort-select {
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 14px;
  padding: 10px 14px;
  outline: none;
}

.sort-select:focus {
  border-color: var(--accent);
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-label {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.app-status {
  margin-top: -6px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.table-card,
.empty-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(20, 32, 51, 0.05);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.data-table thead th {
  background: #edf3fb;
  color: #59708a;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}

.data-table thead th:first-child {
  border-top-left-radius: 16px;
}

.data-table thead th:last-child {
  border-top-right-radius: 16px;
}

.data-table tbody td {
  background: #fff;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: #fbfdff;
}

.arrow-col {
  width: 110px;
  text-align: center;
}

.transactions-cell {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  color: var(--success);
  background: #e8fbf3;
}

.badge.danger {
  color: var(--danger);
  background: #ffe9ec;
}

.balance-pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f7ff;
  color: #1747b8;
  font-weight: 700;
}

.arrow-button {
  min-width: 72px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.arrow-button:hover,
.icon-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--text);
  font-size: 22px;
}

.masked {
  color: var(--muted);
  font-style: italic;
}

.mono-text {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.hover-detail {
  cursor: help;
}

.empty-table-state,
.no-transactions {
  padding: 18px;
  border-radius: 16px;
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 34, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px 22px 24px;
  max-height: 70vh;
  overflow: auto;
}

.modal-form {
  padding: 20px 22px 24px;
  display: grid;
  gap: 12px;
}

.transaction-list {
  display: grid;
  gap: 12px;
}

.transaction-item {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  background: #fbfdff;
}

.transaction-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.transaction-type,
.transaction-amount {
  font-weight: 700;
}

.transaction-amount {
  color: #1747b8;
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    margin: 0;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .topbar,
  .topbar-actions,
  .session-meta,
  .bookings-toolbar,
  .bookings-toolbar-group {
    flex-direction: column;
    align-items: stretch;
  }
}
