/* ==========================================================================
   Treasure Bins - Master Design System & Global CSS Stylesheet
   Location: assets/css/style.css
   ========================================================================== */

/* Design Tokens & CSS Custom Properties */
:root {
  --color-brand-primary: #0F382C;   /* Deep Forest Green */
  --color-accent-primary: #16A34A;  /* Eco Green */
  --color-accent-secondary: #4ADE80;/* Emerald Light */
  --color-bg-main: #F8FAFC;         /* Soft Slate */
  --color-surface-white: #FFFFFF;   /* Pure White Container */
  --color-text-primary: #0F172A;    /* Dark Charcoal */
  --color-text-secondary: #64748B;  /* Muted Grey */
  --color-state-warning: #F59E0B;   /* Soft Amber */
  --color-state-error: #DC2626;     /* Crimson Red */
  --color-border-subtle: #E2E8F0;   /* Light Slate Border */
  --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Base Rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-brand-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--color-brand-primary);
}

/* Base Layout Components */
.tb-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.tb-card {
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

/* Button UI Components */
.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.tb-btn-primary {
  background-color: var(--color-accent-primary);
  color: #ffffff !important;
}

.tb-btn-primary:hover {
  background-color: #15803D;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.tb-btn-brand {
  background-color: var(--color-brand-primary);
  color: #ffffff !important;
}

.tb-btn-brand:hover {
  background-color: #0A261E;
}

.tb-btn-outline {
  background-color: transparent;
  border-color: var(--color-border-subtle);
  color: var(--color-text-primary);
}

.tb-btn-outline:hover {
  background-color: #F1F5F9;
}

/* Client Code Display Banner */
.tb-client-code-badge {
  background-color: var(--color-brand-primary);
  color: var(--color-accent-secondary);
  font-family: monospace;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  display: inline-block;
  border: 2px dashed var(--color-accent-secondary);
}

/* High-Contrast Mobile Operator Interface Rules */
.operator-view {
  background-color: #0F172A;
  color: #F8FAFC;
  min-height: 100vh;
}

.operator-card {
  background-color: #1E293B;
  border: 2px solid #334155;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.operator-btn-action {
  font-size: 1.25rem;
  padding: 1rem;
  width: 100%;
  border-radius: var(--radius-md);
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Status Badges */
.tb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tb-badge-active, .tb-badge-paid {
  background-color: #DCFCE7;
  color: #15803D;
}

.tb-badge-pending, .tb-badge-review {
  background-color: #FEF3C7;
  color: #B45309;
}

.tb-badge-suspended, .tb-badge-overdue {
  background-color: #FEE2E2;
  color: #B91C1C;
}

/* Data Tables */
.tb-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
}

.tb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--color-surface-white);
}

.tb-table th {
  background-color: #F1F5F9;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.tb-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.875rem;
}

/* Modals */
.tb-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.tb-modal-content {
  background-color: var(--color-surface-white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  padding: 2rem;
  box-shadow: var(--shadow-elevated);
}