/* ==========================================================================
   Tactical B2B Portal (Staff & Client Desks)
   ========================================================================== */
.t-portal-shell {
  background-color: #fafafa;
  min-height: calc(100vh - 80px);
  padding: 40px 0 100px;
}

.t-portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 32px;
}

.t-portal-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
  color: #111111;
}

.t-portal-header p {
  color: #666666;
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.t-portal-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e4d2b;
  background: #eef3ef;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-block;
}

.t-portal-user-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: #555555;
}

.t-portal-logout-btn {
  color: #111111;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* 2-Column Layout */
.t-portal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}

.t-portal-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.t-portal-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.t-portal-card-sub {
  font-size: 0.88rem;
  color: #666666;
  margin: 0 0 24px;
}

/* Forms */
.t-field-wrap {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.t-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.t-field-wrap label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #111111;
  margin-bottom: 6px;
}

.t-field-wrap input,
.t-field-wrap select,
.t-field-wrap textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  outline: none;
  background: #ffffff;
}

.t-field-wrap input:focus,
.t-field-wrap select:focus,
.t-field-wrap textarea:focus {
  border-color: #111111;
  box-shadow: 0 0 0 1px #111111;
}

.t-field-wrap small {
  font-size: 0.75rem;
  color: #888888;
  margin-top: 4px;
}

/* Recent List */
.t-portal-recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t-recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  background: #fafafa;
}

.t-recent-meta strong {
  display: block;
  font-size: 0.95rem;
  color: #111111;
}

.t-recent-meta span {
  font-size: 0.82rem;
  color: #555555;
  display: block;
}

.t-recent-meta small {
  font-size: 0.72rem;
  color: #999999;
}

.t-recent-val {
  text-align: right;
}

.t-recent-val strong {
  display: block;
  font-size: 0.98rem;
  color: #111111;
}

.t-status-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  margin-top: 4px;
}

.t-status-pending { background: #fef3c7; color: #92400e; }
.t-status-completed { background: #d1fae5; color: #065f46; }
.t-status-processing { background: #e0f2fe; color: #075985; }

.t-view-doc-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: #111111;
  border: 1px solid #d5d5d5;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  background: #ffffff;
  margin-left: 10px;
}

.t-portal-msg {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Authentication Card */
.t-portal-auth-card {
  max-width: 440px;
  margin: 60px auto;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.t-portal-auth-card h2 {
  font-size: 1.7rem;
  margin: 12px 0 6px;
}

.t-portal-auth-card p {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 24px;
}

.t-portal-auth-card form p {
  margin-bottom: 14px;
}

.t-portal-auth-card input[type="text"],
.t-portal-auth-card input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 0.92rem;
}

.t-portal-auth-card input[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #111111;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

@media (max-width: 1023px) {
  .t-portal-grid {
    grid-template-columns: 1fr;
  }
}








/* ==========================================================================
   Client Dashboard & Table UI
   ========================================================================== */
.t-client-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.t-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px 28px;
}

.t-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666666;
}

.t-kpi-num {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111111;
  margin: 6px 0 4px;
}

.t-card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.t-invoices-table-wrap {
  overflow-x: auto;
}

.t-invoices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.t-invoices-table th {
  text-align: left;
  padding: 12px 14px;
  background: #f7f7f7;
  color: #555;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5e5;
}

.t-invoices-table td {
  padding: 14px;
  border-bottom: 1px solid #eeeeee;
  vertical-align: middle;
}

.t-invoice-row:hover {
  background-color: #fbfbfb;
}

.t-invoice-check {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.t-amount-tag {
  font-size: 1.05rem;
  color: #111111;
}

.t-table-notes {
  font-size: 0.82rem;
  color: #777777;
}

/* Sticky Batch Payment Bar */
.t-batch-checkout-bar {
  position: sticky;
  bottom: 20px;
  margin-top: 24px;
  background: #1e4d2b;
  color: #ffffff;
  border-radius: 9999px;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 30px rgba(30, 77, 43, 0.35);
  z-index: 50;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.t-batch-summary {
  display: flex;
  align-items: center;
  gap: 24px;
}

.t-batch-total-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.t-batch-total-wrap strong {
  font-size: 1.4rem;
  font-weight: 800;
}

.t-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #1e4d2b;
}

.t-empty-state h4 {
  font-size: 1.2rem;
  color: #111;
  margin: 10px 0 4px;
}

.t-empty-state p {
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 767px) {
  .t-client-kpi-grid {
    grid-template-columns: 1fr;
  }
  .t-batch-checkout-bar {
    flex-direction: column;
    gap: 12px;
    border-radius: 12px;
    padding: 16px;
  }
}


/* ==========================================================================
   Staff Dashboard Navigation & Tab Architecture
   ========================================================================== */
.t-desk-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e5e5e5;
  margin-bottom: 28px;
  overflow-x: auto;
  overflow-y: hidden;       /* Suppress the vertical scrollbar */
  align-items: flex-end;    /* Cleanly aligns tabs against the bottom border */
}

.t-desk-nav {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge */
}

.t-desk-nav::-webkit-scrollbar {
  display: none;                /* Chrome / Safari / Opera */
}

.t-desk-tab {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #666666;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  outline: none;
  transition: all 0.15s ease-in-out;
}

/* Tab Hover & Focus - overrides the blue default fill */
.t-desk-tab:hover,
.t-desk-tab:focus {
  background: #f4f4f4;   /* Or set to transparent if you want underline-only */
  color: #111111;
  border-radius: 4px 4px 0 0;
}

.t-desk-tab.active {
  background: #ffffff;
  text-decoration: underline;
  color: #111111;
  border-bottom-color: #111111;
}

.t-badge-count {
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

/* Tab Panels */
.t-tab-panel {
  display: none;
}

.t-tab-panel.active {
  display: block;
  animation: fadeIn 0.15s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Action Buttons */
.t-btn-action {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 4px;
}

/* FIXED: closed brace added here */
.t-btn-action:hover {
  background: #f0f0f0;
}

.t-btn-action.t-btn-danger {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fff5f5;
}

.t-btn-action.t-btn-danger:hover {
  background: #fee2e2;
}

/* Clean Modals */
.t-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.t-modal-backdrop.open {
  display: flex;
}

.t-modal-card {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  max-width: 520px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.t-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}

.t-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.t-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}

/* Interactive Client Drill-Down Links */
.t-client-drilldown-link {
  text-decoration: none;
  color: #111111;
  display: inline-flex;
  flex-direction: column;
  transition: color 0.15s ease;
}

.t-client-drilldown-link strong {
  font-size: 0.95rem;
  border-bottom: 1px dotted #888888;
}

.t-client-drilldown-link:hover strong {
  color: #1e4d2b;
  border-bottom-color: #1e4d2b;
}

.t-view-invoices-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e4d2b;
  margin-top: 2px;
}



