/* =====================================================================
 *  HireDesk : app.css
 *  Animations and a few custom styles (Tailwind is in tailwind.css)
 *  Fully offline : system fonts only, no external URLs
 * ===================================================================*/

body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.tabs-bar::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }

/* Tabs bar horizontal swipe on mobile */
.tabs-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs-bar .tab-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Candidate status filter tabs bar : scrollable on mobile/tablet, single row on desktop */
#cChips {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 2px 6px 2px;
}
#cChips::-webkit-scrollbar {
  display: none;
}
#cChips .chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 11px;
  font-size: 11.5px;
  border-radius: 9999px;
  line-height: 1.25;
}
#cChips .chip b {
  font-size: 10.5px;
  margin-left: 2px;
}
@media (min-width: 1024px) {
  #cChips {
    gap: 4px;
    overflow-x: hidden;
    padding-bottom: 2px;
  }
  #cChips .chip {
    flex: 1 1 auto;
    justify-content: center;
    padding: 4px 6px;
    font-size: 11px;
    gap: 4px;
    min-width: 0;
  }
  #cChips .chip b {
    font-size: 10.5px;
    margin-left: 1px;
  }
}
@media (min-width: 1280px) {
  #cChips { gap: 6px; }
  #cChips .chip { padding: 5px 8px; font-size: 11.5px; }
}
@media (min-width: 1440px) {
  #cChips { gap: 8px; }
  #cChips .chip { padding: 6px 10px; font-size: 12px; }
}

/* Animated login background */
.login-bg {
  background: linear-gradient(-45deg, #312e81, #4f46e5, #0f766e, #0d9488);
  background-size: 400% 400%;
  animation: bgMove 16s ease infinite;
}
@keyframes bgMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Entry animations */
.fade-up   { animation: fadeUp .5s ease both; }
.row-in    { animation: fadeUp .35s ease both; }
.card-pop  { animation: cardPop .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast-in  { animation: toastIn .3s ease both; transition: all .3s ease; }
.modal-in  { animation: fadeIn .2s ease both; }
.modal-in .modal-box { animation: cardPop .3s ease both; }
.pop       { animation: popIn .6s cubic-bezier(.2, .9, .3, 1.4) both; transform-box: fill-box; transform-origin: center; }
.success-pop { animation: popIn .6s cubic-bezier(.2, .9, .3, 1.6) both; }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardPop { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes popIn   { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: scale(1); } }

/* Login scene */
.float   { animation: floatY 5s ease-in-out infinite; }
.float-2 { animation-duration: 6.5s; animation-delay: -2s; }
.blob    { animation: blob 9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.blob-2  { animation-delay: -4s; }
.scan    { animation: scan 4s ease-in-out infinite; }
.dash-move { animation: dash 1.2s linear infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blob   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes scan   { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-30px, -50px); } 50% { transform: translate(-10px, -20px); } 75% { transform: translate(-40px, 10px); } }
@keyframes dash   { to { stroke-dashoffset: -32; } }

/* Charts */
.bar-grow  { transform-box: fill-box; transform-origin: bottom; animation: growY .8s cubic-bezier(.2, .8, .2, 1) both; }
.bar-fill  { width: var(--w); animation: growX 1s cubic-bezier(.2, .8, .2, 1) both; }
.donut-seg { animation: donutIn 1s ease both; }
@keyframes growY   { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX   { from { width: 0; } to { width: var(--w); } }
@keyframes donutIn { from { opacity: 0; stroke-width: 0; } to { opacity: 1; } }

/* Attention */
.shake      { animation: shake .5s ease; }
.pulse-soft { animation: pulseSoft 2s ease-in-out infinite; }
.ring-pulse { animation: ringPulse 2s infinite; }
.logo-spin:hover { animation: spin 1s ease; }
@keyframes shake     { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes spin      { to { transform: rotate(360deg); } }

/* Modern Edit button UI for Developer & tables */
.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(67, 56, 202, 0.08);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}
.btn-edit:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}
.btn-edit svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

/* Sizing fallbacks */
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.p-2\.5 { padding: 0.625rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3\.5 { gap: 0.875rem !important; }
.shrink-0 { flex-shrink: 0 !important; }
.min-w-0 { min-width: 0px !important; }
.break-words { overflow-wrap: break-word; word-break: break-word; }

/* Auth tabs on login / register */
.auth-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: none;
}
.auth-tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
}

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; color: #4f46e5; }

/* ON / OFF switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 26px; transition: .25s; cursor: pointer; }
.switch i::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + i { background: #10b981; }
.switch input:checked + i::before { transform: translateX(20px); }

/* Mobile menu : vertical list under the header */
@media (max-width: 1023px) {
  #menu.menu-open { display: block; max-height: 75vh; overflow-y: auto; }
}

/* Print only the page content */
@media print {
  .no-print, #toasts { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* Scrollable tabs bar for mobile & desktop */
.tabs-bar {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.tabs-bar::-webkit-scrollbar {
  height: 4px;
}
.tabs-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Fallback utility classes */
.p-2\.5 { padding: 0.625rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3\.5 { gap: 0.875rem !important; }
.shrink-0 { flex-shrink: 0 !important; }
.min-w-0 { min-width: 0 !important; }
.break-words { overflow-wrap: break-word !important; word-break: break-word !important; }

/* =====================================================================
 *  Responsive Tables on Desktop (>=768px), Cards on Mobile (<768px)
 *  Applied project-wide across candidates, interviews, users, masters,
 *  audit logs, reports, developer clients, and developer dashboard.
 * ===================================================================*/
@media (min-width: 768px) {
  .hidden.md\:block,
  .md\:block,
  .desktop-table {
    display: block !important;
  }
  .md\:hidden,
  .mobile-cards {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hidden.md\:block,
  .md\:block,
  .desktop-table {
    display: none !important;
  }
  .md\:hidden,
  .mobile-cards {
    display: block !important;
  }
}

/* Expiry notice strip & clear cross button */
.expiry-notice-strip {
  background: #d97706 !important;
  color: #ffffff !important;
}
.expiry-close-btn {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  cursor: pointer;
}
.expiry-close-btn:hover {
  background: rgba(0, 0, 0, 0.6) !important;
  border-color: #ffffff !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
