/* Dahlia House Admin — shared UI theme */
:root {
  --admin-green-950: #123b32;
  --admin-green-900: #174b3d;
  --admin-green-800: #245548;
  --admin-green-700: #17634d;
  --admin-green-600: #23815f;
  --admin-green-100: #dcefe5;
  --admin-green-50: #f0f7f3;
  --admin-bg: #f5f8f6;
  --admin-card: #ffffff;
  --admin-border: #e2eae5;
  --admin-text: #1e293b;
  --admin-muted: #64748b;
  --admin-radius: 16px;
  --admin-shadow: 0 4px 18px rgba(18, 59, 50, .055);
}

html {
  min-height: 100%;
  background: var(--admin-bg);
}

body {
  color: var(--admin-text);
  background-color: var(--admin-bg);
  font-family: "Plus Jakarta Sans", Inter, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  transition: color .18s ease, background-color .18s ease,
    border-color .18s ease, box-shadow .18s ease;
}

a {
  text-underline-offset: 3px;
}

:where(input, select, textarea):focus-visible,
:where(button, a):focus-visible {
  outline: 2px solid #23815f;
  outline-offset: 2px;
}

/* Consistent cards and content panels */
:where(.panel, .stat-card, .section-card) {
  background: var(--admin-card);
  border-color: var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}

:where(main) {
  min-width: 0;
}

:where(main > header, main > section, main > div) {
  min-width: 0;
}

/* Consistent form fields */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea, .field, .control) {
  border-color: #d1e0d7;
  border-radius: 10px;
  max-width: 100%;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea, .field, .control):focus {
  border-color: var(--admin-green-600);
  box-shadow: 0 0 0 3px rgba(35, 129, 95, .12);
}

/* Shared primary action styles */
:where(.btn-primary) {
  color: #fff;
  background: var(--admin-green-700);
  border-color: var(--admin-green-700);
}

:where(.btn-primary):hover {
  background: var(--admin-green-900);
}

:where(button.bg-blue-600, a.bg-blue-600,
button.bg-emerald-700, a.bg-emerald-700) {
  color: #fff;
}

/* Tables */
:where(table) {
  border-color: var(--admin-border);
}

:where(thead, .table-head) {
  background-color: #f0f7f3;
}

:where(th) {
  color: #52665d;
}

:where(tbody tr) {
  border-color: #e8efeb;
}

:where(tbody tr:hover) {
  background-color: #f5faf7;
}

/* Shared sidebar appearance */
aside.sidebar,
aside.fixed.inset-y-0.left-0 {
  background-color: var(--admin-green-950);
  color: #e6f3ec;
}

aside.sidebar .nav-active {
  background-color: var(--admin-green-800);
  color: #fff;
}

aside.sidebar a:hover {
  color: #fff;
}

/* Headers and separators */
:where(header.sticky) {
  background-color: rgba(255, 255, 255, .96);
  border-color: var(--admin-border);
  backdrop-filter: blur(12px);
}

/* Keep status meanings distinct */
:where(.pill-pending, .pill-unpaid) {
  background: #fff7ed;
  color: #9a3412;
}

:where(.pill-confirmed) {
  background: #eff6ff;
  color: #1d4ed8;
}

:where(.pill-paid, .pill-checked_in) {
  background: #ecfdf5;
  color: #047857;
}

:where(.pill-cancelled) {
  background: #fef2f2;
  color: #b91c1c;
}

/* Responsive content */
img, video, canvas, svg {
  max-width: 100%;
}

@media (max-width: 767px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  :where(.panel, .stat-card, .section-card) {
    border-radius: 14px;
  }
}

/* =====================================================
   NUSASTAY ADMIN — UI CONSISTENCY PATCH
   ===================================================== */

/* Warna dasar yang konsisten */
html,
body {
    background-color: #f5f8f6;
    color: #1e293b;
}

/* Sidebar: samakan warna meskipun markup berbeda */
aside.sidebar,
aside.fixed.inset-y-0.left-0,
aside.w-64.bg-slate-900,
aside.bg-slate-900 {
    background-color: #123b32 !important;
    color: #e6f3ec;
}

/* Navigasi aktif dan tautan navigasi */
aside .nav-active,
aside a.bg-blue-600,
aside a.bg-emerald-700,
aside a[class*="bg-emerald-700"] {
    background-color: #245548 !important;
    color: #ffffff !important;
}

aside a:hover {
    color: #ffffff;
}

aside a.bg-blue-600:hover,
aside a.bg-emerald-700:hover {
    background-color: #17634d !important;
}

/* Samakan aksen biru lama menjadi hijau */
button.bg-blue-600,
a.bg-blue-600 {
    background-color: #17634d !important;
    color: #ffffff !important;
}

button.bg-blue-600:hover,
a.bg-blue-600:hover {
    background-color: #174b3d !important;
}

.text-blue-500,
.text-blue-600,
.hover\:text-blue-600:hover {
    color: #23815f !important;
}

.focus\:ring-blue-600:focus {
    --tw-ring-color: #23815f !important;
}

/* Header */
header.sticky,
body > div > div > header,
main > header {
    border-color: #e2eae5;
}

/* Kartu dan panel */
.panel,
.stat-card,
.section-card,
main section.rounded-2xl,
main > div > .bg-white.rounded-2xl {
    border-color: #e2eae5;
    border-radius: 16px;
}

/* Input dan textarea */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
    border-color: #d1e0d7;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #23815f;
}

/* Tombol utama */
button.bg-emerald-700,
a.bg-emerald-700 {
    background-color: #17634d;
}

button.bg-emerald-700:hover,
a.bg-emerald-700:hover {
    background-color: #174b3d;
}

/* Tabel */
table {
    border-color: #e2eae5;
}

thead,
.table-head {
    background-color: #f0f7f3;
}

tbody tr:hover {
    background-color: #f5faf7;
}

/* Responsif */
@media (max-width: 767px) {
    main {
        min-width: 0;
        max-width: 100%;
    }

    main > div,
    main > section {
        min-width: 0;
    }

    table {
        max-width: 100%;
    }
}

/* NusaStay: fixed sidebar for admin pages other than legacy rooms.php */
@media (min-width: 768px) {
    aside.fixed.inset-y-0.left-0 {
        position: fixed !important;
        inset-block: 0 !important;
        left: 0 !important;
        width: 16rem !important;
        height: 100vh !important;
        overflow-y: auto;
        flex-shrink: 0;
        z-index: 40;
    }

    /* Keep the content beside the fixed sidebar, not underneath it. */
    aside.fixed.inset-y-0.left-0 ~ div {
        min-width: 0;
    }
}
