html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(37, 99, 235, 0.35);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

:root {
  --hms-accent: #198754;
  --hms-accent-2: #0dcaf0;
  --hms-app-bg: #f4f6f9;
  --hms-sidebar-bg: #ffffff;
  --hms-sidebar-bg-2: #ffffff;
  --hms-sidebar-border: #e0e0e0;
  --hms-topbar-border: #e0e0e0;
  --hms-card-border: #e0e0e0;
}

html[data-bs-theme="dark"] {
  --hms-app-bg: #090d16;
  --hms-topbar-border: rgba(255, 255, 255, 0.07);
  --hms-card-border: rgba(255, 255, 255, 0.07);
  --hms-sidebar-bg: #030712;
  --hms-sidebar-bg-2: #0b0f19;
  --hms-sidebar-border: rgba(255, 255, 255, 0.06);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--hms-app-bg);
}

.hms-admin {
  margin-bottom: 0;
  background: var(--bs-body-bg);
}

.hms-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
              linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.hms-login-shell {
  width: 100%;
  max-width: 440px;
  position: relative;
  padding: 20px;
}

.hms-login-topbar {
  width: 100%;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.25), 0 8px 10px -6px rgba(13, 148, 136, 0.25);
  text-align: center;
  margin-bottom: 24px;
}

.hms-login-topbar-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.hms-login-topbar-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

.hms-login-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  background: #ffffff;
}

.hms-login-card-header {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 14px 24px;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hms-login-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* Custom form elements for premium login UI */
.hms-login-card .form-control {
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.15s ease;
}

.hms-login-card .form-control:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.hms-login-card .form-check {
  display: flex;
  align-items: flex-start;
  min-height: 22px;
  padding-left: 0;
}

.hms-login-card .form-check-input {
  flex-shrink: 0;
  margin-top: 3px;
  margin-right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #d1d5db;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.hms-login-card .form-check-input:checked {
  background-color: #0d9488;
  border-color: #0d9488;
}

.hms-login-card .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
  border-color: #0d9488;
}

.hms-login-card .form-check-label {
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  line-height: 1.4;
}

.hms-login-card .btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transition: all 0.2s ease;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 24px;
}

.hms-login-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.hms-login-card .btn-primary:active {
  transform: translateY(0);
}

.hms-app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.hms-top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--hms-topbar-border);
  padding: 0 20px;
  z-index: 1030;
}

.hms-topbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hms-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.hms-brand-logo {
  height: 35px;
  object-fit: contain;
}

.hms-sidebar-toggle {
  padding: 0;
  border: none;
  background: none;
}

.hms-topbar-right {
  display: flex;
  align-items: center;
}

.hms-user-badge {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.hms-body-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.hms-sidebar {
  width: 250px;
  background: var(--hms-sidebar-bg);
  border-right: 1px solid var(--hms-sidebar-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width 0.3s ease;
}

.hms-nav {
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hms-nav-group-title {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 700;
  color: #a0aabf;
  letter-spacing: 1px;
}

.hms-nav-link {
  color: #495057;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.hms-nav-link:hover {
  background: #f8f9fa;
  color: #198754;
}

.hms-nav-link.active {
  color: #198754;
  background: #f8f9fa;
  border-left-color: #198754;
  font-weight: 600;
}

.hms-main-content {
  flex: 1;
  background: var(--hms-app-bg);
  overflow-y: auto;
}

.hms-content {
  padding: 24px;
}

.hms-container {
  max-width: 100%;
}

.hms-content .card {
  border: 1px solid var(--hms-card-border);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none !important;
  transition: none;
}

.hms-content .card:hover {
  transform: none;
  box-shadow: none !important;
}

html[data-bs-theme="dark"] .hms-content .card {
  background: #1e1e2d;
  border-color: #323248;
}

.hms-content .shadow-sm {
  box-shadow: none !important;
}

.hms-content .form-label {
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(var(--bs-body-color-rgb), 0.86);
}

.hms-content .form-control,
.hms-content .form-select {
  border-radius: 12px;
  border-color: rgba(2, 6, 23, 0.10);
  padding: 10px 12px;
}

html[data-bs-theme="dark"] .hms-content .form-control,
html[data-bs-theme="dark"] .hms-content .form-select {
  border-color: rgba(255, 255, 255, 0.10);
}

.hms-form-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(220, 53, 69, 0.25);
  background: rgba(220, 53, 69, 0.06);
}

.hms-form-section + .hms-form-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--hms-card-border);
}

.hms-form-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hms-form-section-title .title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.hms-form-section-title .hint {
  font-size: 12px;
  color: rgba(var(--bs-body-color-rgb), 0.62);
}

.hms-card-footer {
  border-top: 1px solid var(--hms-card-border);
  background: rgba(var(--bs-body-bg-rgb), 0.65);
  backdrop-filter: blur(8px);
}

.hms-filter-form .form-label {
  margin-bottom: 6px;
}

/* Clean Table Styles */
.table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 0;
}

.table thead th {
  background-color: #f8f9fa;
  color: #495057;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 15px;
  border: 1px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 15px;
  font-size: 14px;
  color: #212529;
  border: 1px solid #dee2e6;
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: #fcfcfc;
}

/* Custom Buttons (Mockup Match) */
.btn {
  font-weight: 500;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
  color: white;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
}

.btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
  background-color: transparent;
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-info {
  color: #0dcaf0;
  border-color: #0dcaf0;
  background-color: transparent;
}

.btn-outline-info:hover {
  color: #000;
  background-color: #0dcaf0;
  border-color: #0dcaf0;
}

@media (max-width: 991.98px) {
  .hms-sidebar {
    width: 220px;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
