/* ==========================================================================
   Hosting Subidha - Premium UI/UX Polish (Lagom 2 Theme)
   Follows UI/UX Pro Max & WCAG 2.1 AA Standards
   ========================================================================== */

/* 1. Global Reset & Typography Refinements */
html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Interactive Elements & Touch Accessibility */
button,
a.btn,
.btn,
.nav-tabs > li > a,
.dropdown-menu > li > a,
.card,
.list-group-item-action {
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Touch targets >= 44px on mobile */
@media (max-width: 767.98px) {
  .btn,
  .form-control,
  .input-group-addon,
  .nav-tabs > li > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 3. Button Polish */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  font-weight: 600;
  border-radius: 8px;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  border-color: #1e40af !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-default,
.btn-secondary {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-default:hover,
.btn-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-1px);
}

/* 4. Card & Container Elevations */
.panel,
.card,
.main-content .panel-default {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05), 0 1px 4px -1px rgba(15, 23, 42, 0.03) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.panel:hover,
.card:hover {
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08) !important;
}

/* 5. Mobile Layout & Horizontal Overflow Prevention */
@media (max-width: 991.98px) {
  body {
    overflow-x: hidden !important;
  }
  
  .container,
  .main-content {
    padding-left: 14px !important;
    padding-right: 14px !important;
    max-width: 100% !important;
  }
  
  .table-responsive {
    border: none !important;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Mobile Logo sizing */
  .logo img {
    max-height: 38px !important;
    width: auto !important;
  }
}

/* 6. Form Controls & Focus States */
.form-control {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 14px;
}

.form-control:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* 7. Status Badges */
.label,
.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.label-success,
.badge-success {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0;
}

.label-warning,
.badge-warning {
  background-color: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a;
}

.label-danger,
.badge-danger {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca;
}

.label-info,
.badge-info {
  background-color: #eff6ff !important;
  color: #1e40af !important;
  border: 1px solid #bfdbfe;
}

/* 8. Table Styling */
.table > thead > tr > th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
}

.table > tbody > tr:hover {
  background-color: #f8fafc;
}

/* 9. Support prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
