@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-subtle: #e0f2fe;
  --surface: #ffffff;
  --background: #f8fafc;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* App Header */
.app-navbar {
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo:hover {
  color: #38bdf8;
}

.brand-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User Pill & Role Badge */
.user-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  padding: 0.35rem 0.85rem;
  color: #e2e8f0;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.role-badge-admin { background-color: #ef4444; color: #fff; }
.role-badge-dealer { background-color: #3b82f6; color: #fff; }
.role-badge-distributor { background-color: #8b5cf6; color: #fff; }
.role-badge-service_centre { background-color: #10b981; color: #fff; }

.badge-role {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Notification Bell */
.notification-bell-btn {
  position: relative;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.notification-bell-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #38bdf8;
}

.notification-count-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Main Layout */
.app-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem 1rem;
  flex: 1;
}

/* Modern Status Cards */
.status-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.status-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.status-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
}

.status-card.pending::before { background-color: #f59e0b; }
.status-card.in_process::before { background-color: #06b6d4; }
.status-card.hold::before { background-color: #ef4444; }
.status-card.cancel::before { background-color: #f97316; }
.status-card.completed::before { background-color: #10b981; }
.status-card.closed::before { background-color: #334155; }
.status-card.part_pending::before { background-color: #ec4899; }
.status-card.replacement::before { background-color: #8b5cf6; }
.status-card.re_part_pending::before { background-color: #64748b; }

.status-count {
  font-size: 2.1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.status-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.status-more-info {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

/* Action Banner */
.action-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.btn-brand {
  background: #ffffff;
  color: #0369a1;
  font-weight: 600;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-brand:hover {
  background: #f0f9ff;
  color: #0284c7;
  transform: translateY(-1px);
}

/* Form Styling */
.form-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0.4rem 0;
  z-index: 1030;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  .app-container {
    padding-bottom: 5.5rem;
  }
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.72rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
}

.mobile-nav-link.active, .mobile-nav-link:hover {
  color: var(--primary);
}

.mobile-nav-link i {
  font-size: 1.25rem;
}

/* Categorized Evidence Box (Screenshot 2 recreation) */
.evidence-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.evidence-card:hover {
  border-color: #94a3b8;
  box-shadow: var(--shadow-sm);
}

.evidence-thumb-container {
  width: 100%;
  height: 140px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.evidence-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.evidence-badge-mandatory {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  font-weight: 700;
}

/* Mobile App Card Feed */
.mobile-ticket-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}

.mobile-ticket-card:active {
  transform: scale(0.985);
  background-color: #f8fafc;
}

.mobile-ticket-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
}

.mobile-ticket-card.status-pending::before { background-color: #f59e0b; }
.mobile-ticket-card.status-in_process::before { background-color: #06b6d4; }
.mobile-ticket-card.status-hold::before { background-color: #ef4444; }
.mobile-ticket-card.status-cancel::before { background-color: #f97316; }
.mobile-ticket-card.status-completed::before { background-color: #10b981; }
.mobile-ticket-card.status-closed::before { background-color: #334155; }
.mobile-ticket-card.status-part_pending::before { background-color: #ec4899; }
.mobile-ticket-card.status-replacement::before { background-color: #8b5cf6; }
.mobile-ticket-card.status-re_part_pending::before { background-color: #64748b; }

.btn-call-chip {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}

.btn-call-chip:hover {
  background: #d1fae5;
  color: #047857;
}

/* Horizontal Swipeable Status Tabs */
.status-pill-scroll {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.status-pill-scroll::-webkit-scrollbar {
  display: none;
}

.status-filter-pill {
  white-space: nowrap;
  padding: 0.45rem 0.95rem;
  border-radius: 25px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.status-filter-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.status-filter-pill .pill-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.08);
}

.status-filter-pill.active .pill-badge {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

/* Floating Action Button (FAB) */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 4.8rem;
  right: 1.25rem;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.45);
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  z-index: 1025;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-fab:active {
  transform: scale(0.92);
}

@media (max-width: 768px) {
  .mobile-fab {
    display: flex;
  }
}

/* Sticky Bottom Action Bar for Mobile Ticket View */
.mobile-sticky-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  z-index: 1040;
}

@media (max-width: 768px) {
  .mobile-sticky-action-bar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
  }
  .ticket-view-container {
    padding-bottom: 6rem;
  }
}

/* Segmented Mobile Detail Tabs */
.mobile-segment-tabs {
  background: #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  display: flex;
  margin-bottom: 1rem;
}

.mobile-segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.mobile-segment-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Modern Chip Badges */
.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.app-chip-light {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.app-chip-primary {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.app-chip-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* PWA Install Banner & Buttons */
.pwa-install-banner {
  display: none;
  position: fixed;
  bottom: 4.5rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  margin: 0 auto;
  background: #0f172a;
  color: #ffffff;
  border-radius: 16px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1060;
  animation: slideUpPwa 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
  .pwa-install-banner {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    margin: 0;
  }
}

@keyframes slideUpPwa {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-btn {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  font-weight: 600;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.pwa-install-btn:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #ffffff;
  transform: translateY(-1px);
}

.pwa-install-btn:active {
  transform: scale(0.95);
}

.pwa-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  cursor: pointer;
}

.pwa-close-btn:hover {
  color: #ffffff;
}

.nav-install-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.nav-install-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  border-color: #38bdf8;
}


