/* =============================================================================
   1. Core Setup & Font
============================================================================= */

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

:root {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fff;
  color: #000;
  line-height: 1.5;
  font-size: 1rem;
}

/* Prevent iOS zoom on focus */
input,
select,
textarea,
button {
  font-size: 16px;
}

/* Focus styles */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* =============================================================================
   2. Layout & Spacing Helpers
============================================================================= */

html,
body {
  height: 100%;
}

.container-narrow {
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.shell {
  max-width: 80rem;
  margin-inline: auto;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .shell {
    padding: 2rem;
  }
}

.vh-screen {
  min-height: 100vh;
}

@supports (min-height: 100dvh) {
  .vh-screen {
    min-height: 100dvh;
  }
}

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-scroll {
  height: 100vh;
  overflow: hidden;
}

.with-safe-areas {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* =============================================================================
   3. Typography & Text Utilities
============================================================================= */

.hint,
.text-muted {
  color: rgba(0, 0, 0, 0.6);
}


.banner {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =============================================================================
   4. Buttons
============================================================================= */

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid #000;
  border-radius: 0.5rem;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.06s ease;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 40px;
}

.btn:hover {
  background: #000;
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn.block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-link-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* =============================================================================
   5. Form Controls
============================================================================= */

.input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1.5px solid #000;
  border-radius: 0.5rem;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
}

.input:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* OTP */
.otp {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.otp .code {
  flex: 1 1 0;
  height: 2.75rem;
  text-align: center;
  font-weight: 600;
  border: 1.5px solid #000;
  border-radius: 0.5rem;
  background: #fff;
  color: #000;
}

.otp .code::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.otp .code:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.otp.max-w {
  max-width: 28rem;
}

.otp-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .otp-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Fix autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: white !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
  box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: background-color 5000s ease-in-out 0s;

}

/* =============================================================================
   6. UI Components: Cards, Tables, Modals, Drawers
============================================================================= */

/* Cards */
.card {
  border: 1px solid #000;
  border-radius: 0.75rem;
  padding: 1rem;
  background: #fff;
}

.card-sm {
  padding: 0.75rem;
  border-radius: 0.5rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
}

.table {
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.table thead {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  background: #fff;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  white-space: nowrap;
}

.table tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.table-footer {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

@media (min-width: 768px) {
  .table-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 9999px;
}

/* Sidebar */
.sidebar a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
}

.sidebar a.active {
  border: 1px solid #000;
}

/* Mobile Bottom Pager */
.pager-mobile {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .pager-mobile {
    display: none;
  }
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 60;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 28rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Drawers */
.drawer {
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-overlay {
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* =============================================================================
   7. Animations (Used on Landing Page)
============================================================================= */

@keyframes floating {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.05;
  }

  50% {
    opacity: 0.2;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-element {
  animation: floating 12s ease-in-out infinite;
}

.pulse-element {
  animation: pulse 8s ease-in-out infinite;
}

.gradient-animate {
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
}

.content-section {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

/* =============================================================================
   8. Responsive Overrides
============================================================================= */

@media (max-width: 767px) {
  body {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .table th,
  .table td {
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  [data-lucide="help-circle"] {
    display: none;
  }

  .footer-badges {
    display: none;
  }
}

/* =============================================================================
   9. Spacing Utilities
============================================================================= */

.spacer-xs {
  height: 0.25rem;
}

.spacer-sm {
  height: 0.5rem;
}

.spacer {
  height: 1rem;
}

.spacer-lg {
  height: 1.5rem;
}

/* =============================================================================
   10. Accessibility
============================================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   11. Images
============================================================================= */

img {
  max-width: 100%;
  height: auto;
  display: block;
}