/**
 * Global display quality — sharper text, buttons, forms (Windows + HiDPI).
 */

:root {
  --ui-text: #0f172a;
  --ui-text-muted: #64748b;
  --ui-border: rgba(15, 23, 42, 0.1);
  --ui-border-strong: rgba(15, 23, 42, 0.15);
  --ui-radius: 0.75rem;
  --ui-font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ui-primary: #7c3aed;
  --ui-primary-dark: #5b21b6;
  --ui-primary-glow: rgba(124, 58, 237, 0.16);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.admin-app-body,
body.auth-body {
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ui-text);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
  body.admin-app-body,
  body.auth-body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  text-rendering: optimizeLegibility;
}

p, .text-secondary, .form-text {
  color: var(--ui-text-muted);
}

/* Breadcrumb — was .small (too tiny / blurry) */
.admin-breadcrumb-list {
  font-size: 0.9375rem;
}

.admin-breadcrumb .breadcrumb-item a,
.admin-breadcrumb .breadcrumb-item.active {
  font-weight: 600;
}

/* Buttons */
.btn {
  font-family: var(--ui-font);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  border-width: 1px;
  padding: 0.5rem 1rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-sm {
  font-size: 0.875rem;
  min-height: 2.125rem;
  padding: 0.375rem 0.75rem;
}

.btn-lg {
  font-size: 1.0625rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
}

.btn:active {
  transform: none;
}

/* Forms */
.form-control,
.form-select {
  font-family: var(--ui-font);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ui-text);
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ui-border-strong);
  background-color: #fff;
  box-shadow: none;
}

.form-control-sm,
.form-select-sm {
  font-size: 0.875rem;
  min-height: 2.125rem;
  padding: 0.375rem 0.625rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px var(--ui-primary-glow);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-check-label {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Cards & tables */
.card {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: #fff;
}

.card-header {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
  border-bottom: 1px solid var(--ui-border);
}

.table {
  font-size: 0.9375rem;
  color: var(--ui-text);
}

.table thead th {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-bottom-width: 1px;
}

.table td,
.table th {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}

.badge {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35em 0.65em;
  border: 1px solid transparent;
}

.alert {
  font-size: 0.9375rem;
  font-weight: 500;
  border-width: 1px;
}

.dropdown-menu {
  font-size: 0.9375rem;
  border: 1px solid var(--ui-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.dropdown-item {
  font-weight: 500;
  padding: 0.5rem 0.85rem;
}

/* Icons */
.bi::before {
  display: inline-block;
  vertical-align: -0.125em;
}

img,
svg {
  image-rendering: auto;
}

.admin-brand-stair-img {
  image-rendering: -webkit-optimize-contrast;
}

/* Module subnav (Guest Rooms etc.) */
.d-flex.gap-2.mb-3 > .btn-sm {
  min-height: 2.25rem;
  padding-inline: 0.85rem;
}

/* Page header actions — Checkout / Cancel same size & alignment */
.admin-action-btns {
  align-items: center;
}

.admin-action-btns form {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}

.admin-action-btns .btn.btn-sm {
  min-height: 2rem !important;
  height: auto;
  min-width: auto;
  max-width: none;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.admin-action-btns .btn-outline-warning.btn-sm:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Softer launcher badge — backdrop-filter blurs text on some GPUs */
.launcher-badge,
.odoo-meta-badge {
  backdrop-filter: none;
  background: rgba(255, 255, 255, 0.1);
}

/* Nav tabs */
.nav-link {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Pagination */
.pagination .page-link {
  font-weight: 600;
  min-width: 2.25rem;
  text-align: center;
}

/* Tailwind pagination SVGs (w-5 h-5) without Tailwind CSS = giant arrows */
nav[role="navigation"] svg.w-5,
nav[aria-label] svg.w-5,
.w-5.h-5 {
  width: 1.25rem !important;
  height: 1.25rem !important;
  max-width: 1.25rem;
  max-height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Modal */
.modal-title {
  font-weight: 700;
  font-size: 1.125rem;
}
