/* 
 * Travel Atlass IT Solution — Modern Light Theme Stylesheet
 * High legibility, crisp typography, clean corporate feel.
 */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg-primary: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --brand-navy: #0f172a;
  --brand-blue: #2563eb;
  --brand-sky: #0284c7;
  --brand-teal: #0d9488;
  --brand-accent: #38bdf8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

/* Subtle Card & Borders */
.card-soft {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-in-out;
}

.card-soft:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--brand-navy);
  color: #ffffff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  transition: all 0.15s ease-in-out;
  border: 1px solid var(--brand-navy);
}

.btn-primary:hover {
  background-color: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #ffffff;
  color: var(--text-primary);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease-in-out;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--brand-blue);
  color: #ffffff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  transition: all 0.15s ease-in-out;
}

.btn-accent:hover {
  background-color: #1d4ed8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.badge-blue {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-green {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-purple {
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-amber {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Category Filter Tabs */
.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.filter-btn.active {
  background: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

/* Project Card */
.project-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.08), 0 8px 10px -6px rgba(14, 165, 233, 0.04);
  transform: translateY(-2px);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.02);
}

/* Modal styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-content-box {
  transform: scale(1);
}

/* Signature Pad Canvas */
.sig-canvas-container {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  position: relative;
  touch-action: none;
}

.sig-canvas-container canvas {
  width: 100%;
  height: 180px;
  display: block;
}

/* Chat Module Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 540px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background-color: #f8fafc;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.chat-bubble.sent {
  align-self: flex-end;
  background-color: #0f172a;
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.chat-bubble.received {
  align-self: flex-start;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.chat-bubble .meta {
  font-size: 0.68rem;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-bubble.sent .meta {
  justify-content: flex-end;
  color: #94a3b8;
}

.chat-bubble.received .meta {
  color: #94a3b8;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   Mobile Responsive Layout Enhancements (No Impact on Desktop Viewports)
   ========================================================================== */

/* 1. Fluid Tables on Small Viewports */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

@media (max-width: 768px) {
  .overflow-x-auto table th,
  .overflow-x-auto table td {
    white-space: nowrap;
  }
}

/* 2. Responsive Modal Panels */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0.75rem;
    align-items: flex-end;
  }
  
  .modal-content-box {
    max-height: 92vh;
    border-radius: 18px 18px 12px 12px;
    padding: 1.25rem;
  }
}

/* 3. iOS Viewport Zoom Prevention on Form Fields */
@media (max-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 4. Touch-Friendly Click Targets */
@media (max-width: 640px) {
  .btn-primary,
  .btn-secondary,
  .btn-accent {
    min-height: 44px;
  }
}

/* 5. Text Wrapping & Long Content Containment */
.break-words {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.break-all {
  word-break: break-all;
  overflow-wrap: anywhere;
}
