/* CSS Custom Properties - Caimito Brand Colors */
:root {
  --primary-color: #990066;
  --secondary-color: #007A00;
  --secondary-dark: #005500;
  --accent: #4a90e2;
  --text-dark: #2c3e50;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --border: #e9ecef;
  --light-gray: #f8f9fa;
}

/* ===== CSS Organization Philosophy =====
 *
 * This stylesheet balances semantic component classes with pragmatic utilities:
 *
 * SEMANTIC CLASSES (preferred):
 * - Describe WHAT something is, not HOW it looks
 * - Examples: .card-header, .toggle-container, .log-entry-card, .button-group
 * - Use these for reusable UI patterns and components
 *
 * UTILITY CLASSES (acceptable for layout/spacing):
 * - Low-level primitives for layout composition (flexbox, spacing, display)
 * - Keep minimal; prefer semantic classes where patterns emerge
 * - Examples: .flex, .gap-1, .mb-1 (but consider if a semantic class would be clearer)
 *
 * When refactoring: If you find yourself using the same combination of utilities
 * repeatedly, create a semantic class instead.
 */

/* ===== Layout Utilities ===== */
/* Low-level primitives for flexible composition */

/* Display utilities */
.d-none {
  display: none !important;
}

.d-block {
  display: block;
}

.d-inline {
  display: inline;
}

.d-inline-block {
  display: inline-block;
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.flex-2 {
  flex: 2;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.items-baseline {
  align-items: baseline;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

/* Gap utilities */
.gap-025 {
  gap: 0.25rem;
}

.gap-05 {
  gap: 0.5rem;
}

.gap-075 {
  gap: 0.75rem;
}

.gap-1 {
  gap: 1rem;
}

.gap-15 {
  gap: 1.5rem;
}

.gap-2 {
  gap: 2rem;
}

/* Margin utilities */
.m-0 {
  margin: 0;
}

.mb-025 {
  margin-bottom: 0.25rem;
}

.mb-05 {
  margin-bottom: 0.5rem;
}

.mb-075 {
  margin-bottom: 0.75rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-15 {
  margin-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.mt-025 {
  margin-top: 0.25rem;
}

.mt-05 {
  margin-top: 0.5rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-15 {
  margin-top: 1.5rem;
}

.mt-3 {
  margin-top: 3rem;
}

.ml-05 {
  margin-left: 0.5rem;
}

.ml-15 {
  margin-left: 1.5rem;
}

.mr-05 {
  margin-right: 0.5rem;
}

.my-025 {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Padding utilities */
.p-05 {
  padding: 0.5rem;
}

.p-1 {
  padding: 1rem;
}

.p-15 {
  padding: 1.5rem;
}

.p-2 {
  padding: 2rem;
}

.px-05 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-1 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-025 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-05 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.pt-1 {
  padding-top: 1rem;
}

.pt-2 {
  padding-top: 2rem;
}

/* Width utilities */
.w-auto {
  width: auto;
}

.w-full {
  width: 100%;
}

.max-w-700 {
  max-width: 700px;
}

.max-w-900 {
  max-width: 900px;
}

/* White-space utilities */
.nowrap {
  white-space: nowrap;
}

.pre-wrap {
  white-space: pre-wrap;
}

/* Position utilities */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

/* ===== Semantic Component Classes ===== */
/* These describe WHAT something IS, not HOW it looks */
/* Prefer creating/using these over combining utilities */

/* Card and section headers with actions */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.card-header h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Primary action button in card header */
.card-header-action {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-header-action:hover {
  background: var(--secondary-dark);
}

.card-header-action:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Legacy support - keeping for backwards compatibility */
.card-header .btn-primary,
.card-header .btn-secondary {
  width: auto;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Button grouping patterns */
.button-group {
  display: flex;
  gap: 0.5rem;
}

.button-group-end {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Dialog/modal action buttons */
.dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ===== Legacy Text/Color Utilities ===== */
/* MIGRATION NOTE: These color utilities remain for now due to extensive usage.
 * When refactoring templates, consider if a semantic class would be clearer.
 * Example: Instead of "text-muted text-small" for a status label, 
 * create ".status-label" or similar semantic class. */

/* Text alignment */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Semantic color names (acceptable) */
.text-primary {
  color: var(--primary-color);
}

.text-muted {
  color: #666;
}

.text-light {
  color: #a0aec0;
}

.text-secondary {
  color: #6c757d;
}

.text-slate {
  color: #4a5568;
}

.text-success {
  color: #28a745;
}

/* Timestamp styling for recent entries (< 30 minutes old) */
.timestamp-recent {
  color: #28a745;
  font-weight: 500;
}

.text-danger {
  color: #dc3545;
}

.text-warning {
  color: #f57c00;
}

/* Font sizing (consider semantic alternatives) */
.text-small {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-normal {
  font-size: 0.9rem;
}

.text-lg {
  font-size: 1.1rem;
}

/* Font weights */
.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* Text styling */
.italic {
  font-style: italic;
}

.no-underline {
  text-decoration: none;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wide {
  letter-spacing: 0.05em;
}

.leading-relaxed {
  line-height: 1.6;
}

.leading-loose {
  line-height: 1.7;
}

/* Border utilities */
.rounded {
  border-radius: 4px;
}

.rounded-md {
  border-radius: 6px;
}

.rounded-lg {
  border-radius: 8px;
}

.border {
  border: 1px solid #e0e0e0;
}

.border-t {
  border-top: 1px solid #e0e0e0;
}

/* Background utilities */
.bg-light {
  background: #f7fafc;
}

.bg-muted {
  background: #f8f9fa;
}

.bg-white {
  background: white;
}

/* Language switcher link */
.lang-link {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}

/* Form label */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.form-label-bold {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Form input */
.form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

/* Small hint text below form elements */
.form-hint {
  display: block;
  margin-top: 0.25rem;
  color: #6c757d;
  font-size: 0.75rem;
}

/* Small button sizing */
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-xs {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

/* Content box with padding and background */
.content-box {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
}

.content-box-padded {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Legal/article page container */
.legal-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.7;
}

/* Language switcher container */
.lang-switcher {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

/* Pricing link styles */
.pricing-lang-link {
  margin: 0 0.5rem;
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* List margin helper */
.list-indent {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

/* Role badges - block display for table layout */
.badge-consultant {
  background-color: #667eea;
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  display: inline-block;
  margin-top: 0.25rem;
  border-radius: 4px;
}

.badge-admin {
  background-color: #48bb78;
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  display: inline-block;
  margin-top: 0.25rem;
  border-radius: 4px;
}

.badge-member {
  background-color: #ed8936;
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  display: inline-block;
  margin-top: 0.25rem;
  border-radius: 4px;
}

/* Role badges - inline display for compact card layout */
.badge-consultant-inline,
.badge-admin-inline,
.badge-member-inline {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 500;
  vertical-align: middle;
}

.badge-consultant-inline {
  background-color: #667eea;
  color: white;
}

.badge-admin-inline {
  background-color: #48bb78;
  color: white;
}

.badge-member-inline {
  background-color: #ed8936;
  color: white;
}

/* Daily log responsive layout - uses container queries to switch views */
daily-log-display {
  display: block;
  container-type: inline-size;
}

.daily-log-responsive {
  container-type: inline-size;
}

/* Default: show table, hide cards */
.daily-log-table-view {
  display: block;
}

.daily-log-table-view table {
  display: table;
  width: 100%;
}

.daily-log-table-view thead {
  display: table-header-group;
}

.daily-log-table-view tbody {
  display: table-row-group;
}

.daily-log-table-view tr {
  display: table-row;
}

.daily-log-table-view th,
.daily-log-table-view td {
  display: table-cell;
}

.daily-log-card-view {
  display: none;
}

/* When container is narrow (< 450px), show cards, hide table */
@container (max-width: 449px) {
  .daily-log-table-view {
    display: none;
  }
  
  .daily-log-card-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Daily log compact card layout */
.daily-log-compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.log-entry-card {
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #e2e8f0;
}

.log-entry-content {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  color: #1f2937;
}

.log-entry-meta {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.log-entry-meta .timestamp-recent {
  color: #16a34a;
  font-weight: 500;
}

/* Warning box styles */
.warning-box {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Error border */
.border-error {
  border-left: 4px solid #f5c6cb;
}

.border-warning {
  border-left: 4px solid #ff9800;
}

/* Utility for text overflow ellipsis */
.overflow-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
}

.max-w-200 {
  max-width: 200px;
}

.max-w-250 {
  max-width: 250px;
}

.max-w-300 {
  max-width: 300px;
}

/* Font family utilities */
.font-mono {
  font-family: monospace;
}

/* Opacity utilities */
.opacity-90 {
  opacity: 0.9;
}

/* Background color utilities */
.bg-success {
  background-color: #28a745;
}

.bg-danger {
  background-color: #dc3545;
}

.bg-primary {
  background-color: var(--primary-color);
}

.bg-warning-light {
  background: #fef3c7;
}

/* Text colors from existing palette */
.text-error {
  color: #721c24;
}

.text-error-dark {
  color: #c82333;
}

.text-gray {
  color: #999;
}

.text-blue {
  color: #3b82f6;
}

.text-blue-dark {
  color: #0369a1;
}

.text-blue-darker {
  color: #0c4a6e;
}

.text-green {
  color: #15803d;
}

.text-green-dark {
  color: #166534;
}

/* SOW inline-block heading helper */
.d-inline-block {
  display: inline-block;
}

/* Tooltip positioning */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 10;
}

.tooltip-container:hover .tooltip-content {
  opacity: 1;
}

/* ===== Semantic Component Classes ===== */
/* Prefer these over utility combinations */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: #a0aec0;
  background: #f7fafc;
  border-radius: 6px;
  border: 2px dashed #e2e8f0;
}

.empty-state p {
  margin: 0;
}

.placeholder-box {
  padding: 2rem;
  text-align: center;
  color: #666;
  background: #f7fafc;
  border-radius: 6px;
}

/* Markdown content box */
.markdown-box {
  padding: 1rem;
  background: #f7fafc;
  border-radius: 6px;
}

/* Note/info box */
.note-box {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.note-box p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.note-box code {
  background: #fff;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--light-gray);
  min-height: 100vh;
  /* Base top padding; adjusted for safe areas below */
  padding-top: calc(60px + env(safe-area-inset-top, 0));
  /* Space for fixed navbar */
}

/* Adjust body padding when environment banner is present */
body:has(.environment-banner) {
  padding-top: calc(95px + env(safe-area-inset-top, 0));
  /* Space for fixed navbar + banner */
}

/* Header Styles */


/* Navigation Styles */
/* GitHub-like Navigation Styling */
nav.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #EEEEEE; /* Reverted to light theme */
  margin: 0;
  padding: env(safe-area-inset-top, 0) 1rem 0 0;
  box-shadow: 0 2px 8px var(--shadow);
  z-index: 1000;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

nav.main-nav a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  margin: 0;
  min-height: 44px;
  white-space: nowrap;
}

nav.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav.main-nav a:hover {
  color: var(--secondary-color);
}
nav.main-nav a:hover::after {
  width: calc(100% - 40px);
}
nav.main-nav a.active {
  color: var(--primary-color);
}
nav.main-nav a.active::after {
  width: 0;
}

/* Disabled navigation items (greyed out, not clickable) */
nav.main-nav a.nav-disabled {
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}
nav.main-nav a.nav-disabled:hover {
  color: #999;
}
nav.main-nav a.nav-disabled::after {
  display: none;
}

/* Navigation logo styling */
nav.main-nav a.nav-logo {
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

nav.main-nav a.nav-logo::after {
  display: none;
}

nav.main-nav a.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-auth-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 16px;
}

.nav-auth-actions .nav-login {
  padding: 12px 8px;
  font-weight: 500;
}
.nav-auth-actions .nav-login::after { display: none; }

/* Primary button variant for Sign Up in nav */
.nav-auth-actions .nav-signup.btn-primary {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 4px var(--shadow);
  width: auto;
  min-height: auto;
}
.nav-auth-actions .nav-signup.btn-primary:hover {
  background: var(--secondary-dark);
  color: var(--white);
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}
.nav-auth-actions .nav-signup.btn-primary::after { display: none; }

/* Outline variant for Sign Up */
.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-outline-primary:hover { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }
.btn-outline-primary:active { background: #cc0088; }
.btn-outline-primary::after { display: none; }
.nav-auth-actions .nav-signup.btn-outline-primary { width: auto; padding: 8px 18px; box-shadow: 0 2px 4px var(--shadow); }
.nav-auth-actions .nav-signup.btn-outline-primary:hover { box-shadow: 0 3px 6px rgba(0,0,0,0.25); }
.nav-auth-actions .nav-signup.btn-outline-primary::after { display: none; }

/* Authenticated block remains for existing layout */
.nav-authenticated {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: auto;
}

.nav-admin {
  display: flex;
  align-items: center;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
  padding: 0 10px;
}

.nav-admin-badge {
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}

.nav-consultant-badge {
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}

.nav-logout {
  background: var(--primary-color);
  color: var(--white) !important;
  padding: 8px 16px !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease;
  border: 1px solid var(--primary-color);
}

.nav-logout:hover {
  background: #cc0088;
  color: var(--white) !important;
  border-color: #cc0088;
}

.nav-logout::after {
  display: none;
}

/* Breakpoints */
/* >=600px adjustments */
@media (max-width: 599.98px) {

  /* Narrow phones / portrait large phones */
  nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nav-authenticated {
    flex-wrap: nowrap;
  }
}

/* 600–839: large phones & small tablets */
@media (min-width: 600px) and (max-width: 839.98px) {
  nav {
    flex-direction: row;
  }

  .nav-authenticated {
    flex-wrap: wrap;
  }
}

/* 840–1023: iPad portrait modern */
@media (min-width: 840px) and (max-width: 1023.98px) {
  .dashboard-content {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* 1024–1279: iPad Pro portrait & small desktop */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  /* Reserved for desktop-specific adjustments */
}

/* >=1280: desktop wide */
@media (min-width: 1280px) {
  .dashboard-content {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

h1 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Main Content */
main {
  background: #f8f9fa;
  padding: 2rem 1rem;
  margin: 1em auto 0 auto;
  max-width: none;
  width: 100%;
}

.welcome {
  text-align: center;
  padding: 2rem;
}

.welcome p {
  font-size: 1.1rem;
  margin: 1rem 0;
  color: #666;
}

.server-info {
  background: var(--white);
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.server-info p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.server-info strong {
  color: var(--secondary-color);
}





/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: var(--secondary-color);
}

.notification.error {
  background: var(--primary-color);
}

.notification.hidden {
  display: none;
}

/* Loading States */


/* Responsive Design */




/* PWA specific styles */


/* Development Info Styles */


.notification.success {
  background-color: var(--secondary-color);
  color: white;
}

/* Auth Page Styles */
.auth-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
  gap: 2rem;
}

.auth-container {
  background: var(--white);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--shadow);
  max-width: 900px;
  width: 100%;
  text-align: center;
}

/* Init page variant: allow broader width but stay centered */
.auth-container.init-container {
  max-width: 100%;
  width: 100%;
  padding: 2rem 1.5rem;
  box-shadow: none;
  background: transparent;
  text-align: left;
}

.auth-container.init-container h1 {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.auth-container.init-container .lead {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1rem;
}

.auth-container.init-container .card.compact {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.auth-container.init-container ol,
.auth-container.init-container ul {
  padding-left: 1.1rem;
  margin-top: 0.6rem;
}

.auth-container.init-container li {
  margin-bottom: 0.4rem;
}

@media (min-width: 600px) {
  .auth-container.init-container {
    max-width: 640px;
  }
}

.auth-form {
  margin: 2rem 0 1rem 0;
}

.form-columns {
  display: flex;
  gap: 2rem;
  text-align: left;
}

.form-column {
  flex: 1;
}

.form-column h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .form-columns {
    flex-direction: column;
    gap: 1rem;
  }
}

.authorization-checkbox {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.authorization-checkbox .checkbox-label input[type="checkbox"] {
  margin-right: 2rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  flex-shrink: 0;
  margin: 0;
  margin-top: 0.25rem;
  cursor: pointer;
  accent-color: var(--secondary-color);
}

.checkbox-text {
  line-height: 1.5;
  color: var(--text-dark);
}

.checkbox-text a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: underline;
}

.checkbox-text a:hover {
  color: var(--secondary-dark);
}

main.init-page {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  background: transparent;
}

main.init-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

main.init-page .lead {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.25rem;
}

main.init-page .card.compact {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
}

main.init-page ol,
main.init-page ul {
  padding-left: 1.1rem;
  margin-top: 0.6rem;
}

main.init-page li {
  margin-bottom: 0.45rem;
}

@media (max-width: 599.98px) {
  main.init-page {
    padding: 2rem 1rem 2.5rem;
  }

  main.init-page h1 {
    font-size: 1.75rem;
  }
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: auto;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--secondary-dark);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Full-width buttons in auth forms */
.auth-form .btn-primary,
.auth-form .btn-secondary {
  width: 100%;
}

/* Explicit full-width button class */
.btn-full-width {
  width: 100%;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-secondary {
  background: #6c757d;
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: #5a6268;
}

.message-container {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.message.hidden {
  display: none;
}

.message.success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border-left: 3px solid #4caf50;
}

.message.error {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
  border-left: 3px solid #ef5350;
}

.message.warning {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  color: #e65100;
  border-left: 3px solid #ff9800;
}

.message.info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border-left: 3px solid #2196f3;
}

.message a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message a:hover {
  text-decoration-thickness: 2px;
}

/* Alert card for multi-line setup banners */
.alert-card {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-card.warning {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  color: #e65100;
  border-left-color: #ff9800;
}

.alert-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-card p:not(:last-child) {
  margin-bottom: 0.5rem;
}

.alert-card .alert-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.alert-card .btn-primary {
  margin-top: 0.75rem;
}

/* Environment Banner */
.environment-banner {
  padding: 0.4rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  position: fixed;
  top: calc(57px + env(safe-area-inset-top, 0)); /* Position right after nav */
  left: 0;
  right: 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
}

.environment-banner.staging {
  background: #ff9800;
  color: #fff;
  border-bottom: 3px solid #f57c00;
}

.environment-banner.development {
  background: #2196f3;
  color: #fff;
  border-bottom: 3px solid #1976d2;
}

.environment-banner.test {
  background: #9c27b0;
  color: #fff;
  border-bottom: 3px solid #7b1fa2;
}

.signup-process-info-wrapper {
  max-width: 600px;
  width: 100%;
}

.signup-process-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
}

.signup-process-info h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.signup-steps {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.signup-steps-left,
.signup-steps-right {
  flex: 1;
}

@media (max-width: 768px) {
  .signup-steps {
    flex-direction: column;
    gap: 1rem;
  }
}

.signup-process-info ol {
  margin: 0;
  padding-left: 1.5rem;
}

.signup-process-info li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.signup-process-info li strong {
  color: var(--text-dark);
}

.signup-note {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
}

.auth-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.auth-footer a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Dashboard Styles */
.signup-progress-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 4px 20px var(--shadow);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0;
  position: relative;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 60px;
  bottom: -24px;
  width: 3px;
  background: #e9ecef;
}

.progress-step.completed::after {
  background: var(--secondary-color);
}

.progress-step.active::after {
  background: linear-gradient(to bottom, var(--secondary-color) 0%, #e9ecef 100%);
}

.progress-step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 3px solid #e9ecef;
  transition: all 0.3s ease;
}

.progress-step.completed .progress-step-circle {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white);
}

.progress-step.active .progress-step-circle {
  border-color: var(--secondary-color);
  border-width: 4px;
  animation: pulse 2s ease-in-out infinite;
}

.progress-step.pending .progress-step-circle {
  background: #f8f9fa;
  border-color: #e9ecef;
  color: #adb5bd;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(46, 125, 50, 0);
  }
}

.progress-step-number {
  font-size: 1.25rem;
  font-weight: 600;
}

.progress-step-content {
  flex: 1;
  padding-top: 0.5rem;
}

.progress-step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.progress-step.pending .progress-step-title {
  color: #adb5bd;
}

.progress-step-description {
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.5;
}

.progress-step.pending .progress-step-description {
  color: #adb5bd;
}

.progress-info-box {
  background: #f8f9fa;
  border-left: 4px solid var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.progress-info-box p {
  margin: 0;
  line-height: 1.6;
}

.progress-info-box p:first-child {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .signup-progress-container {
    padding: 1.5rem;
  }

  .progress-step {
    gap: 1rem;
  }

  .progress-step-circle {
    width: 40px;
    height: 40px;
  }

  .progress-step:not(:last-child)::after {
    left: 19px;
  }

  .progress-step-title {
    font-size: 1.1rem;
  }

  .progress-step-description {
    font-size: 0.9rem;
  }
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 1em;
}

/* Cards row container for flex layout */
.cards-row {
  display: flex;
  gap: 2rem;
  width: 100%;
}

/* Default behavior: cards in a row grow equally */
.cards-row > .card {
  flex: 1 1 0;
  min-width: 0; /* Prevent flex items from overflowing */
}

/* Priority cards get higher flex-grow for content-heavy cards */
.cards-row > .card-priority {
  flex: 2 1 0;
}

/* Two-up row explicitly for two equal-width cards */
.cards-row.two-up {
  display: flex;
  gap: 2rem;
}

.cards-row.two-up > .card {
  flex: 1;
}

/* Wide card takes full width - no flex needed, standalone */
.card-wide {
  width: 100%;
}

@media (max-width: 839.98px) {
  .cards-row,
  .cards-row.two-up {
    flex-direction: column;
  }
}

.card {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 1rem;
}

.card.sow-collapsed {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  padding: 1.5rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, padding 0.3s ease;
}

.card.sow-expanded {
  width: auto;
  min-width: 300px;
  max-width: none;
  flex: 1;
  cursor: pointer;
}

.sow-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sow-collapsed .sow-header,
.sow-card-collapsed .sow-header {
  writing-mode: horizontal-tb;
  white-space: nowrap;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.sow-expanded .sow-header,
.sow-card-expanded .sow-header {
  writing-mode: horizontal-tb;
  flex-direction: row;
}

.sow-collapsed .sow-header h3,
.sow-card-collapsed .sow-header h3 {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.9rem;
  margin: 0;
}

.sow-expanded .sow-header h3,
.sow-card-expanded .sow-header h3 {
  transform: none;
  writing-mode: horizontal-tb;
  font-size: 1.75rem;
  margin: 0;
}

.sow-toggle {
  font-size: 1em;
  color: #990066;
  line-height: 1;
}

.sow-collapsed .sow-toggle,
.sow-card-collapsed .sow-toggle {
  margin: 0;
}

.sow-expanded .sow-toggle,
.sow-card-expanded .sow-toggle {
  margin-left: 0.5rem;
}

.sow-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.sow-metadata {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.sow-description-section {
  margin-top: 1rem;
}

.sow-card-collapsed {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  padding: 1.5rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, padding 0.3s ease;
}

.sow-card-expanded {
  width: auto;
  min-width: 300px;
  max-width: none;
  flex: 1;
  cursor: pointer;
}

.btn-edit {
  background: var(--primary);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-edit:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* Latest Report Card Styling */
.report-week {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.report-released {
  margin-bottom: 1.5rem;
  color: #6c757d;
}

.release-badge {
  display: inline-block;
  background: #d4edda;
  color: #155724;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

/* Preview Badge and Styles */
.preview-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-badge-large {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid #ffc107;
}

.preview-reports-section {
  background: #fffef5;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.preview-section-heading {
  display: flex;
  align-items: center;
  margin: 0 0 0.5rem 0;
  color: #856404;
}

.preview-notice {
  color: #6c757d;
  font-style: italic;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.preview-table {
  background: #fff;
}

.preview-row td {
  background: #fffef5;
}

.btn-preview {
  background: #ffc107;
  color: #212529;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-preview:hover {
  background: #e0a800;
  color: #212529;
}

.btn-preview.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Preview banner for report display */
.preview-banner {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.preview-banner-icon {
  font-size: 1.5rem;
}

.preview-banner-content {
  flex: 1;
}

.preview-banner-title {
  font-weight: 700;
  color: #856404;
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.preview-banner-text {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

.report-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.report-actions .btn-primary,
.report-actions .btn-secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* Admin Badge */
.admin-badge {
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

/* Admin Actions */
.admin-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: nowrap;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary,
.action-buttons .btn-danger,
.action-buttons .btn-small {
  white-space: nowrap;
}

/* Form Help Text */
.help-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Info Grid */
.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

/* Calendar: Weekly grid */
.calendar-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-week {
  overflow-x: auto;
}

.calendar-week-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-week-grid th,
.calendar-week-grid td {
  padding: 6px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
}

.calendar-week-grid th:last-child,
.calendar-week-grid td:last-child {
  border-right: none;
}

.calendar-week-grid thead th {
  background: var(--light-gray);
  text-align: left;
}

.calendar-week-grid .time-col {
  width: 72px;
  white-space: nowrap;
}

.calendar-week-grid td.free {
  background: #f6fff7;
}

.calendar-week-grid td.busy {
  background: #fff6f6;
}

.form-actions {
  align-self: end;
}

.text-monospace {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-active {
  color: var(--success);
  font-weight: 500;
}

.status-inactive {
  color: var(--error);
  font-weight: 500;
}

/* User Management Tables */
.users-table {
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.users-table th,
.users-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  background: var(--light-gray);
  font-weight: 600;
}

/* Products Table */
.products-table {
  overflow-x: auto;
}

/* Generic responsive table wrapper if not already using specific class */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Ensure tables don't break layout on narrow viewports */
@media (max-width: 599.98px) {
  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.6rem 0.5rem;
  }
}

.products-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.products-table th,
.products-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.products-table th {
  background: var(--light-gray);
  font-weight: 600;
}

/* Small buttons for table actions */
.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: auto;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-danger:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Alias for backwards compatibility - prefer using .btn-small .btn-danger */
.btn-danger-small {
  background: #dc3545;
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-danger-small:hover {
  background: #c82333;
}

/* Status Badges */
.status-active {
  color: #28a745;
  font-weight: 500;
}

.status-inactive {
  color: #dc3545;
  font-weight: 500;
}

.current-user-badge {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

/* Forms */
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
  color: var(--text-dark);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Success/Error Messages - inherits from primary .message definition above */

.small-text {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Error Page Styles */
.error-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
}

.error-container {
  background: var(--white);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--shadow);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.error-message {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.error-actions {
  margin-top: 2rem;
}

.error-actions a {
  margin: 0 0.5rem;
}

/* Additional Badge Styles for Status */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.badge-secondary {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

/* Table Responsive */
.table-responsive {
  overflow-x: auto;
}

.table-responsive table {
  min-width: 600px;
  width: 100%;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.table-responsive th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Make first date column narrow yet flexible on dashboard tables */
.table-tight-date {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  /* allow natural content sizing */
}

.table-tight-date td {
  vertical-align: top;
}

.table-tight-date th:first-child,
.table-tight-date td:first-child {
  white-space: nowrap;
  width: 1%;
  /* hint to be as narrow as content allows */
}

/* Utility: make a specific table column as narrow as content allows */
.col-narrow {
  white-space: nowrap;
  width: 1%;
}
/* ===== Index Page Styles ===== */
/* Styles for the public landing/index page */

body.index-page {
  background: var(--light-gray);
}

body.index-page main {
  max-width: none;
  margin: 0;
}

.index-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.index-container.with-sidebar {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  align-items: flex-start;
}

.index-container.with-sidebar .main-content {
  flex: 1;
  min-width: 0;
}

.examples-sidebar {
  width: 380px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.examples-sidebar h3 {
  color: var(--primary-color);
  margin: 0 0 0.75rem 0;
  font-size: 1.3rem;
}

.examples-sidebar .sidebar-intro {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.example-entry {
  background: #f8f9fa;
  border-left: 3px solid var(--secondary-color);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  position: relative;
}

.example-entry:last-of-type {
  margin-bottom: 1.5rem;
}

.example-number {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--secondary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.example-entry p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-dark);
}

.sidebar-footer {
  font-size: 0.85rem;
  color: #495057;
  line-height: 1.5;
  font-style: italic;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
  margin: 0;
}


.hero {
  text-align: center;
  padding: 1rem 1rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.features-grid {
  display: flex;
  gap: 2rem;
  margin: 3rem 0;
  width: 100%;
  flex-wrap: wrap;
}

.feature-card {
  flex: 1;
  min-width: 280px;
  background: var(--white);
  border-radius: 15px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.feature-card p {
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feature-card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0.5rem;
}

.feature-card ul li {
  padding: 0.35rem 0;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.feature-card ul li:last-child {
  padding-bottom: 0;
}

.feature-card ul li:before {
  content: "✓ ";
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

.cta-section {
  text-align: center;
  padding: 1rem 1rem 2rem;
  margin: 1rem auto 2rem;
  max-width: 600px;
}

.cta-section h2 {
  margin-bottom: 0.5rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
}

.cta-section .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.outcome-focus {
  background: var(--white);
  border-left: 4px solid var(--secondary-color);
  padding: 1.25rem;
  margin: 1rem auto 2rem;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
}

.outcome-focus strong {
  color: var(--secondary-color);
  font-size: 1.05rem;
}

.outcome-focus p {
  margin: 0;
}

@media (max-width: 1200px) {
  .feature-card {
    flex: 1 1 calc(50% - 1rem);
  }
  
  .index-container.with-sidebar {
    flex-direction: column;
  }
  
  .examples-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    order: -1;
  }
}

@media (max-width: 768px) {
  .index-container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .features-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  .feature-card {
    flex: 1 1 100%;
  }
}

/* ===== Badge & Status Styles ===== */
/* Reusable badge and status indicator classes */

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.badge-secondary {
  background-color: #e2e3e5;
  color: #495057;
  border: 1px solid #d6d8db;
}

.badge-blocks {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #b8daff;
}

.badge-hourly {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.invoice-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.status-draft {
  background-color: #e2e3e5;
  color: #495057;
  border: 1px solid #d6d8db;
}

.status-sent {
  background-color: #cce7ff;
  color: #0066cc;
  border: 1px solid #99d6ff;
}

.status-paid {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-overdue {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ===== Data Table Styles ===== */
/* Reusable table styles for reports and data displays */

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.btn-link {
  display: inline-block;
  padding: 6px 12px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.btn-link:hover {
  background: #0056b3;
}

/* ===== Empty State Styles ===== */
/* Reusable empty state pattern */

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 1rem 0;
}

.empty-state-message {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 0.5rem 0;
}

.empty-state-description {
  color: #6c757d;
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
}

/* ===== Form Enhancement Styles ===== */
/* Enhanced form elements for better UX */

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #28a745;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toggle layout container */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-status-label {
  font-size: 0.85rem;
  color: #4a5568;
}

.toggle-unavailable {
  font-size: 0.85rem;
  color: #999;
}

/* Sanctioned countries in dropdown */
option.sanctioned-country {
  color: #999;
  font-style: italic;
}

/* Cards grid layout */
.cards-row {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.cards-row.two-up {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

@media (max-width: 768px) {
  .cards-row.two-up {
    grid-template-columns: 1fr;
  }
}

.work-type-selection {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.work-type-option {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.work-type-option:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.work-type-option.selected {
  border-color: #007bff;
  background-color: #e7f3ff;
}

.work-type-option input[type="radio"] {
  display: none;
}

.pricing-option {
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pricing-option:hover {
  border-color: #007bff;
}

.pricing-option.selected {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.pricing-fields {
  display: none;
  margin-top: 1rem;
}

.pricing-fields.active {
  display: block;
}

.work-form {
  display: none;
  margin-top: 1rem;
}

.work-form.active {
  display: block;
}

.warning {
  background-color: #fff3cd;
  color: #856404;
  padding: 0.75rem;
  border: 1px solid #ffeaa7;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

/* Wider form elements for better data entry */
.form-group textarea {
  width: 100%;
  min-width: 100%;
  resize: vertical;
}

.form-group textarea#description {
  min-height: 100px;
  font-family: inherit;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select {
  width: 100%;
  max-width: 500px;
}

/* ===== Report & Insights Container Styles ===== */
/* Page-specific containers for reports and insights */

.reports-container,
.report-container,
.insights-container,
.ai-insights-container {
  padding: 20px;
}

.report-container {
  padding: 30px 20px;
}

.report-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e5e9;
}

.report-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.week-range {
  font-size: 1.2em;
  color: #495057;
  font-weight: 500;
  margin: 10px 0;
}

.release-info {
  color: #6c757d;
  font-size: 0.95em;
  margin-top: 10px;
}

.release-badge {
  background: #e8f5e8;
  color: #28a745;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  margin-right: 5px;
}

.draft-info {
  color: #6c757d;
  font-size: 0.95em;
  margin-top: 10px;
}

.draft-badge {
  background: #fff3cd;
  color: #856404;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  margin-right: 5px;
}

.language-selector-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.language-selector-container label {
  font-weight: 500;
  color: #495057;
}

.language-selector-container select {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: white;
}

.customer-insights-section {
  margin-bottom: 40px;
  border-bottom: 2px solid #e1e5e9;
  padding-bottom: 30px;
}

.customer-insights-section:last-child {
  border-bottom: none;
}

.customer-header {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #bdc3c7;
}

.weekly-summaries {
  display: grid;
  gap: 20px;
}

.week-summary-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.week-summary-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.week-header h3 {
  margin: 0;
  color: #495057;
  font-size: 1.2em;
}

.week-meta {
  display: flex;
  gap: 15px;
  font-size: 0.9em;
  color: #6c757d;
}

.entry-count {
  background: #e3f2fd;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.word-count {
  background: #f3e5f5;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.week-entries {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 0 0 10px 0;
  color: #2c3e50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #6c757d;
}

.breadcrumb a {
  color: #0056b3;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #004494;
  text-decoration: underline;
}

.breadcrumb .separator {
  color: #dee2e6;
}

.insights-section {
  margin-bottom: 40px;
}

.insights-section h2 {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 15px;
}

/* Two-column layout for insights pages */
.insights-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.insights-main {
  flex: 1;
  min-width: 0; /* Prevent flex item from overflowing */
}

.insights-sidebar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
  .insights-layout {
    flex-direction: column;
  }
}

/* Remove bottom margin for sections inside insights-main */
.insights-main .insights-section {
  margin-bottom: 0;
}

/* Back link for navigation */
.back-link {
  display: inline-block;
  color: #0056b3;
  text-decoration: none;
  margin-bottom: 15px;
  font-size: 0.95em;
}

.back-link:hover {
  color: #004494;
  text-decoration: underline;
}

/* Content card styling for insights */
.content-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  min-height: 100px;
}

/* Styling for markdown-generated content inside cards */
.content-card h2 {
  font-size: 1.2em;
  margin: 1em 0 0.5em 0;
  color: #0056b3;
  font-weight: 600;
}

.content-card h3 {
  font-size: 1.05em;
  margin: 0.8em 0 0.4em 0;
  color: #495057;
  font-weight: 600;
}

.content-card ul,
.content-card ol {
  margin: 0.8em 0;
  padding-left: 1.8em;
}

.content-card li {
  margin: 0.4em 0;
}

.content-card p {
  margin: 0.8em 0;
}

.content-card strong {
  font-weight: 600;
  color: #0056b3;
}

.summary-content {
  line-height: 1.6;
  color: #2c3e50;
}

/* Grey placeholder text for empty states */
.placeholder-content {
  text-align: center;
  padding: 20px;
}

.placeholder-text {
  color: #adb5bd;
  font-style: italic;
  margin: 0;
}

/* Content header with metadata and edit button */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.content-header .metadata {
  font-size: 0.85em;
  color: #6c757d;
  font-style: italic;
}

/* Loading spinner and content */
.loading-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  color: #495057;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.section-header h2 {
  margin: 0;
  flex: 0 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.language-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.language-badge.original-badge {
  background: #e7f3ff;
  color: #0056b3;
}

.language-badge.ai-translation-badge {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.generate-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.generate-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Invoice-Specific Styles ===== */

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px var(--shadow);
  text-align: center;
}

.summary-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.customer-group {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.customer-group h4 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.products-table table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th,
.products-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.products-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* ===== Daily Log Page Styles ===== */

body.daily-log-page .daily-log-container {
  max-width: 900px;
  margin: 0 auto;
}

body.daily-log-page .daily-log-layout {
  display: flex;
  gap: 2.5rem;
  max-width: 1600px; /* Expanded for large displays (e.g., 24" screens) */
  margin: 0 auto;
  padding: 0 2rem; /* Add horizontal breathing room */
}

@media (max-width: 768px) {
  body.daily-log-page .daily-log-layout {
    flex-direction: column;
  }

  body.daily-log-page .daily-log-sidebar {
    width: 100%;
    order: -1; /* Show help box at top on mobile */
  }

  body.daily-log-page .help-box {
    position: static;
  }
}

body.daily-log-page .daily-log-main {
  flex: 3; /* Give main content more weight while allowing sidebar presence */
  min-width: 0;
}

body.daily-log-page .daily-log-sidebar {
  flex: 2; /* Allow sidebar to grow proportionally */
  min-width: 320px;
  max-width: 520px; /* Wider help content on large screens */
}

body.daily-log-page .help-box {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 90px; /* Account for fixed navbar */
}

body.daily-log-page .help-box h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

body.daily-log-page .help-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.daily-log-page .help-box li {
  padding: 0.5rem 0;
  color: var(--text-dark);
  line-height: 1.5;
}

body.daily-log-page .help-box li:before {
  content: "💡 ";
  margin-right: 0.5rem;
}

/* ===== Contact Section Styles ===== */
/* Note: .message styles are defined in primary message section above */

.contact-section {
  margin-top: 40px;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.contact-section h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.contact-section p {
  color: #6c757d;
  margin-bottom: 20px;
}

.btn-schedule {
  display: inline-block;
  padding: 12px 24px;
  background: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.btn-schedule:hover {
  background: #218838;
  transform: translateY(-1px);
}

.contact-email {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  margin: 0 auto;
  max-width: 500px;
}

.email-link {
  color: #007bff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

.email-link:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* ===== Weekly Report Specific Styles ===== */

.report-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.report-section h2 {
  color: #0056b3;
  font-size: 1.4em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.report-content {
  line-height: 1.6;
  color: #2c3e50;
  font-size: 0.95em;
}

.report-content h2 {
  font-size: 1.1em;
  margin: 0.8em 0 0.4em 0;
  color: #0056b3;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 0;
}

.report-content h3 {
  font-size: 1em;
  margin: 0.6em 0 0.3em 0;
  color: #495057;
  font-weight: 600;
}

.report-content p {
  margin: 0.5em 0;
}

.report-content ul, .report-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.report-content li {
  margin: 0.3em 0;
}

.report-content strong {
  font-weight: 600;
  color: #0056b3;
}

.report-content code {
  background: #f8f9fa;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
  color: #e83e8c;
}

.report-content blockquote {
  border-left: 4px solid #0056b3;
  padding-left: 1em;
  margin: 1em 0;
  color: #495057;
  font-style: italic;
}

.report-content em {
  font-style: italic;
  color: #495057;
}

/* Report metadata header - matches insights page styling */
.report-metadata-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.report-metadata {
  font-size: 0.85em;
  color: #6c757d;
  font-style: italic;
}

.report-metadata-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-metadata .fresh-badge {
  background: #28a745;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 500;
  margin-left: 8px;
  font-style: normal;
}

/* Language selector - standalone inline style matching insights page */
.language-selector {
  width: auto;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85em;
  color: #495057;
  transition: border-color 0.2s ease;
}

.language-selector:hover {
  border-color: #0056b3;
}

.language-selector:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

/* Report section styling - consistent wrapper for summary/recommendations/conclusions */
.report-section {
  background: #f8f9fa;
  border-left: 4px solid #0056b3;
  padding: 15px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.report-section h2 {
  font-size: 1.1em;
  margin: 0 0 0.8em 0;
  color: #0056b3;
  font-weight: 600;
}

/* Report content header with edit button */
.report-content-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.edit-btn,
.edit-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.85em;
  cursor: pointer;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #ffffff;
  color: #495057;
  transition: all 0.2s ease;
}

.edit-btn:hover,
.edit-report-btn:hover {
  background: #e9ecef;
  border-color: #0056b3;
  color: #0056b3;
}

/* Report edit mode styles */
.report-edit-section {
  background: #fff8e6;
  border-left-color: #ffc107;
}

.report-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ffe8a1;
}

.editing-label {
  font-weight: 600;
  color: #856404;
  font-size: 0.9em;
}

.report-edit-actions {
  display: flex;
  gap: 8px;
}

.save-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.85em;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background: #28a745;
  color: white;
  transition: all 0.2s ease;
}

.save-report-btn:hover:not(:disabled) {
  background: #218838;
}

.save-report-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cancel-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.85em;
  cursor: pointer;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #ffffff;
  color: #495057;
  transition: all 0.2s ease;
}

.cancel-edit-btn:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #6c757d;
}

.cancel-edit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.report-edit-textarea {
  width: 100%;
  min-height: 400px;
  padding: 12px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
  line-height: 1.5;
  border: 1px solid #ced4da;
  border-radius: 6px;
  resize: vertical;
  background: #ffffff;
}

.report-edit-textarea:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.15);
}

.report-edit-textarea:disabled {
  background: #f8f9fa;
  cursor: not-allowed;
}

.edit-hint {
  margin-top: 8px;
  font-size: 0.8em;
  color: #856404;
  font-style: italic;
}

.report-footer {
  margin-top: 40px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-link {
  color: #0056b3;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.btn-link:hover {
  background: #e9ecef;
  text-decoration: underline;
}

/* ===== Daily Log Entry Card Styles ===== */

body.daily-log-page .help-examples {
  background: white;
  border-radius: 6px;
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
  border-left: 3px solid #007bff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

body.daily-log-page .help-examples h5 {
  margin-top: 0;
  font-size: 0.95rem;
  color: #007bff;
}

body.daily-log-page .help-examples ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
}

body.daily-log-page .help-examples li {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

@media (min-width: 1400px) {
  body.daily-log-page .daily-log-layout {
    gap: 3rem;
    padding: 0 3rem;
  }
  body.daily-log-page .help-box h4 {
    font-size: 1.15rem;
  }
  body.daily-log-page .help-examples h5 {
    font-size: 1rem;
  }
}

.daily-log-form {
  margin-bottom: 2rem;
}

.log-entry-card {
  background: #f9f9f9;
  border-left: 4px solid #007bff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  position: relative;
}

.log-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.log-entry-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.log-entry-time {
  font-weight: 600;
  color: #555;
}

.log-language-badge {
  display: inline-block;
  background: #e8f4ff;
  color: #0066cc;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.log-entry-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.log-entry-actions .btn-primary,
.log-entry-actions .btn-danger {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 400;
}

.log-entry-actions .btn-primary {
  background: #6b7280;
  border-color: #6b7280;
}

.log-entry-actions .btn-primary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.log-entry-actions .btn-danger {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.log-entry-actions .btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.log-entry-content {
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

.log-content-header {
  margin-bottom: 0.5rem;
}

.log-text-content {
  margin: 0.75rem 0;
  word-wrap: break-word;
  font-size: 1rem;
  line-height: 1.6;
}

/* Only use pre-wrap for plain text (non-markdown) content */
.log-text-content:not(.markdown-content) {
  white-space: pre-wrap;
}

.log-edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.unbilled-amount {
  font-weight: bold;
  color: var(--secondary-color);
}

/* ===== Time Tracking Page Specific Styles ===== */

/* Log entry card variations for time tracking */
.log-entry-customer {
  font-size: 0.875rem;
  color: #495057;
}

/* Translation UI */
.log-translation-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.log-language-selector {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85em;
  color: #495057;
  transition: border-color 0.2s ease;
}

.log-language-selector:hover {
  border-color: #0056b3;
}

.log-language-selector:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0,86,179,0.1);
}

.log-translation-info {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
}

.log-translation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  z-index: 10;
}

.log-translation-overlay.active {
  display: flex;
}

.log-translation-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0056b3;
  font-weight: 500;
}

/* Spinner utility */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e9ecef;
  border-top: 3px solid #0056b3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

/* AI Transformation UI */
.textarea-with-ai {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-ai {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
}

.btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-loading {
  color: #667eea;
  font-size: 0.875rem;
  padding: 0.5rem;
  text-align: center;
  font-style: italic;
}

.ai-loading span {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Side-by-side layout for forms */
.side-by-side-container {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.side-by-side-container .card {
  flex: 1;
}

@media (max-width: 768px) {
  .side-by-side-container {
    flex-direction: column;
  }
}

/* Markdown content styling */
.markdown-content {
  line-height: 1.6;
  color: #2c3e50;
  font-size: 0.95em;
}

.markdown-content h1 {
  font-size: 1.3em;
  margin: 0.8em 0 0.5em 0;
  color: #990066;
  font-weight: 600;
}

.markdown-content h2 {
  font-size: 1.2em;
  margin: 1em 0 0.5em 0;
  color: #0056b3;
  font-weight: 600;
}

.markdown-content h3 {
  font-size: 1.05em;
  margin: 0.8em 0 0.4em 0;
  color: #495057;
  font-weight: 600;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.8em 0;
  padding-left: 1.8em;
}

.markdown-content li {
  margin: 0.4em 0;
}

.markdown-content p {
  margin: 0.8em 0;
}

.markdown-content strong {
  font-weight: 600;
  color: #212529;
}

.markdown-content code {
  background: #f8f9fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

.markdown-content pre {
  background: #f8f9fa;
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1em 0;
}

.markdown-content pre code {
  background: none;
  padding: 0;
}

/* Modal Overlay Dialog */
.modal-overlay,
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-overlay.active,
.modal.active,
.modal-overlay[style*="display: flex"],
.modal[style*="display: flex"] {
  display: flex;
}

.modal-dialog,
.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #f8f9fa;
}

.modal-body {
  padding: 1.5rem;
}

.modal form {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #6c757d;
  font-size: 0.75rem;
}

.btn-edit-user {
  background-color: #0056b3;
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background-color 0.2s;
}

.btn-edit-user:hover {
  background-color: #004494;
}

/* Truncate organizational role with tooltip */
.org-role-cell {
  display: inline-block;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
  vertical-align: bottom;
}

.org-role-tooltip {
  position: fixed;
  z-index: 1000;
  background: #fffef0;
  color: #333;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #e0dfc0;
  white-space: normal;
  max-width: 300px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  line-height: 1.4;
  pointer-events: none;
}

/* Public Pages Footer */
.public-footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 0 0.5rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-separator {
  color: #999;
}

.footer-cookie-note {
  color: #666;
  font-size: 0.9rem;
  padding: 0 0.5rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #666;
}

/* Legal Page Styles */
.language-switcher {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.language-switcher-label {
  font-size: 0.9rem;
  color: #666;
}

.language-link {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  background-color: #f0f0f0;
  color: #333;
}

.language-link:hover {
  background-color: #e0e0e0;
}

.language-link.active {
  background-color: var(--primary-color);
  color: white;
}

.legal-article {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.7;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-company-info {
  margin-bottom: 1rem;
}

.legal-heading {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.legal-subheading {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-paragraph {
  margin-bottom: 1rem;
}

.legal-paragraph-half {
  margin-bottom: 0.5rem;
}

.legal-list {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-list-item {
  margin-bottom: 0.5rem;
}

.legal-footer-note {
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9rem;
  color: #666;
}

/* ===== Setup Area with Vertical Sidebar ===== */
.setup-container {
  display: flex;
  min-height: calc(100vh - 60px); /* Account for navbar height */
  gap: 0;
}

.setup-sidebar {
  width: 200px;
  background-color: #f8f9fa;
  border-right: 1px solid #e9ecef;
  flex-shrink: 0;
}

.setup-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.setup-nav a {
  padding: 0.75rem 1.5rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setup-nav a:hover {
  background-color: #e9ecef;
  color: var(--primary-color);
}

.setup-nav a.active {
  background-color: #fff;
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.setup-content {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
}

/* Responsive behavior for setup sidebar */
@media (max-width: 768px) {
  .setup-container {
    flex-direction: column;
  }

  .setup-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .setup-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
  }

  .setup-nav a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1rem;
  }

  .setup-nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary-color);
  }

  .setup-content {
    padding: 1rem;
  }
}

/* ===== Customer Selector Component ===== */
.customer-selector-container {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.customer-selector-container .card {
  background-color: var(--light-gray);
  border-left: 4px solid var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  width: auto;
}

.customer-selector-container .form-group {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.customer-selector-container label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin: 0;
  white-space: nowrap;
}

.customer-select-dropdown {
  min-width: 280px;
  max-width: 350px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.customer-select-dropdown:hover {
  border-color: var(--primary-color);
}

.customer-select-dropdown:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(153, 0, 102, 0.1);
}

.selected-customer-info {
  display: none;
}

.selected-customer-info.active {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
}

.selected-customer-info-box {
  padding: 0.5rem 0.75rem;
  background-color: white;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.selected-customer-info-box strong {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.selected-customer-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.customer-selector-container .loading-indicator {
  padding: 0.5rem 1rem;
  color: #666;
  font-style: italic;
  font-size: 0.9rem;
}

.customer-selector-container .error-message {
  padding: 0.5rem 1rem;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  color: #856404;
  font-size: 0.9rem;
}

/* ===== Release Report Button Component ===== */
/* Styles for the release-report-button web component (Rule 18) */

.release-report-container {
  display: inline-block;
}

.release-report-button {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.release-report-button:hover {
  background: #218838;
}

.release-report-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.release-report-status {
  display: inline-block;
  background: #e8f5e8;
  color: #28a745;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* ===== Work Week Complete Button Component ===== */
/* Styles for the work-week-complete-button web component (Rule 18) */

.work-week-complete-container {
  display: inline-block;
}

.work-week-complete-button {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.work-week-complete-button:hover {
  background: #5a6268;
}

.work-week-complete-button:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.work-week-complete-status {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* ===== Week Action Bar ===== */
/* Action bar for release workflow buttons at the top of each week card */

.week-action-bar,
.week-action-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.week-action-bar:empty,
.week-action-bar-container:empty {
  display: none;
}

/* Status badges row */
.week-action-bar-status {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.week-action-bar-status:empty {
  display: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.complete-badge {
  color: #1971c2;
}

.status-badge.released-badge {
  color: #2f9e44;
}

/* Buttons row */
.week-action-bar-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Action bar buttons */
.week-action-bar-container .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #fff;
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.week-action-bar-container .action-btn:hover:not(:disabled):not(.disabled) {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.week-action-bar-container .action-btn:disabled,
.week-action-bar-container .action-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Specific button styles */
.week-action-bar-container .mark-complete-btn:not(:disabled) {
  background: #e7f5ff;
  border-color: #74c0fc;
  color: #1971c2;
}

.week-action-bar-container .preview-release-btn:not(:disabled) {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.week-action-bar-container .release-btn:not(:disabled) {
  background: #d3f9d8;
  border-color: #69db7c;
  color: #2f9e44;
}

.week-action-bar-container .regenerate-btn:not(:disabled) {
  background: #fff3bf;
  border-color: #ffd43b;
  color: #e67700;
}

.week-action-bar-container .delete-btn:not(:disabled) {
  background: #ffe3e3;
  border-color: #ffa8a8;
  color: #c92a2a;
}

.week-action-bar-container .ai-insights-btn:not(.disabled) {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  border-color: #adb5bd;
  color: #495057;
}

/* Status indicators */
.week-action-bar-container .action-status {
  font-size: 0.875rem;
  color: #2f9e44;
  font-weight: 500;
}

/* Disabled state for action bar buttons and links (legacy support) */
.week-action-bar button:disabled,
.week-action-bar .disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.week-action-bar a.disabled {
  color: #6c757d;
  text-decoration: none;
}

/* Generate Summary Button - prominent action button */
.week-action-bar-container .generate-summary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.5rem 1rem;
}

.week-action-bar-container .generate-summary-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.week-action-bar-container .generate-summary-btn:active:not(:disabled) {
  transform: translateY(0);
}

.week-action-bar-container .generate-summary-btn:disabled {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  opacity: 0.6;
}

/* ===== Weekly Report Display Component ===== */
/* Styles for the weekly-report-display web component */

.weekly-report-display {
  min-height: 200px;
}

.weekly-report-display .report-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

.weekly-report-display .report-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e9ecef;
  border-top-color: #0056b3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.weekly-report-display .report-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 0.95em;
}

.weekly-report-display .report-error .error-icon {
  font-size: 1.5em;
}

.weekly-report-display .report-error .error-message {
  max-width: 400px;
}

/* Recommendations and Conclusions sections within weekly-report-display */
.weekly-report-display .report-section-header {
  color: #2c3e50;
  font-size: 1.3em;
  margin: 30px 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.weekly-report-display .report-recommendations-section,
.weekly-report-display .report-conclusions-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.weekly-report-display .report-recommendations-content,
.weekly-report-display .report-conclusions-content {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px 20px;
  border-left: 4px solid #17a2b8;
}

.weekly-report-display .report-conclusions-content {
  border-left-color: #28a745;
}

.weekly-report-display .report-recommendations-content ul,
.weekly-report-display .report-conclusions-content ul {
  margin: 0;
  padding-left: 20px;
}

.weekly-report-display .report-recommendations-content li,
.weekly-report-display .report-conclusions-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.weekly-report-display .report-recommendations-content p,
.weekly-report-display .report-conclusions-content p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.weekly-report-display .report-recommendations-content p:last-child,
.weekly-report-display .report-conclusions-content p:last-child {
  margin-bottom: 0;
}

/* AI Disclaimer - EU AI Act Transparency Notice */
.weekly-report-display .ai-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border: 1px solid #c9d7f0;
  border-radius: 6px;
  font-size: 0.85em;
  color: #5a6a8a;
  line-height: 1.4;
}

.weekly-report-display .ai-disclaimer-icon {
  flex-shrink: 0;
  font-size: 1.1em;
}

.weekly-report-display .ai-disclaimer-text {
  flex: 1;
}

/* ===== Insights Page ===== */
/* Styles for the consultant insights/weekly reports page */

.insights-container {
  padding: 20px;
}

.customer-insights-section {
  margin-bottom: 40px;
  border-bottom: 2px solid #e1e5e9;
  padding-bottom: 30px;
}

.customer-insights-section:last-child {
  border-bottom: none;
}

.customer-header {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #bdc3c7;
}

.weekly-summaries {
  display: grid;
  gap: 20px;
}

.week-summary-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.week-summary-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.week-header h3 {
  margin: 0;
  color: #495057;
  font-size: 1.2em;
}

.week-meta {
  display: flex;
  gap: 15px;
  font-size: 0.9em;
  color: #6c757d;
}

.entry-count {
  background: #e3f2fd;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.word-count {
  background: #f3e5f5;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* Weekly Summary Container */
.weekly-summary-container {
  position: relative;
  min-height: 60px;
}

.loading-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #6c757d;
  border-radius: 0 8px 8px 0;
  color: #6c757d;
  font-style: italic;
}

.weekly-summary {
  background: #f8f9fa;
  border-left: 4px solid #0056b3;
  padding: 15px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.summary-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-selector {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85em;
  color: #495057;
  transition: border-color 0.2s ease;
}

.language-selector:hover {
  border-color: #0056b3;
}

.language-selector:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

.language-selector:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.summary-metadata {
  font-size: 0.85em;
  color: #6c757d;
  font-style: italic;
}

.summary-metadata .fresh-badge {
  background: #28a745;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 500;
  margin-left: 8px;
  font-style: normal;
}

.summary-content {
  line-height: 1.6;
  color: #2c3e50;
  font-size: 0.95em;
  margin: 0;
}

/* Markdown content styling within summary */
.summary-content h2 {
  font-size: 1.1em;
  margin: 0.8em 0 0.4em 0;
  color: #0056b3;
  font-weight: 600;
}

.summary-content h3 {
  font-size: 1em;
  margin: 0.6em 0 0.3em 0;
  color: #495057;
  font-weight: 600;
}

.summary-content ul,
.summary-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.summary-content li {
  margin: 0.3em 0;
}

.summary-content p {
  margin: 0.5em 0;
}

.summary-content strong {
  font-weight: 600;
  color: #0056b3;
}

.summary-content em {
  font-style: italic;
  color: #495057;
}

.summary-content code {
  background: #f8f9fa;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.summary-error {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 0 8px 8px 0;
  color: #856404;
  font-size: 0.9em;
}

/* Translation loading overlay */
.translation-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: 8px;
}

.translation-loading-overlay.active {
  display: flex;
}

.translation-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.translation-loading-content .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top-color: #0056b3;
}

.translation-loading-content span {
  font-size: 0.95em;
  color: #495057;
  font-weight: 500;
}

/* Raw entries section */
.raw-entries-section {
  margin-top: 15px;
}

.toggle-entries-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #495057;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.toggle-entries-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.toggle-icon {
  transition: transform 0.2s ease;
}

.toggle-entries-btn.expanded .toggle-icon {
  transform: rotate(180deg);
}

.week-entries {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

/* Daily entry cards */
.daily-entry {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #6c757d;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entry-date {
  font-weight: 500;
}

.entry-day {
  font-style: italic;
}

.entry-content {
  line-height: 1.5;
  color: #212529;
}

.entry-language-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.entry-language-badge.original-badge {
  background: #e7f3ff;
  color: #0056b3;
}

.entry-language-badge.ai-translation-badge {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.mentioned-dates {
  font-size: 0.8em;
  color: #28a745;
  background: #e8f5e8;
  padding: 2px 6px;
  border-radius: 4px;
}

.mentioned-date {
  font-weight: 500;
}

/* Insights page responsive */
@media (max-width: 768px) {
  .insights-container {
    padding: 10px;
  }

  .week-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .week-meta {
    flex-direction: column;
    gap: 5px;
  }

  .entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* SOW Progress Analysis Component */
.sow-progress-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sow-progress-loading {
  padding: 2rem;
  text-align: center;
  color: #667eea;
}

.sow-progress-loading .loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #f3f4f6;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sow-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.sow-progress-header .btn-primary {
  flex-shrink: 0;
  width: auto;
}

.sow-progress-timestamp {
  font-size: 0.85rem;
  color: #666;
}

.sow-progress-history-title {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.sow-progress-history-list {
  padding: 0.75rem;
}

.sow-progress-report-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sow-progress-report-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.sow-progress-report-item:last-child {
  border-bottom: none;
}

.sow-progress-report-link {
  color: #667eea;
  text-decoration: none;
}

.sow-progress-report-link:hover {
  text-decoration: underline;
}

.sow-progress-report-meta {
  font-size: 0.85rem;
  color: #888;
  margin-left: 0.5rem;
}

/* ===== AI Chat Widget ===== */
.chat-widget {
  position: fixed;
  bottom: 20px;
  z-index: 1000;
}

.chat-widget-right {
  right: 20px;
}

.chat-widget-left {
  left: 20px;
}

.chat-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-color), #cc0088);
  color: var(--white);
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(153, 0, 102, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(153, 0, 102, 0.4);
}

.chat-toggle-icon {
  font-size: 1.2rem;
}

.chat-panel {
  position: absolute;
  bottom: 60px;
  width: 380px;
  max-height: 500px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-widget-right .chat-panel {
  right: 0;
}

.chat-widget-left .chat-panel {
  left: 0;
}

.chat-panel.open {
  display: flex;
  animation: chatSlideIn 0.3s ease;
}

/* Expanded (fullscreen-like) mode */
.chat-panel.expanded {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  right: auto;
  width: 90vw;
  max-width: 900px;
  max-height: none;
  z-index: 1001;
}

.chat-panel.expanded .chat-messages {
  min-height: 300px;
  max-height: none;
  flex: 1;
}

@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), #cc0088);
  color: var(--white);
}

.chat-header-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-header-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-expand-btn,
.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-expand-btn:hover,
.chat-close-btn:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 250px;
  max-height: 350px;
  background: #f8f9fa;
}

.chat-welcome {
  text-align: center;
  padding: 1rem 0;
}

.chat-welcome-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.chat-welcome-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.suggested-prompts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggested-prompt-btn {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: background 0.2s, border-color 0.2s;
}

.suggested-prompt-btn:hover {
  background: #e9ecef;
  border-color: var(--primary-color);
}

.chat-message {
  margin-bottom: 0.75rem;
  max-width: 85%;
}

.chat-message-user {
  margin-left: auto;
}

.chat-message-user .chat-message-content {
  background: var(--primary-color);
  color: var(--white);
  border-radius: 12px 12px 4px 12px;
  padding: 0.6rem 0.9rem;
}

.chat-message-assistant .chat-message-content {
  background: var(--white);
  color: var(--text-dark);
  border-radius: 12px 12px 12px 4px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
}

.chat-message-error .chat-message-content {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.chat-message-content {
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem;
  background: var(--white);
  border-radius: 12px;
  width: fit-content;
  border: 1px solid var(--border);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  resize: none;
  font-family: inherit;
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(153, 0, 102, 0.1);
}

.chat-send-btn {
  padding: 0.5rem 0.75rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
  background: #cc0088;
}

.chat-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Credit Note Payables Component ===== */
.payees-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payee-row {
  padding: 1rem;
  background: var(--light-gray);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.payee-row:hover {
  border-color: #2196F3;
}

.payee-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expand-toggle {
  color: var(--text-dark);
  font-size: 0.75rem;
  width: 1rem;
}

.payee-name {
  color: var(--text-dark);
}

.payee-count {
  font-weight: normal;
}

.payee-totals {
  font-weight: bold;
  color: var(--primary-color);
}

.payable-amount {
  font-size: 1.1rem;
}

.payee-bank-info {
  font-family: monospace;
  font-size: 0.85rem;
}

.payee-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.payee-actions {
  display: flex;
  gap: 0.5rem;
}