/* TypicOne ERP — Hệ Thống Quản Lý & Điều Hành Tour Du Lịch
   Enterprise UI/UX Design System & Global Stylesheet */

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

:root {
  /* Brand Color Palette */
  --nav: #073b85;
  --nav-hover: rgba(255, 255, 255, 0.12);
  --nav-active: linear-gradient(135deg, #1595f5 0%, #28a8ff 100%);
  --nav-border: rgba(255, 255, 255, 0.16);
  --nav-text: #ffffff;
  --nav-muted: rgba(255, 255, 255, 0.72);

  --bg: #f4f6f3;
  --white: #ffffff;
  --ink: #162c26;
  --ink-light: #28443c;
  --muted: #677b72;
  --line: #dfe5df;
  --line-light: #edf2ed;

  --green: #1f6d53;
  --green-hover: #175440;
  --green-active: #113f30;
  --mint: #e5f1ea;
  --mint-light: #f2f8f4;
  --mint-text: #195843;

  --amber: #b0742a;
  --amber-soft: #fbf2e3;
  --amber-line: #f2dfc3;
  --amber-text: #8c5717;

  --red: #bd4842;
  --red-soft: #fbeeed;
  --red-line: #f3d4d2;
  --red-text: #962c26;

  --blue: #2c6e9e;
  --blue-soft: #edf4fa;
  --blue-line: #d2e4f2;
  --blue-text: #1d4e73;

  --sidebar-w: 260px;
  --header-h: 60px;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs: 0 1px 3px rgba(18, 43, 35, 0.04);
  --shadow-card: 0 2px 10px rgba(18, 43, 35, 0.04), 0 1px 3px rgba(18, 43, 35, 0.02);
  --shadow-hover: 0 8px 24px rgba(18, 43, 35, 0.08), 0 2px 6px rgba(18, 43, 35, 0.04);
  --shadow-drawer: -12px 0 40px rgba(10, 30, 24, 0.16);
  --shadow-popover: 0 16px 36px rgba(12, 34, 28, 0.14);
  --shadow-module: 0 8px 24px rgba(20, 43, 43, 0.055);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  transition: all 0.16s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Authentication Boot & Login */
.auth-boot {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--nav);
  background: #f6f8f4;
}

.auth-boot img {
  animation: auth-pulse 1.1s ease-in-out infinite alternate;
}

.auth-boot strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.auth-boot em {
  color: #559b77;
  font-style: normal;
}

.auth-boot span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

@keyframes auth-pulse {
  to {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(181, 218, 195, 0.45) 0 16%, transparent 16.5%),
    radial-gradient(circle at 90% 90%, rgba(125, 178, 146, 0.28) 0 20%, transparent 20.5%),
    linear-gradient(135deg, #f2f7f1, #ffffff 50%, #eef5ec);
}

.login-orbit {
  position: absolute;
  width: 48vw;
  height: 26vw;
  right: -8vw;
  top: 14vh;
  border: 2px dashed rgba(34, 109, 83, 0.35);
  border-color: rgba(34, 109, 83, 0.35) transparent transparent transparent;
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: min(100%, 480px);
  padding: 38px 38px 30px;
  border: 1px solid rgba(215, 226, 218, 0.85);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(16, 45, 36, 0.12);
  backdrop-filter: blur(12px);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.login-brand strong {
  display: block;
  color: var(--nav);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

.login-brand em {
  color: #438f6c;
  font-style: normal;
}

.login-brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.login-heading {
  margin: 22px 0 16px;
  text-align: center;
}

.login-heading h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.login-role {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dbe4dd;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #f8faf7;
  text-align: left;
}

.login-role:hover, .login-role.active {
  border-color: #5c977b;
  background: var(--mint);
  color: var(--green-active);
}

.login-role span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.login-role strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-card form > label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 650;
  font-size: 12.5px;
  color: var(--ink-light);
}

.login-field {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #d7e0d9;
  border-radius: var(--radius-md);
  background: #fff;
  transition: all 0.16s ease;
}

.login-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 109, 83, 0.12);
}

.login-field > span {
  color: #8fa097;
  font-size: 16px;
}

.login-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13.5px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 12.5px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.remember input {
  accent-color: var(--green);
}

.password-toggle, .text-button {
  padding: 0;
  border: 0;
  color: var(--green);
  font-weight: 600;
  background: transparent;
}

.login-error {
  min-height: 20px;
  margin: 10px 0 4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

.login-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, #154d3d, #216f55);
  box-shadow: 0 6px 18px rgba(31, 109, 83, 0.22);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.login-submit:hover {
  background: linear-gradient(135deg, #104133, #195d46);
  box-shadow: 0 8px 22px rgba(31, 109, 83, 0.3);
}

.login-status {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 11.5px;
}

.login-status span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #4caf73;
}

/* App Shell & Core Layout */
#appShell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

aside {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  background: linear-gradient(180deg, #073b85 0%, #0755a5 55%, #0877c9 100%);
  color: var(--nav-text);
  display: flex;
  flex-direction: column;
  padding: 0 12px 14px;
  border-right: 1px solid var(--nav-border);
  box-shadow: 5px 0 24px rgba(7, 59, 133, 0.2);
  transition: width 0.22s ease, transform 0.22s ease;
}

.brand {
  height: var(--header-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px;
  color: #fff;
  border-bottom: 1px solid var(--nav-border);
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  filter: brightness(0) invert(1);
}

.brand-copy { min-width: 0; white-space: nowrap; }

.brand-copy strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.brand-copy em {
  color: #8fd8ff;
  font-style: normal;
}

.sidebar-collapse-toggle, .sidebar-mobile-close {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border: 1px solid #dce5ef; border-radius: 10px;
  color: #5d718d; background: #fff;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.sidebar-collapse-toggle:hover { color: #1769d2; border-color: #aac7ee; background: #f3f8ff; }
.sidebar-mobile-close { margin-left: auto; color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); }
.sidebar-mobile-close:hover { background: rgba(255,255,255,.2); }
.sidebar-mobile-close { display: none; }

.nav-eyebrow {
  padding: 12px 8px 7px;
  color: var(--nav-muted);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.7px;
  font-weight: 800;
  white-space: nowrap;
}

nav {
  flex: 1;
  min-height: 0;
  overflow: hidden auto;
  padding: 8px 6px 16px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}

nav::-webkit-scrollbar {
  width: 4px;
}

nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}

.nav-overview {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-overview .nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: rgba(255,255,255,.12);
}

.nav-overview:hover {
  background: var(--nav-hover);
  color: #fff;
}

.nav-overview.active {
  border-color: rgba(255,255,255,.26);
  background: var(--nav-active);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,52,122,.28);
}

.nav-overview.active .nav-icon {
  color: #fff;
  background: rgba(255,255,255,.18);
}

.navgroup + .navgroup {
  margin-top: 4px;
}

.navgroup-title {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-xs);
  color: var(--nav-muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-align: left;
}

.navgroup-title:hover {
  color: #fff;
  background: var(--nav-hover);
}

.navgroup-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navgroup-heading .nav-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.navgroup-title i {
  color: var(--nav-muted);
  font-size: 13px;
  font-style: normal;
  transition: transform 0.18s ease;
}

.navgroup-title[aria-expanded="true"] {
  color: #fff;
}

.navgroup-title[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.navgroup-items {
  margin: 2px 0 5px 10px;
  padding-left: 9px;
  border-left: 1px solid var(--nav-border);
}

.navgroup-items > button {
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.nav-icon {
  width: 20px; height: 20px; flex: 0 0 20px;
  color: rgba(255,255,255,.82);
}

.navgroup-items > button:hover {
  background: var(--nav-hover);
  color: #fff;
}

.navgroup-items > button.active {
  border-color: rgba(255,255,255,.26);
  background: var(--nav-active);
  color: #fff;
  font-weight: 700;
}

.navgroup-items > button.active .nav-icon {
  color: #fff;
}

.asidefoot {
  margin-top: auto;
  padding: 10px 8px 0;
  border-top: 1px solid var(--nav-border);
  color: rgba(255,255,255,.72);
  font-size: 10.5px;
  flex-shrink: 0;
}

.online {
  color: #72f2bd;
}

.nav-label, .nav-eyebrow, .navgroup-title span, .asidefoot, .brand-copy { transition: opacity .16s ease; }
.nav-overview, .navgroup-items > button { position: relative; }
body.sidebar-collapsed aside {
  width: 72px;
  padding-inline: 7px;
  color: #7896c4;
  background: #fff;
  border-right-color: #dce4ee;
  box-shadow: 3px 0 16px rgba(31, 55, 88, .09);
}
body.sidebar-collapsed .layout { margin-left: 72px; }
body.sidebar-collapsed .brand { justify-content: center; padding: 0; border-bottom-color: #e5ebf2; }
body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-eyebrow, body.sidebar-collapsed .navgroup-title,
body.sidebar-collapsed .nav-label, body.sidebar-collapsed .asidefoot { display: none; }
body.sidebar-collapsed .brand img { width: 34px; height: 34px; flex-basis: 34px; filter: none; }
body.sidebar-collapsed .navgroup-items[hidden] { display: block; }
body.sidebar-collapsed .nav-overview, body.sidebar-collapsed .navgroup-items > button {
  width: 48px; min-height: 48px; justify-content: center; padding: 8px; margin: 3px auto;
  color: #86a2cb; border-radius: 10px;
}
body.sidebar-collapsed .navgroup-items { margin: 4px 0; padding: 0; border: 0; }
body.sidebar-collapsed .nav-overview .nav-icon { width: 22px; height: 22px; }
body.sidebar-collapsed nav { padding-top: 10px; scrollbar-color: #b9c0cb transparent; }
body.sidebar-collapsed nav::-webkit-scrollbar-thumb { background: #b9c0cb; }
body.sidebar-collapsed .nav-overview:hover,
body.sidebar-collapsed .navgroup-items > button:hover { color: #2873d7; background: #f1f6fd; }
body.sidebar-collapsed .nav-overview.active,
body.sidebar-collapsed .navgroup-items > button.active {
  color: #1769d2;
  border-color: #a9c8ff;
  background: #edf5ff;
  box-shadow: none;
}
body.sidebar-collapsed .nav-overview.active .nav-icon,
body.sidebar-collapsed .navgroup-items > button.active .nav-icon { color: #1769d2; background: transparent; }
body.sidebar-collapsed .nav-overview::after, body.sidebar-collapsed .navgroup-items > button::after {
  content: attr(data-tooltip); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 60;
  padding: 7px 10px; border-radius: 7px; color: #fff; background: #062f69;
  box-shadow: 0 8px 20px rgba(7,35,78,.24); font-size: 12px; font-weight: 700;
  white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(4px,-50%);
  transition: opacity .18s ease, transform .18s ease;
}
body.sidebar-collapsed .nav-overview:hover::after, body.sidebar-collapsed .nav-overview:focus-visible::after,
body.sidebar-collapsed .navgroup-items > button:hover::after, body.sidebar-collapsed .navgroup-items > button:focus-visible::after {
  opacity: 1; transform: translate(0,-50%);
}

.sidebar-collapse-toggle:focus-visible, .sidebar-mobile-close:focus-visible,
.nav-overview:focus-visible, .navgroup-title:focus-visible, .navgroup-items > button:focus-visible {
  outline: 2px solid #2774d8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  aside, .layout, .sidebar-collapse-toggle, .navgroup-title i,
  .nav-overview, .navgroup-items > button { transition: none; }
}

/* Layout, Header & Main Container */
.layout {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .22s ease;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.header-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav-toggle {
  display: none;
}

.app-header .crumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.app-header .crumb span {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.app-header .crumb i {
  color: #aab6b0;
  font-size: 16px;
  font-style: normal;
}

.app-header .crumb b {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.headright {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-tools button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #dfe5df;
  border-radius: var(--radius-sm);
  color: #4b625a;
  background: #fff;
  transition: all 0.16s ease;
}

.header-tools button:hover {
  border-color: #8bb39c;
  color: var(--green);
  background: var(--mint-light);
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.notification-item:hover {
  border-color: #a8ccb6;
  background: var(--mint-light);
}

.notification-item > span:first-child {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
  font-weight: 800;
  font-size: 14px;
}

.notification-item strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.notification-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.notification-item > i {
  color: #92a49c;
  font-style: normal;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  border: 1px solid #c7decb;
}

.account-wrap {
  position: relative;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: all 0.16s ease;
}

.account-button:hover {
  border-color: #adc7b6;
  background: var(--mint-light);
}

.account-copy {
  min-width: 0;
}

.account-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.account-chevron {
  color: var(--muted);
  font-size: 15px;
  margin-left: 2px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 260px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-popover);
}

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
}

.account-menu-head strong {
  display: block;
  font-size: 13.5px;
}

.account-menu-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.account-menu-line {
  height: 1px;
  margin: 6px 0;
  background: var(--line);
}

.account-menu > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
}

.account-menu > button:hover {
  background: var(--bg);
}

.account-menu .logout-button {
  color: var(--red);
}

.permission-summary > p {
  margin: 0 0 16px;
  color: var(--muted);
}

.permission-summary h3 {
  margin: 18px 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.permission-list {
  display: grid;
  gap: 8px;
}

.permission-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--mint-light);
}

.permission-list span {
  color: var(--green);
  font-weight: 800;
}

.permission-role + .permission-role {
  margin-top: 18px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

/* Main Content Area */
.content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 20px 24px 36px;
  flex: 1;
}

.content > * {
  min-width: 0;
}

/* Page Top Header */
.pagetop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.pagetop::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

.pagetop > div:first-child {
  min-width: 0;
}

.eyebrow {
  letter-spacing: 1.2px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagetop h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 2px 0 4px;
  color: #112822;
}

.pagetop p {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0;
  max-width: 820px;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Common Buttons */
.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 7px 14px;
  font-weight: 650;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}

.btn:hover {
  border-color: #b0c9bb;
  background: var(--mint-light);
  color: var(--green);
}

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(31, 109, 83, 0.22);
}

.btn.primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  box-shadow: 0 4px 14px rgba(31, 109, 83, 0.32);
}

.btn.danger {
  color: var(--red);
  border-color: var(--red-line);
}

.btn.danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-xs);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #edf1ed;
  color: #556960;
  line-height: 1.35;
  border: 1px solid transparent;
}

.badge.green {
  background: var(--mint);
  color: var(--mint-text);
  border-color: #c9e4d3;
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber-text);
  border-color: var(--amber-line);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red-text);
  border-color: var(--red-line);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue-text);
  border-color: var(--blue-line);
}

/* Stats Cards */
.stats {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 14px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3.5px;
  background: var(--green);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 4px 0 3px;
  color: #122822;
}

.stat .meta {
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

/* Hero Executive Overview */
.hero {
  background: linear-gradient(135deg, #102520, #1b3d33);
  border-radius: var(--radius-lg);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 4px 0 8px;
  max-width: 580px;
}

.hero p {
  color: #c4d7cc;
  font-size: 12.5px;
  max-width: 580px;
  margin: 0 0 14px;
  line-height: 1.5;
}

.hero .eyebrow {
  color: #9cd4ad;
}

.hero .btn {
  background: #c8e3bb;
  color: #133328;
  border: 0;
  font-weight: 750;
}

.hero .btn:hover {
  background: #d9f0cd;
}

.heroart {
  min-width: 220px;
  position: relative;
  display: grid;
  place-items: center;
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 160px;
  height: 160px;
  position: absolute;
}

.orbit.two {
  width: 210px;
  height: 210px;
}

.plane {
  font-size: 48px;
  color: #c8e3bb;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.triptag {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 68, 56, 0.9);
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 750;
  right: 0;
  bottom: 0;
  color: #c8e3bb;
}

/* Grids & Containers */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.split > .card {
  margin-bottom: 0;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.cardhead h3 {
  font-size: 15px;
  font-weight: 750;
  margin: 0;
  color: #172e27;
  letter-spacing: -0.2px;
}

.sub {
  color: var(--muted);
  font-size: 11.5px;
}

/* Table Design */
.tablewrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #aebfb5 transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  color: #556960;
  font-size: 10.5px;
  font-weight: 750;
  background: #f4f7f4;
  padding: 11px 14px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #edf1ed;
  font-size: 12.5px;
  color: #1e332c;
  vertical-align: middle;
}

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background: #f4f8f4;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td .sub {
  display: block;
  margin-top: 2px;
}

td strong, td b {
  font-weight: 650;
  color: #122822;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  font-weight: 700;
  text-align: left;
}

.link:hover {
  text-decoration: underline;
}

/* Search & Filters */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dce4dd;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8faf7, #f4f7f4);
}

.filters:focus-within {
  border-color: #8db59d;
  box-shadow: 0 0 0 3px rgba(31, 109, 83, 0.08);
}

input, select, textarea {
  border: 1px solid #d5dfd7;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  min-height: 38px;
  padding: 8px 11px;
  min-width: 0;
  box-sizing: border-box;
  font-size: 12.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 109, 83, 0.12);
}

input[type="checkbox"], input[type="radio"] {
  min-height: 0;
  padding: 0;
  box-shadow: none;
}

.filters input {
  flex: 1;
  min-width: 200px;
}

.filters select {
  max-width: 220px;
}

/* Progress & Metric Bars */
.barrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar {
  height: 6px;
  background: #e4ebe4;
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #328666, #53ab83);
  border-radius: 999px;
}

.barrow small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

/* Alerts & Notices */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #fcf6eb;
  border: 1px solid #f1e3c8;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #694a18;
}

.alert.red {
  background: #fcf1ef;
  border-color: #f5d8d4;
  color: #8c2e27;
}

.alert.green {
  background: #edf6ef;
  border-color: #d7ebd9;
  color: #1d5f47;
}

.alert b {
  display: block;
  font-size: 12.5px;
  margin-bottom: 3px;
}

.notice {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 10px;
}

/* Journey Quick Steps */
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.journey button {
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  padding: 14px 12px;
  color: var(--ink);
  transition: all 0.16s ease;
}

.journey button:hover {
  border-color: #8cb69e;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.journey b {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}

.journey small {
  font-size: 11px;
  color: var(--muted);
}

.num {
  font-size: 10px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Kanban Board */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.column {
  background: #edf2eb;
  border-radius: var(--radius-md);
  padding: 10px;
  min-height: 240px;
  border: 1px solid #dfe6dc;
}

.columnhead {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #4b6256;
}

.lead {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(18, 43, 35, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lead:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #9cbda9;
}

.lead b {
  font-size: 12.5px;
  display: block;
}

.lead p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
}

.lead select {
  width: 100%;
  padding: 4px 6px;
  font-size: 11px;
  margin-top: 8px;
  min-height: 30px;
}

.lead .price {
  color: var(--green);
  font-weight: 750;
  font-size: 12.5px;
}

/* Tour & Guide Grids */
.tourgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tourcard {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tourcard:hover {
  border-color: #97c0a7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.tourcard h3 {
  font-size: 15.5px;
  font-weight: 750;
  margin: 10px 0 4px;
  color: #122822;
}

.tourcard .dates {
  margin: 10px 0;
  font-size: 11.5px;
  color: var(--muted);
}

.tourcard .bottom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toursymbol {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: #edf4ec;
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
}

.guidegrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.guidecard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.guidecard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #97c0a7;
}

.guideavatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ede6d8;
  color: #826639;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 750;
}

.guidecard h3 {
  font-size: 14.5px;
  font-weight: 750;
  margin: 10px 0 2px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid #dce4dd;
  border-radius: var(--radius-md);
  background: #edf2eb;
  width: fit-content;
  max-width: 100%;
}

.tabs .btn {
  min-height: 32px;
  padding: 5px 12px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #556960;
  font-size: 12px;
}

.tabs .btn:hover {
  color: var(--green);
  background: rgba(255, 255, 255, 0.6);
}

.tabs .btn.selected {
  background: #fff;
  border-color: #d1ded4;
  color: var(--green);
  font-weight: 750;
  box-shadow: 0 2px 6px rgba(18, 43, 35, 0.06);
}

/* Timelines & Tags */
.timeline {
  padding: 10px 0 10px 20px;
  border-left: 2px solid #d1ded4;
  position: relative;
  font-size: 12.5px;
}

.timeline:before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  left: -5px;
  top: 15px;
}

.timeline b {
  display: block;
  font-size: 13px;
  color: #122822;
}

.timeline p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tagset {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Metric Line */
.metricline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 12.5px;
}

.metricline:last-child {
  border: 0;
}

.moneypositive {
  color: var(--green);
  font-weight: 750;
}

.dangertext {
  color: var(--red);
}

/* Checklist Items */
.checkitem {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-light);
}

.checkitem:last-child {
  border-bottom: 0;
}

.checkitem .grow {
  flex: 1;
}

.checkitem b {
  font-size: 12.5px;
}

.checkitem input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

/* Modal Overlays */
.modalback {
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 22, 0.6);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlay-fade 0.18s ease-out;
  backdrop-filter: blur(4px);
}

.modal {
  width: min(760px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  background: #f8faf8;
  overflow-y: auto;
  padding: 20px 24px 28px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(8, 28, 21, .24);
  animation: modal-rise 0.2s ease-out;
  overscroll-behavior: contain;
}

.modal.narrow {
  width: min(500px, 100%);
}

.modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: -20px;
  z-index: 10;
  margin: -20px -24px 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.modalhead h2 {
  font-size: 18px;
  font-weight: 750;
  margin: 0;
  color: #122822;
}

.close {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.close:hover {
  border-color: #9ebba9;
  color: var(--ink);
  background: #f4f7f4;
}

/* Form Layout */
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

label {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: #4b6256;
  margin-bottom: 4px;
}

label input, label select, label textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
}

label.full {
  grid-column: 1 / -1;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.formfooter {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.modal > form > .formfooter {
  position: sticky;
  bottom: -28px;
  z-index: 5;
  margin: 20px -24px -28px;
  padding: 14px 24px 18px;
  background: rgba(246, 248, 245, 0.98);
  backdrop-filter: blur(8px);
}

/* Empty State */
.empty {
  text-align: center;
  max-width: 500px;
  margin-inline: auto;
  padding: 32px 20px;
  color: var(--muted);
  line-height: 1.6;
  border: 1px dashed #d5ded7;
  border-radius: var(--radius-md);
  background: #fafcf9;
}

/* Toast Notifications */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 70;
  pointer-events: none;
}

.toast {
  background: #132e25;
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: toast-in 0.2s ease-out;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-rise {
  from { transform: translateY(12px) scale(.985); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

/* Flow Stepper */
.flow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.flow span {
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: #edf2eb;
  color: #556c60;
  font-size: 11px;
  font-weight: 650;
}

.flow span.on {
  background: var(--green);
  color: #fff;
}

/* CRM Sales & Customer Service Specific Styles */
.crmflow, .care-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0 0 16px;
}

.crmstep, .care-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 80px;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.crmstep:not(:last-child)::after, .care-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  background: var(--bg);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.crmstep small, .care-step small {
  display: block;
  color: var(--green);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.crmstep b, .care-step b {
  font-size: 13px;
  color: #122822;
}

.crmstatus, .care-step span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.crmsection, .care-section {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.crmsectionhead, .care-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.crmsectionhead h2, .care-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  color: #122822;
}

.crmsectionhead p, .care-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.task-overdue {
  color: var(--red);
  font-weight: 750;
}

/* Profiles (CRM, Customer, Care) */
.crm-profile, .care-profile, .customer-profile {
  padding: 16px 20px 80px;
}

.crm-profile-title, .care-profile-title, .customer-profile-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-profile-avatar, .care-profile-avatar, .customer-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #185c45, #388a6c);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(31, 109, 83, 0.22);
}

.crm-profile-summary, .care-profile-summary, .customer-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.crm-profile-summary > div, .care-profile-summary > div, .customer-profile-stat {
  border: 1px solid #dce4dd;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: #fff;
}

.crm-profile-summary small, .care-profile-summary small, .customer-profile-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.crm-profile-summary strong, .care-profile-summary strong, .customer-profile-stat strong {
  font-size: 14.5px;
  color: #122822;
}

.crm-profile-content, .care-profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 16px;
}

.crm-profile-section, .customer-section {
  margin-bottom: 18px;
}

.crm-profile-section h3, .customer-section h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #4b6256;
}

.crm-profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.crm-profile-field {
  padding: 6px 0;
  border-bottom: 1px solid #edf1ed;
}

.crm-profile-field small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 650;
  margin-bottom: 2px;
}

.crm-profile-field b {
  font-size: 12.5px;
}

.crm-profile-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #edf5ef;
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: #183e30;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .stats {
    grid-template-columns: none;
  }
  .tourgrid, .guidegrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .guideapp-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-header .crumb span, .app-header .crumb i {
    display: none;
  }
  .journey {
    grid-template-columns: repeat(2, 1fr);
  }
  .kanban {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  aside {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: min(270px, 88vw);
  }

  .sidebar-collapse-toggle { display: none; }
  .sidebar-mobile-close { display: grid; }
  body.sidebar-collapsed aside {
    width: min(270px,88vw); padding-inline: 12px; color: var(--nav-text);
    background: linear-gradient(180deg, #073b85 0%, #0755a5 55%, #0877c9 100%);
    border-right-color: var(--nav-border); box-shadow: 5px 0 24px rgba(7,59,133,.2);
  }
  body.sidebar-collapsed .brand { justify-content: flex-start; gap: 11px; padding: 0 4px; }
  body.sidebar-collapsed .brand img { width: 34px; height: 34px; flex-basis: 34px; filter: brightness(0) invert(1); }
  body.sidebar-collapsed .brand img, body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-eyebrow, body.sidebar-collapsed .navgroup-title,
  body.sidebar-collapsed .nav-label, body.sidebar-collapsed .asidefoot { display: block; }
  body.sidebar-collapsed .navgroup-items[hidden] { display: none; }
  body.sidebar-collapsed .nav-overview, body.sidebar-collapsed .navgroup-items > button {
    width: 100%; justify-content: flex-start; padding: 8px 10px; margin: 0 0 2px;
    color: rgba(255,255,255,.82); border-radius: var(--radius-sm);
  }
  body.sidebar-collapsed .nav-overview { margin-bottom: 10px; color: rgba(255,255,255,.9); }
  body.sidebar-collapsed .nav-overview:hover,
  body.sidebar-collapsed .navgroup-items > button:hover { color: #fff; background: var(--nav-hover); }
  body.sidebar-collapsed .nav-overview.active,
  body.sidebar-collapsed .navgroup-items > button.active {
    color: #fff; border-color: rgba(255,255,255,.26); background: var(--nav-active);
    box-shadow: 0 8px 18px rgba(0,52,122,.28);
  }
  body.sidebar-collapsed .nav-overview.active .nav-icon,
  body.sidebar-collapsed .navgroup-items > button.active .nav-icon { color: #fff; background: rgba(255,255,255,.18); }
  body.sidebar-collapsed nav { padding-top: 8px; scrollbar-color: rgba(255,255,255,.35) transparent; }
  body.sidebar-collapsed .navgroup-items {
    margin: 2px 0 5px 10px; padding-left: 9px; border-left: 1px solid var(--nav-border);
  }
  body.sidebar-collapsed .nav-overview::after, body.sidebar-collapsed .navgroup-items > button::after { display: none; }

  body.navopen aside {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: #fff;
    font-size: 18px;
  }

  .mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(3,25,57,.56);
    backdrop-filter: blur(2px);
    border: 0;
  }

  body.navopen .mobile-nav-backdrop {
    display: block;
  }

  .layout {
    margin-left: 0;
  }

  .app-header {
    padding: 0 16px;
  }

  .content {
    padding: 16px 14px 28px;
  }

  .pagetop {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pagetop > .actions {
    width: 100%;
  }

  .pagetop > .actions .btn {
    flex: 1 1 auto;
  }

  .hero {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .heroart {
    display: none;
  }

  .stats {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow: visible;
  }

  .tourgrid, .guidegrid, .split, .formgrid {
    grid-template-columns: 1fr;
  }

  label.full {
    grid-column: auto;
  }

  .modal {
    width: 100%;
    padding: 16px 16px 20px;
  }

  .modalhead {
    top: -16px;
    margin: -16px -16px 14px;
    padding: 12px 16px;
  }

  .modal > form > .formfooter {
    bottom: -20px;
    margin: 14px -16px -20px;
    padding: 12px 16px 16px;
  }

  .account-button {
    padding: 4px 6px;
  }

  .account-copy {
    display: none;
  }
}

@media print {
  aside, header, .actions, .btn, .notice, #toast, .modalback {
    display: none !important;
  }
  .layout {
    margin: 0 !important;
  }
  .content {
    padding: 0 !important;
  }
  body {
    background: #fff;
  }
}
