/* ==========================================================================
   TechCare - Modern Mobile-First CSS System
   Brand Color: Blue #2563eb
   Typography: Inter / System Sans-serif
   ========================================================================== */

:root {
  /* Brand Palette */
  --tc-primary: #2563eb;
  --tc-primary-dark: #1d4ed8;
  --tc-primary-hover: #1e40af;
  --tc-primary-light: #eff6ff;
  --tc-primary-subtle: #dbeafe;
  --tc-primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #1d4ed8 100%);
  --tc-primary-gradient-glow: 0 8px 20px rgba(37, 99, 235, 0.28);

  /* Status & Accent Palette */
  --tc-success: #10b981;
  --tc-success-dark: #059669;
  --tc-success-light: #ecfdf5;
  --tc-success-subtle: #d1fae5;

  --tc-warning: #f59e0b;
  --tc-warning-dark: #d97706;
  --tc-warning-light: #fffbeb;
  --tc-warning-subtle: #fef3c7;

  --tc-danger: #ef4444;
  --tc-danger-dark: #dc2626;
  --tc-danger-light: #fef2f2;
  --tc-danger-subtle: #fee2e2;

  --tc-info: #0284c7;
  --tc-info-dark: #0369a1;
  --tc-info-light: #f0f9ff;
  --tc-info-subtle: #e0f2fe;

  --tc-purple: #8b5cf6;
  --tc-purple-light: #f5f3ff;

  /* Neutrals & Surfaces */
  --tc-bg: #f8fafc;
  --tc-card-bg: #ffffff;
  --tc-surface-elevated: #ffffff;
  --tc-text: #0f172a;
  --tc-text-muted: #64748b;
  --tc-text-subtle: #94a3b8;
  --tc-border: #e2e8f0;
  --tc-border-light: #f1f5f9;

  /* Radii */
  --tc-radius-sm: 8px;
  --tc-radius: 14px;
  --tc-radius-lg: 20px;
  --tc-radius-pill: 9999px;

  /* Shadows */
  --tc-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --tc-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --tc-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --tc-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08);
  --tc-shadow-hover: 0 10px 24px rgba(37, 99, 235, 0.12);

  /* Layout dimensions */
  --tc-bottom-nav-height: 64px;
  --tc-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--tc-bg);
  color: var(--tc-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* On mobile with bottom navigation, apply bottom padding so content isn't covered */
body.has-bottom-nav {
  padding-bottom: calc(var(--tc-bottom-nav-height) + var(--tc-safe-bottom) + 16px);
}

@media (min-width: 768px) {
  body.has-bottom-nav {
    padding-bottom: 0;
  }
}

.page-content {
  flex: 1;
  padding-bottom: 2rem;
}

/* ==========================================================================
   Typography & Links
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--tc-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--tc-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--tc-primary-dark);
}

/* ==========================================================================
   Top Navbar
   ========================================================================== */

.tc-navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tc-border);
  padding: 12px 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  z-index: 1030;
}

.tc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tc-text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.tc-brand:hover {
  color: var(--tc-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--tc-primary-gradient);
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.tc-navbar .nav-link {
  color: var(--tc-text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
}

.tc-navbar .nav-link:hover,
.tc-navbar .nav-link.active {
  color: var(--tc-primary);
  background: var(--tc-primary-light);
}

.tc-navbar .navbar-toggler {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--tc-border-light);
}

.user-badge {
  background: var(--tc-border-light);
  padding: 5px 12px;
  border-radius: var(--tc-radius-pill);
  font-size: 0.85rem;
  color: var(--tc-text);
  border: 1px solid var(--tc-border);
}

/* ==========================================================================
   Mobile Bottom Navigation Bar
   ========================================================================== */

.tc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tc-bottom-nav-height) + var(--tc-safe-bottom));
  padding-bottom: var(--tc-safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--tc-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
}

.tc-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--tc-text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  gap: 3px;
  transition: all 0.15s ease;
  padding: 4px 2px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.tc-bottom-nav-item i {
  font-size: 1.28rem;
  transition: transform 0.15s ease;
}

.tc-bottom-nav-item:hover,
.tc-bottom-nav-item:active {
  color: var(--tc-primary);
}

.tc-bottom-nav-item.active {
  color: var(--tc-primary);
}

.tc-bottom-nav-item.active i {
  transform: translateY(-1px);
}

.tc-bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--tc-primary);
  border-radius: 0 0 3px 3px;
}

/* Center Highlight Tab on Mobile Bottom Nav (e.g. Add/Track) */
.tc-bottom-nav-item.tc-nav-center {
  margin-top: -14px;
}

.tc-bottom-nav-item.tc-nav-center .tc-nav-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tc-primary-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tc-bottom-nav-item.tc-nav-center:active .tc-nav-icon-wrapper {
  transform: scale(0.94);
}

.tc-bottom-nav-item.tc-nav-center i {
  font-size: 1.35rem;
  color: #ffffff;
}

/* ==========================================================================
   Cards & Component Panels
   ========================================================================== */

.tc-card {
  background: var(--tc-card-bg);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 22px;
  box-shadow: var(--tc-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.tc-card:hover {
  box-shadow: var(--tc-shadow-md);
}

.tc-card-clickable {
  cursor: pointer;
}

.tc-card-clickable:active {
  transform: scale(0.99);
}

/* Stat Cards */
.tc-stat-card {
  background: var(--tc-card-bg);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 18px 20px;
  box-shadow: var(--tc-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.tc-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md);
}

/* Horizontal scrollable stat strip on small devices */
.tc-stats-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 12px;
  padding-bottom: 6px;
  scrollbar-width: none; /* Firefox */
}

.tc-stats-scroll::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.tc-stats-scroll > div {
  flex: 0 0 calc(50% - 6px);
  min-width: 140px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .tc-stats-scroll {
    overflow-x: visible;
    flex-wrap: wrap;
    scroll-snap-type: none;
  }
  .tc-stats-scroll > div {
    flex: 1 1 0;
  }
}

/* Mobile Task / Job Cards */
.tc-job-card {
  background: #ffffff;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 15px 16px;
  box-shadow: var(--tc-shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tc-job-card:hover {
  box-shadow: var(--tc-shadow-sm);
}

/* Mobile Complaint Item Card (Table Alternative) */
.tc-mobile-card {
  background: #ffffff;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 13px 14px;
  box-shadow: var(--tc-shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 10px;
}

.tc-mobile-card:active {
  transform: scale(0.995);
}

/* Compact Info Bar for Cards */
.tc-compact-info-bar {
  background-color: var(--tc-surface-alt, #f8fafc);
  border: 1px solid var(--tc-border-light, #e2e8f0);
  border-radius: 8px;
  padding: 8px 12px;
}

/* Responsive Adaptive List Limiting (Smart More / Less) */
@media (max-width: 767.98px) {
  .tc-hide-mobile:not(.tc-show-force) {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .tc-hide-desktop:not(.tc-show-force) {
    display: none !important;
  }
}

.tc-show-force {
  display: block !important;
  animation: tcFadeInUp 0.22s ease-out;
}

.tc-show-force-table-row {
  display: table-row !important;
  animation: tcFadeInUp 0.22s ease-out;
}

@keyframes tcFadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* More / Less Toggle Button */
.tc-more-toggle-wrap {
  text-align: center;
  padding: 14px 0 6px 0;
}

.tc-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 50px;
  padding: 7px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
}

.tc-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.tc-button {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.tc-button:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--tc-primary-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.btn-primary:active {
  background: #1d4ed8;
  transform: scale(0.98);
}

.btn-outline-primary {
  color: var(--tc-primary);
  border-color: var(--tc-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Floating Action Button (FAB) */
.tc-fab {
  position: fixed;
  bottom: calc(var(--tc-bottom-nav-height) + var(--tc-safe-bottom) + 16px);
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tc-primary-gradient);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  z-index: 1020;
  text-decoration: none;
  font-size: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .tc-fab {
    bottom: 24px;
    right: 24px;
  }
}

.tc-fab:hover {
  color: #ffffff;
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5);
}

.tc-fab:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Form Controls & Touch Targets (44px+)
   ========================================================================== */

.form-control,
.form-select {
  border-radius: 10px;
  border: 1.5px solid var(--tc-border);
  padding: 10px 14px;
  font-size: 0.95rem;
  min-height: 46px; /* Touch target size requirement */
  background-color: #ffffff;
  color: var(--tc-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.input-group .form-control {
  min-height: 46px;
}

.input-group-text {
  border-radius: 10px;
  border: 1.5px solid var(--tc-border);
  color: var(--tc-text-muted);
  background-color: #ffffff;
  padding: 0 14px;
}

.form-label {
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tc-text);
}

.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.15em;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--tc-primary);
  border-color: var(--tc-primary);
}

/* ==========================================================================
   Status & Priority Badges (Pill-shaped, bold)
   ========================================================================== */

.badge {
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--tc-radius-pill);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-received {
  background-color: var(--tc-info-subtle);
  color: var(--tc-info-dark);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-assigned {
  background-color: var(--tc-warning-subtle);
  color: var(--tc-warning-dark);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-in_progress {
  background-color: var(--tc-primary-subtle);
  color: var(--tc-primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-on_hold {
  background-color: var(--tc-danger-subtle);
  color: var(--tc-danger-dark);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-completed {
  background-color: var(--tc-success-subtle);
  color: var(--tc-success-dark);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-closed {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid var(--tc-border);
}

.badge-cancelled {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid var(--tc-border);
}

/* Priority Badges */
.badge-priority-low {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid var(--tc-border);
}

.badge-priority-medium {
  background-color: var(--tc-info-subtle);
  color: var(--tc-info-dark);
}

.badge-priority-high {
  background-color: #ffedd5;
  color: #c2410c;
  font-weight: 700;
}

.badge-priority-urgent {
  background-color: var(--tc-danger-subtle);
  color: var(--tc-danger-dark);
  font-weight: 800;
  animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.tc-hero {
  position: relative;
  background: radial-gradient(100% 100% at 50% 0%, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--tc-border);
  overflow: hidden;
}

.tc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tc-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--tc-radius-pill);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tc-hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--tc-text);
}

.tc-hero-gradient-text {
  background: var(--tc-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tc-step-card {
  background: #ffffff;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 16px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md);
}

/* ==========================================================================
   Stepper / Timeline System
   ========================================================================== */

.stepper-wrapper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.stepper-wrapper::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 36px;
  right: 36px;
  height: 3px;
  background: var(--tc-border);
  z-index: 1;
}

.stepper-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.step-counter {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: var(--tc-text-muted);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.stepper-item.completed .step-counter {
  background: var(--tc-success);
  border-color: var(--tc-success);
  color: #ffffff;
}

.stepper-item.active .step-counter {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--tc-primary-subtle);
}

.step-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tc-text-muted);
}

.stepper-item.active .step-name {
  color: var(--tc-primary);
  font-weight: 700;
}

.stepper-item.completed .step-name {
  color: var(--tc-success);
}

@media (max-width: 575px) {
  .step-counter {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
  .stepper-wrapper::before {
    top: 15px;
    left: 20px;
    right: 20px;
  }
  .step-name {
    font-size: 0.7rem;
  }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--tc-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tc-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--tc-primary-subtle);
}

.timeline-dot.completed {
  background: var(--tc-success);
  box-shadow: 0 0 0 2px var(--tc-success-subtle);
}

.timeline-dot.hold {
  background: var(--tc-danger);
  box-shadow: 0 0 0 2px var(--tc-danger-subtle);
}

.timeline-content {
  background: #ffffff;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  padding: 12px 16px;
  box-shadow: var(--tc-shadow-xs);
}

/* ==========================================================================
   Multi-step / Grouped Form Styling
   ========================================================================== */

.tc-form-section {
  background: #ffffff;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--tc-shadow-xs);
}

.tc-form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tc-border-light);
}

.tc-form-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tc-primary-light);
  color: var(--tc-primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   Success Screen Celebration
   ========================================================================== */

.tc-success-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tc-success-light);
  color: var(--tc-success);
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.12);
  animation: tc-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tc-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.tc-tracking-code-box {
  background: #ffffff;
  border: 2px dashed var(--tc-primary);
  border-radius: var(--tc-radius);
  padding: 18px;
  text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.tc-footer {
  margin-top: auto;
  padding: 24px 0;
  background: #ffffff;
  border-top: 1px solid var(--tc-border);
  color: var(--tc-text-muted);
  font-size: 0.88rem;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 767px) {
  .tc-navbar {
    padding: 10px 0;
  }
  .tc-card {
    padding: 18px 16px;
  }
  .display-4 {
    font-size: 2.2rem;
  }
  .display-5 {
    font-size: 1.8rem;
  }
}

@media (min-width: 768px) {
  .border-start-md {
    border-left: 1px solid var(--tc-border);
    padding-left: 1.5rem;
  }
}

/* ==========================================================================
   Professional App Sidebar Layout (For Authenticated Dashboards)
   ========================================================================== */

body.has-app-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

body.has-app-layout .tc-app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--tc-bg);
}

@media (max-width: 991px) {
  body.has-app-layout {
    flex-direction: column;
  }
}

.tc-public-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
}

.tc-app-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--tc-bg);
}

/* App Layout (Sidebar + Main Content) */
.tc-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: #ffffff;
  border-right: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  z-index: 1020;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.02);
  transition: all 0.25s ease;
}

.tc-sidebar-brand {
  height: 68px;
  min-height: 68px;
  padding: 0 1.15rem;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-shrink: 0;
}

.tc-sidebar-user {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
}

.tc-sidebar-menu {
  padding: 1rem 0.85rem;
  flex-grow: 1;
  overflow-y: auto;
}

.tc-sidebar-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 1rem 0.85rem 0.35rem 0.85rem;
}

.tc-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: #475569;
  font-weight: 500;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  margin-bottom: 3px;
  border-left: 3px solid transparent;
}

.tc-sidebar-link i {
  font-size: 1.12rem;
  color: #94a3b8;
  transition: color 0.15s ease;
  width: 20px;
  text-align: center;
}

.tc-sidebar-link:hover {
  background: #f8fafc;
  color: #1e293b;
}

.tc-sidebar-link:hover i {
  color: #6366f1;
}

.tc-sidebar-link.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
  border-left: 3px solid #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.tc-sidebar-link.active i {
  color: #6366f1 !important;
}

.tc-sidebar-link.active .badge {
  background-color: #6366f1 !important;
  color: #ffffff !important;
}

.tc-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #eef2f6;
  background: #ffffff;
}

/* Pinned Sidebar Search Box */
.tc-sidebar-search {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eef2f6;
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.tc-sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.tc-sidebar-search-input {
  width: 100%;
  height: 36px;
  padding: 0.38rem 1.85rem 0.38rem 2.15rem;
  font-size: 0.825rem;
  font-weight: 500;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #1e293b;
  transition: all 0.18s ease-in-out;
}

.tc-sidebar-search-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  color: #0f172a;
}

.tc-sidebar-search-input::placeholder {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 400;
}

.tc-sidebar-search-icon {
  position: absolute;
  left: 0.75rem;
  color: #64748b;
  font-size: 0.82rem;
  pointer-events: none;
  transition: color 0.15s ease;
}

.tc-sidebar-search-box:focus-within .tc-sidebar-search-icon {
  color: #4f46e5;
}

.tc-sidebar-search-clear {
  position: absolute;
  right: 0.55rem;
  background: none;
  border: none;
  padding: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
  transition: color 0.15s ease;
}

.tc-sidebar-search-clear:hover {
  color: #dc2626;
}

/* Interactive Sidebar Menu Groups */
.tc-menu-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.865rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  cursor: pointer;
  user-select: none;
}

.tc-menu-group-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.tc-menu-group-btn.active-group {
  background: #f1f5f9;
  color: #4338ca;
}

.tc-menu-group-btn .group-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tc-menu-group-btn .group-label-wrap i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  transition: transform 0.15s ease;
}

.tc-menu-group-btn:hover .group-label-wrap i {
  transform: scale(1.08);
}

.tc-group-chevron {
  font-size: 0.72rem;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
}

.tc-menu-group-btn:not(.collapsed) .tc-group-chevron {
  transform: rotate(180deg);
  color: #4f46e5;
}

/* Submenu Lists */
.tc-menu-sublist {
  border-left: 2px solid #e2e8f0;
  margin-left: 1.35rem;
  padding-left: 0.6rem;
  margin-top: 2px;
  margin-bottom: 6px;
}

.tc-menu-sublink {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  color: #475569;
  font-size: 0.825rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  margin-bottom: 2px;
}

.tc-menu-sublink i {
  font-size: 0.95rem;
  width: 16px;
  text-align: center;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.tc-menu-sublink:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tc-menu-sublink:hover i {
  color: #6366f1;
}

.tc-menu-sublink.active {
  background: #eef2ff;
  color: #4f46e5 !important;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.08);
}

.tc-menu-sublink.active i {
  color: #6366f1 !important;
}

/* Multi-Tier Nested Submenu for HR & Complex Modules */
.tc-menu-nested-group-wrap {
  margin-bottom: 2px;
}

.tc-menu-nested-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.825rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.tc-menu-nested-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tc-menu-nested-btn.active-subgroup {
  background: #eef2ff;
  color: #4338ca;
}

.tc-menu-nested-btn .group-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tc-menu-nested-btn .group-label-wrap i {
  font-size: 0.95rem;
  width: 16px;
  text-align: center;
}

.tc-nested-chevron {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
}

.tc-menu-nested-btn:not(.collapsed) .tc-nested-chevron {
  transform: rotate(180deg);
  color: #4f46e5;
}

.tc-menu-nested-sublist {
  border-left: 2px solid #e0e7ff;
  margin-left: 0.95rem;
  padding-left: 0.55rem;
  margin-top: 2px;
  margin-bottom: 4px;
}

.tc-menu-nested-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.795rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.14s ease;
  margin-bottom: 1.5px;
}

.tc-menu-nested-sublink i {
  font-size: 0.85rem;
  width: 14px;
  text-align: center;
  color: #94a3b8;
}

.tc-menu-nested-sublink:hover {
  background: #f8fafc;
  color: #1e293b;
}

.tc-menu-nested-sublink:hover i {
  color: #6366f1;
}

.tc-menu-nested-sublink.active {
  background: #eef2ff;
  color: #4f46e5 !important;
  font-weight: 600;
}

.tc-menu-nested-sublink.active i {
  color: #6366f1 !important;
}

/* Direct Root Link */
.tc-menu-direct-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: #334155;
  font-size: 0.865rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
  margin-bottom: 2px;
}

.tc-menu-direct-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.tc-menu-direct-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.tc-menu-direct-link.active {
  background: #eef2ff;
  color: #4f46e5 !important;
  font-weight: 600;
  border-left: 3px solid #6366f1;
}

.tc-menu-direct-link.active i {
  color: #6366f1 !important;
}

/* App Main & Topbar */
.tc-app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tc-app-topbar {
  height: 68px;
  min-height: 68px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  z-index: 1010;
}

/* App Topbar Global Search */
.tc-topbar-search-wrap {
  min-width: 220px;
  max-width: 360px;
}

.tc-topbar-search-wrap form {
  width: 100%;
}

.tc-topbar-search-input {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  padding-left: 2.25rem !important;
  padding-right: 1rem !important;
  font-size: 0.82rem !important;
  height: 36px !important;
  color: #1e293b !important;
  transition: all 0.2s ease !important;
}

.tc-topbar-search-input:focus {
  background-color: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.tc-topbar-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.82rem;
  pointer-events: none;
}

/* Mobile Offcanvas Sidebar */
.tc-offcanvas-sidebar {
  width: 275px !important;
  background: #ffffff !important;
  color: #334155;
}

.tc-offcanvas-sidebar .offcanvas-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 1.15rem 1.25rem;
  background: #ffffff;
}

.tc-offcanvas-sidebar .offcanvas-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* ==========================================================================
   Global Print Styles
   ========================================================================== */
@media print {
  .tc-bottom-nav,
  .tc-sidebar,
  .tc-navbar,
  .tc-app-topbar,
  .tc-offcanvas-sidebar,
  .modal,
  .modal-backdrop,
  .offcanvas,
  .d-print-none,
  .tc-footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
  }

  body.has-bottom-nav,
  .has-bottom-nav,
  .has-app-layout {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   Panze SaaS Design System - Global Shared Styles
   ========================================================================== */
.tc-dashboard-wrapper {
  background-color: #f8fafc;
  min-height: 100vh;
}

.tc-dashboard-hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #edf5fe 50%, #f0fdf9 100%);
  border: 1px solid #e0e9f8;
  border-radius: 24px;
  padding: 24px 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.05);
}

.tc-hero-glow-1 {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(56, 189, 248, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tc-hero-glow-2 {
  position: absolute;
  bottom: -60px;
  left: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.tc-panel-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 22px;
  padding: 24px 28px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-panel-card:hover {
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

.tc-stat-card-pro {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tc-stat-card-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.tc-stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.tc-pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 9999px;
}

.tc-pill-nav a, .tc-pill-nav button {
  padding: 7px 18px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #64748b;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.tc-pill-nav a.active, .tc-pill-nav button.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tc-pill-nav a:hover:not(.active), .tc-pill-nav button:hover:not(.active) {
  color: #0f172a;
}



