/* Atine Labs™ HRMIS — Custom Styles */

/* Smooth scrollbar */
::-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; }

/* App shell */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}
.app-sidebar { width: 256px; flex-shrink: 0; }
.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .app-main { margin-left: 0; }
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
}

/* Stat cards */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: default;
}
.stat-card:hover {
  box-shadow: 0 8px 30px -6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

/* Avatar */
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  color: white;
  font-size: 12px;
  flex-shrink: 0;
}

/* Kanban card */
.kanban-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.kanban-card:hover { box-shadow: 0 4px 12px -2px rgba(0,0,0,0.10); }

/* Progress bar */
.progress-bar { height: 6px; border-radius: 9999px; background: #e2e8f0; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 25;
}

/* Animated gradient for landing hero */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-gradient {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #1d4ed8, #0f172a);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

/* Card hover lift */
.card-hover { transition: all 0.2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 12px 40px -8px rgba(0,0,0,0.15); }

/* Feature icon */
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* Pricing card highlight */
.pricing-popular {
  border: 2px solid #6366f1;
  position: relative;
  transform: scale(1.03);
  box-shadow: 0 20px 60px -10px rgba(99,102,241,0.3);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: white;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px -10px rgba(0,0,0,0.3);
}

/* Input style */
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
}

/* ─── Mobile / Responsive additions ─────────────────────────────────────── */

/* Scrollable tables on small screens */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 767px) {
  table { min-width: 640px; }
  .modal-box { max-width: 95vw; padding: 16px; }
  /* KPI cards: 2-column on mobile */
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Chart containers: full width */
  .chart-card { width: 100% !important; }
  /* Topbar title: trim overflow */
  #topbarContainer h1 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
  /* Sidebar: full-width panel on mobile (override any partial widths) */
  #sidebar { width: 260px !important; }
  /* Hide text labels in breadcrumb on very small screens */
  .breadcrumb-text { display: none; }
  /* Kanban board: horizontal scroll */
  .kanban-board { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kanban-col { min-width: 220px; }
}

/* Sidebar slide-in animation */
#sidebar {
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* Fix: ensure app layout uses full viewport height */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

/* Topbar: always at top, z above content */
#topbar-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
}
