/* RoseX Accounting — application-wide visual system */
:root {
  color-scheme: light;
  --rx-ink: #14263a;
  --rx-ink-soft: #263d53;
  --rx-accent: #15977f;
  --rx-accent-dark: #0c7866;
  --rx-accent-soft: #e7f5f1;
  --rx-canvas: #f3f6f8;
  --rx-surface: #ffffff;
  --rx-border: #e3eaf0;
  --rx-muted: #758497;
  --rx-text: #24364a;
  --rx-shadow: 0 12px 32px rgba(20, 38, 58, .055);
  --rx-shadow-strong: 0 20px 55px rgba(13, 31, 49, .14);
  --rx-radius: 18px;
  --rx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body,
body.app-body,
body.app-public-body {
  margin: 0;
  color: var(--rx-text);
  background: var(--rx-canvas);
  font-family: var(--rx-font) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6,
body h1, body h2, body h3 {
  color: var(--rx-ink);
  font-family: var(--rx-font) !important;
  letter-spacing: -.025em;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
::selection { color: #fff; background: var(--rx-accent); }

/* Main application frame */
.app-shell { display: flex; min-height: 100vh; background: var(--rx-canvas); }
.app-content { display: flex; flex: 1 1 0%; flex-direction: column; width: calc(100% - 272px); min-width: 0; min-height: 100vh; background: var(--rx-canvas); }
.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  width: 272px;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  padding: 27px 18px 18px;
  color: #dce7ef;
  background: linear-gradient(180deg, #172d43 0%, #102236 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 10px 0 30px rgba(15, 35, 54, .045);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
@media (min-width: 768px) { .app-sidebar { display: flex !important; } }
.app-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: #fff; }
.app-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.06em;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 14px;
  background: linear-gradient(145deg, #1aa88d, #087965);
  box-shadow: 0 8px 18px rgba(5, 129, 106, .25), inset 0 1px 0 rgba(255,255,255,.24);
}
.app-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.app-brand-name { color: #fff; font-size: 23px; font-weight: 780; letter-spacing: -.065em; }
.app-brand-subtitle { margin-top: 6px; color: #a8bdca; font-size: 9px; font-weight: 750; letter-spacing: .26em; }
.app-workspace-card {
  margin: 29px 0 27px;
  padding: 15px 14px 14px;
  border: 1px solid rgba(211, 230, 237, .12);
  border-radius: 15px;
  background: rgba(255,255,255,.055);
}
.app-workspace-heading { display: flex; align-items: center; gap: 8px; color: #a9c0ce; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.app-workspace-indicator { width: 7px; height: 7px; border-radius: 50%; background: #48c7a8; box-shadow: 0 0 0 4px rgba(72,199,168,.12); }
.app-workspace-name { margin: 10px 0 12px; color: #fff; font-size: 13px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.app-workspace-action { display: inline-flex; align-items: center; gap: 7px; color: #78d6c1; font-size: 11px; font-weight: 700; transition: color .2s ease; }
.app-workspace-action:hover { color: #c1f3e7; }
.app-nav { display: flex; flex-direction: column; gap: 25px; }
.app-nav > div > p { margin: 0 0 10px; padding: 0 11px; color: #8198aa !important; font-size: 9px !important; font-weight: 800 !important; letter-spacing: .18em !important; }
.app-nav > div > div { display: grid; gap: 4px; }
.app-nav > div > div > * { margin-top: 0 !important; }
.app-nav a.app-nav-link {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 9px 11px;
  color: #c3d1dc !important;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.35;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.app-nav a.app-nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-right: 11px;
  border: 1.5px solid #829aab;
  border-radius: 2px;
  transform: rotate(45deg);
  transition: background .18s ease, border-color .18s ease;
}
.app-nav a.app-nav-link:hover,
.app-nav a.app-nav-link.is-active {
  color: #fff !important;
  border-color: rgba(137, 221, 202, .13);
  background: rgba(31, 166, 139, .15) !important;
  transform: translateX(2px);
}
.app-nav a.app-nav-link:hover::before,
.app-nav a.app-nav-link.is-active::before { border-color: #68d4b9; background: #68d4b9; }
.app-sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: 25px; padding: 15px 7px 3px; border-top: 1px solid rgba(255,255,255,.09); }
.app-sidebar-footer-mark { display: grid; place-items: center; width: 29px; height: 29px; color: #8de0cd; font-size: 9px; font-weight: 800; border: 1px solid rgba(141,224,205,.25); border-radius: 9px; }
.app-sidebar-footer strong, .app-sidebar-footer small { display: block; }
.app-sidebar-footer strong { color: #dce8ee; font-size: 10px; font-weight: 700; }
.app-sidebar-footer small { margin-top: 3px; color: #8298a8; font-size: 9px; }

/* Top navigation */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 82px;
  padding: 14px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgba(218, 228, 235, .85);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
}
.app-topbar-left, .app-topbar-actions { display: flex; align-items: center; min-width: 0; }
.app-topbar-left { gap: 14px; }
.app-topbar-heading h2 { margin: 4px 0 0; color: var(--rx-ink); font-size: 17px; font-weight: 720; }
.app-eyebrow { margin: 0; color: #8292a2; font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.app-topbar-actions { justify-content: flex-end; gap: 20px; }
.app-topbar-workspace { display: inline-flex; align-items: center; gap: 9px; max-width: 250px; padding: 10px 13px; color: #41566a; font-size: 11px; font-weight: 650; border: 1px solid var(--rx-border); border-radius: 11px; background: #f9fbfc; transition: border-color .2s, background .2s; }
.app-topbar-workspace:hover { border-color: #b7d9d1; background: #f2faf7; }
.app-topbar-workspace-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--rx-accent); box-shadow: 0 0 0 4px #e1f3ee; }
.app-topbar-workspace-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-chevron { color: #8a9aa8; font-size: 15px; }
.app-user-block { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-user-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; color: #087d69; font-size: 12px; font-weight: 800; border-radius: 12px; background: #e1f3ee; }
.app-user-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.app-user-copy strong { max-width: 155px; overflow: hidden; color: #263b4f; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.app-user-copy small { color: #8795a3; font-size: 10px; }
.app-signout { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; color: #647789; font-size: 11px; font-weight: 700; border: 1px solid var(--rx-border); border-radius: 10px; background: #fff; transition: color .2s, border-color .2s, background .2s; }
.app-signout svg { width: 15px; height: 15px; }
.app-signout:hover { color: #b44f55; border-color: #f0cfd0; background: #fff8f8; }
.app-menu-toggle, .app-menu-close { display: inline-grid; place-items: center; color: #3d596c; border: 1px solid var(--rx-border); border-radius: 11px; background: #fff; }
.app-menu-toggle { display: none; width: 40px; height: 40px; }
.app-menu-toggle:hover, .app-menu-close:hover { color: var(--rx-accent-dark); border-color: #b8dcd3; background: #f5fbf9; }
.app-mobile-nav { position: fixed; inset: 0; z-index: 50; }
.app-mobile-nav:not(.hidden) { display: block; }
.app-mobile-nav-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(9, 25, 40, .56); backdrop-filter: blur(3px); }
.app-mobile-nav-drawer { position: absolute; left: 0; top: 0; padding: 22px 17px 18px; color: #dce7ef; background: linear-gradient(180deg, #172d43, #102236); box-shadow: 18px 0 55px rgba(5, 19, 32, .25); animation: rx-slide-in .22s ease-out; }
.app-mobile-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-menu-close { width: 36px; height: 36px; color: #dce7ef; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); }
.app-workspace-card-mobile { margin-top: 22px; }
@keyframes rx-slide-in { from { transform: translateX(-14px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }

/* Main content and shared components */
.app-main { flex: 1 0 auto; width: 100%; max-width: 1720px; margin: 0 auto; padding: clamp(20px, 3vw, 42px); min-width: 0; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; padding: 14px clamp(20px, 3vw, 42px) 20px; color: #9aa7b2; font-size: 10px; }
.app-footer span:first-child { color: #607586; font-weight: 750; letter-spacing: .04em; }
.app-main .rounded-2xl.bg-white\/90,
.app-main .rounded-2xl.bg-white\/80,
.app-main .rounded-xl.bg-white\/90,
.app-main .rounded-xl.bg-white\/80 {
  border: 1px solid var(--rx-border);
  background: #fff;
  box-shadow: var(--rx-shadow);
}
.app-main [class~="ring-rose-100"] { --tw-ring-color: var(--rx-border); }
.app-main [class~="border-rose-100"] { border-color: var(--rx-border) !important; }
.app-main [class~="border-rose-200"] { border-color: #d4e1e7 !important; }
.app-main [class~="bg-rose-50"], .app-main [class~="bg-rose-50/60"], .app-main [class~="bg-rose-50/70"] { background: #f0f8f5 !important; }
.app-main [class~="bg-white/90"], .app-main [class~="bg-white/80"] { background: #fff !important; }
.app-main [class~="text-rose-500"], .app-main [class~="text-rose-600"], .app-main [class~="text-rose-700"] { color: var(--rx-accent-dark) !important; }
.app-main a[class*="bg-rose-600"], .app-main button[class*="bg-rose-600"] {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #159b82, #087762) !important;
  box-shadow: 0 7px 15px rgba(13, 139, 115, .15);
}
.app-main a[class*="bg-rose-600"]:hover, .app-main button[class*="bg-rose-600"]:hover { background: linear-gradient(135deg, #0f8b74, #066a58) !important; transform: translateY(-1px); }
.app-main a[class*="text-rose-600"], .app-main a[class*="text-rose-700"] { color: var(--rx-accent-dark) !important; }
.app-main a[class*="border-rose-200"]:hover { background: #eef8f5 !important; }
.app-main .shadow-sm { box-shadow: var(--rx-shadow); }
.app-main .text-slate-400 { color: #8797a5 !important; }
.app-main .text-slate-500 { color: #738496 !important; }
.app-main .text-slate-600 { color: #52677a !important; }
.app-main .text-slate-900 { color: var(--rx-ink) !important; }
.app-main h1 { font-size: clamp(25px, 2.4vw, 34px); font-weight: 760; line-height: 1.16; }
.app-main h2 { font-size: clamp(18px, 1.8vw, 22px); font-weight: 730; line-height: 1.25; }
.app-main h3 { font-size: 16px; font-weight: 700; }
.app-main .rounded-2xl { border-radius: var(--rx-radius); }
.app-main .rounded-xl { border-radius: 14px; }
.app-main .rounded-lg { border-radius: 11px; }

/* Form controls */
.app-main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]),
.app-main select,
.app-main textarea,
.public-auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]),
.public-auth-card select,
.public-auth-card textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: #24394d;
  font-size: 13px;
  border: 1px solid #dce5eb;
  border-radius: 10px;
  outline: none;
  background: #fbfcfd;
  box-shadow: inset 0 1px 2px rgba(20,38,58,.025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.app-main textarea, .public-auth-card textarea { min-height: 105px; resize: vertical; }
.app-main input:focus, .app-main select:focus, .app-main textarea:focus,
.public-auth-card input:focus, .public-auth-card select:focus, .public-auth-card textarea:focus {
  border-color: #67bba7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21,151,127,.12);
}
.app-main input[type="checkbox"], .app-main input[type="radio"],
.public-auth-card input[type="checkbox"], .public-auth-card input[type="radio"] { accent-color: var(--rx-accent); }
.app-main input[type="file"] { max-width: 100%; color: #5f7283; font-size: 12px; }
.app-main label, .public-auth-card label { color: #52677a; font-size: 11px; font-weight: 700; }
.app-main button, .app-main [role="button"] { transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.app-main button:focus-visible, .app-main a:focus-visible, .app-topbar a:focus-visible, .app-nav a:focus-visible,
.public-auth-card button:focus-visible, .public-auth-card a:focus-visible { outline: 3px solid rgba(21,151,127,.25); outline-offset: 2px; }

/* Tables */
.table-responsive { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--rx-border); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch; }
.app-main table { width: 100%; border-collapse: separate; border-spacing: 0; color: #40566a; font-size: 12px; }
.app-main table thead th, .app-main table th {
  padding: 13px 14px;
  color: #667b8d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid #e5edf1;
  background: #f6f9fa;
}
.app-main table tbody td { padding: 12px 14px; border-bottom: 1px solid #edf1f4; vertical-align: middle; }
.app-main table tbody tr:last-child td { border-bottom: 0; }
.app-main table tbody tr:hover { background: #f8fbfa; }
.app-main table a { color: var(--rx-accent-dark); font-weight: 650; }
.app-main table a:hover { text-decoration: underline; }
@media (max-width: 767px) {
  .table-responsive { overflow-x: auto !important; overflow-y: hidden !important; }
  .table-responsive > table.min-w-full { min-width: 720px; }
  .table-responsive > table { min-width: 680px; }
  .table-responsive table th, .table-responsive table td { white-space: nowrap; font-size: 11px; padding: 10px 11px; }
}

/* Alerts and pagination */
.app-main [class*="bg-rose-50"][class*="text-rose-700"],
.app-main [class*="border-rose-200"][class*="text-rose-700"] { color: #9c4b53 !important; }
.app-main .pagination a, .app-main nav[aria-label*="Pagination"] a { border-radius: 9px; }

/* Dashboard */
.rx-dashboard { display: flex; flex-direction: column; gap: 25px; }
.rx-dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
  border-radius: 22px;
  background: radial-gradient(circle at 88% 30%, rgba(35, 175, 145, .24), transparent 27%), linear-gradient(115deg, #172e44 0%, #203f55 58%, #1c5a59 100%);
  box-shadow: 0 18px 38px rgba(17, 45, 65, .13);
}
.rx-dashboard-hero-copy { position: relative; z-index: 2; max-width: 680px; }
.rx-dashboard-hero .app-eyebrow { color: #91cdbd; }
.rx-dashboard-hero h1 { margin: 11px 0 9px; color: #fff !important; font-size: clamp(25px, 3vw, 35px); }
.rx-dashboard-hero p:not(.app-eyebrow) { max-width: 570px; margin: 0; color: #c1d2dc; font-size: 13px; line-height: 1.65; }
.rx-dashboard-hero-mark { position: relative; display: grid; place-items: center; width: 170px; height: 140px; flex: 0 0 170px; margin-right: 5%; }
.rx-hero-orbit { position: absolute; display: block; width: 145px; height: 85px; border: 1px solid rgba(155,229,210,.25); border-radius: 50%; transform: rotate(-28deg); }
.rx-hero-orbit-two { width: 110px; height: 135px; transform: rotate(38deg); border-color: rgba(155,229,210,.17); }
.rx-hero-monogram { display: grid; place-items: center; width: 75px; height: 75px; color: #c9f2e8; font-size: 21px; font-weight: 850; letter-spacing: -.08em; border: 1px solid rgba(201,242,232,.35); border-radius: 23px; background: rgba(255,255,255,.08); box-shadow: 0 12px 35px rgba(4,22,35,.15); transform: rotate(-7deg); }
.rx-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rx-stat-card { min-width: 0; padding: 18px 19px 17px; border: 1px solid var(--rx-border); border-radius: 16px; background: #fff; box-shadow: var(--rx-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.rx-stat-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(20,38,58,.08); }
.rx-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rx-stat-label { color: #778999; font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.rx-stat-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; }
.rx-stat-icon svg { width: 17px; height: 17px; }
.rx-icon-blue { color: #477cae; background: #eaf2fb; }
.rx-icon-green { color: #168c73; background: #e5f5f0; }
.rx-icon-violet { color: #7968b0; background: #f0edfa; }
.rx-icon-amber { color: #b88735; background: #fbf3e5; }
.rx-icon-cyan { color: #3a8798; background: #e8f4f6; }
.rx-icon-white { color: #d7fff3; background: rgba(255,255,255,.14); }
.rx-stat-value { margin: 17px 0 4px; color: var(--rx-ink); font-size: clamp(25px, 2.4vw, 32px); font-weight: 780; line-height: 1.1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rx-stat-value-compact { font-size: clamp(20px, 2vw, 26px); }
.rx-stat-caption { margin: 0; color: #98a5af; font-size: 10px; }
.rx-stat-card-highlight { color: #fff; border-color: transparent; background: linear-gradient(135deg, #15977f, #08735f); box-shadow: 0 12px 26px rgba(13,139,115,.16); }
.rx-stat-card-highlight .rx-stat-label, .rx-stat-card-highlight .rx-stat-caption { color: rgba(255,255,255,.72); }
.rx-stat-card-highlight .rx-stat-value { color: #fff; }
.rx-panel { padding: clamp(18px, 2.5vw, 26px); border: 1px solid var(--rx-border); border-radius: 18px; background: #fff; box-shadow: var(--rx-shadow); }
.rx-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 19px; }
.rx-panel-heading h2 { margin: 6px 0 5px; color: var(--rx-ink); font-size: 19px; }
.rx-panel-heading p:not(.app-eyebrow) { margin: 0; color: #8493a0; font-size: 11px; line-height: 1.55; }
.rx-currency-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.rx-currency-tile { padding: 15px 16px; border: 1px solid #e4eeeb; border-radius: 13px; background: #f7fbf9; }
.rx-currency-tile span { display: block; color: #82938e; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rx-currency-tile strong { display: block; margin-top: 8px; color: #1c4c43; font-size: 22px; font-weight: 760; }
.rx-quick-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.rx-primary-action, .rx-secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 39px; padding: 10px 14px; border-radius: 10px; font-size: 11px; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.rx-primary-action { color: #fff !important; border: 1px solid transparent; background: linear-gradient(135deg, #159b82, #087762); box-shadow: 0 7px 15px rgba(13,139,115,.14); }
.rx-primary-action:hover { background: linear-gradient(135deg, #0f8b74, #066a58); transform: translateY(-1px); }
.rx-secondary-action { color: #496174; border: 1px solid #dfe8ed; background: #fff; }
.rx-secondary-action:hover { color: #087762; border-color: #b8dcd3; background: #f4faf8; }

/* Public authentication screens */
.app-public-body { min-height: 100vh; background: #f2f5f7; }
.public-auth-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); min-height: 100vh; }
.public-brand-panel { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow: hidden; padding: clamp(28px, 5vw, 62px); color: #fff; background: radial-gradient(circle at 82% 76%, rgba(30,177,145,.25), transparent 27%), linear-gradient(145deg, #172d43 0%, #14283d 58%, #0f4e4b 100%); }
.public-brand { position: relative; z-index: 2; align-self: flex-start; }
.public-brand-message { position: relative; z-index: 2; max-width: 500px; margin: auto 0; padding: 65px 0 80px; }
.public-kicker { color: #82d5bf; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.public-brand-message h1 { max-width: 470px; margin: 18px 0 15px; color: #fff !important; font-size: clamp(34px, 4vw, 54px); font-weight: 760; line-height: 1.08; letter-spacing: -.055em; }
.public-brand-message > p:last-child { max-width: 410px; margin: 0; color: #b9cbd4; font-size: 13px; line-height: 1.8; }
.public-brand-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 15px; color: #8ca5b2; font-size: 9px; letter-spacing: .06em; }
.public-brand-footer span:first-child { color: #c1d5dd; font-weight: 800; letter-spacing: .16em; }
.public-brand-art { position: absolute; right: -65px; bottom: 12%; width: 390px; height: 300px; opacity: .85; transform: rotate(-12deg); }
.public-art-ring { position: absolute; right: 20px; bottom: 0; width: 300px; height: 170px; border: 1px solid rgba(139,226,204,.22); border-radius: 50%; }
.public-art-ring-two { right: 60px; bottom: -30px; width: 210px; height: 250px; transform: rotate(55deg); }
.public-art-bar { position: absolute; bottom: 65px; width: 42px; border: 1px solid rgba(163,237,219,.35); border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, rgba(46,191,159,.25), rgba(46,191,159,.02)); }
.public-art-bar-one { right: 225px; height: 82px; }
.public-art-bar-two { right: 160px; height: 140px; }
.public-art-bar-three { right: 95px; height: 195px; }
.public-art-dot { position: absolute; right: 75px; bottom: 255px; width: 10px; height: 10px; border-radius: 50%; background: #78d8c0; box-shadow: 0 0 0 9px rgba(120,216,192,.12), 0 0 30px #78d8c0; }
.public-auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 45px clamp(20px, 5vw, 70px) 25px; }
.public-auth-card { width: 100%; max-width: 490px; padding: clamp(25px, 4vw, 42px); border: 1px solid #e5ebef; border-radius: 22px; background: #fff; box-shadow: 0 22px 65px rgba(20,38,58,.08); }
.public-auth-card .text-rose-500, .public-auth-card .text-rose-600, .public-auth-card a.text-rose-600 { color: var(--rx-accent-dark) !important; }
.public-auth-card h1 { margin-top: 8px; font-size: clamp(25px, 3vw, 32px); font-weight: 760; line-height: 1.18; }
.public-auth-card form { margin-top: 23px; }
.public-auth-card form > div { margin-bottom: 15px; }
.public-auth-card button[type="submit"] { min-height: 45px; color: #fff; border: 0; border-radius: 11px; background: linear-gradient(135deg, #159b82, #087762); box-shadow: 0 8px 17px rgba(13,139,115,.17); }
.public-auth-card button[type="submit"]:hover { background: linear-gradient(135deg, #0f8b74, #066a58); }
.public-copyright { margin: 19px 0 0; color: #9aa7b1; font-size: 9px; text-align: center; }

/* Small-screen behaviour */
body.mobile-menu-open { overflow: hidden; }
@media (min-width: 768px) and (max-width: 1000px) {
  .app-user-copy { display: none; }
  .app-topbar-workspace { max-width: 145px; }
  .app-signout span { display: none; }
  .app-signout { width: 38px; height: 38px; justify-content: center; padding: 0; }
}
@media (max-width: 1100px) {
  .app-topbar-actions { gap: 12px; }
  .app-topbar-workspace { max-width: 190px; }
  .app-user-copy strong { max-width: 120px; }
}
@media (max-width: 767px) {
  .app-content { width: 100%; }
  .app-menu-toggle { display: inline-grid; }
  .app-topbar { position: sticky; min-height: 70px; gap: 10px; padding: 11px 14px; }
  .app-topbar-heading h2 { font-size: 14px; }
  .app-eyebrow { font-size: 8px; }
  .app-topbar-actions { gap: 8px; }
  .app-topbar-workspace { display: none; max-width: 42vw; padding: 8px 9px; font-size: 10px; }
  .app-topbar-workspace-dot { display: none; }
  .app-user-block { gap: 0; }
  .app-user-avatar { width: 33px; height: 33px; flex-basis: 33px; }
  .app-user-copy { display: none; }
  .app-signout { width: 35px; height: 35px; justify-content: center; padding: 0; }
  .app-signout span { display: none; }
  .app-signout svg { width: 16px; height: 16px; }
  .app-main { padding: 18px 14px 24px; }
  .app-footer { padding: 10px 15px 16px; font-size: 9px; }
  .app-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rx-dashboard { gap: 17px; }
  .rx-dashboard-hero { min-height: 165px; padding: 22px 19px; border-radius: 17px; }
  .rx-dashboard-hero h1 { font-size: 25px; }
  .rx-dashboard-hero p:not(.app-eyebrow) { max-width: 95%; font-size: 11px; }
  .rx-dashboard-hero-mark { width: 76px; height: 90px; flex-basis: 76px; margin-right: -13px; opacity: .7; }
  .rx-hero-orbit { width: 85px; height: 54px; }
  .rx-hero-orbit-two { width: 60px; height: 85px; }
  .rx-hero-monogram { width: 49px; height: 49px; border-radius: 15px; font-size: 15px; }
  .rx-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .rx-stat-card { padding: 14px 13px; border-radius: 13px; }
  .rx-stat-label { font-size: 8px; letter-spacing: .045em; }
  .rx-stat-icon { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; }
  .rx-stat-icon svg { width: 15px; height: 15px; }
  .rx-stat-value { margin-top: 14px; font-size: 25px; }
  .rx-stat-value-compact { font-size: 18px; }
  .rx-stat-caption { font-size: 9px; }
  .rx-panel { padding: 17px 14px; border-radius: 15px; }
  .rx-panel-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .rx-panel-heading h2 { font-size: 18px; }
  .rx-currency-grid { grid-template-columns: 1fr; gap: 8px; }
  .rx-currency-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; }
  .rx-currency-tile strong { margin-top: 0; font-size: 18px; }
  .rx-quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .rx-primary-action, .rx-secondary-action { min-height: 42px; padding: 9px 10px; font-size: 10px; text-align: center; }
  .app-main .flex.flex-wrap { gap: 8px; }
  .app-main .rounded-2xl, .app-main .rounded-xl { max-width: 100%; }
  .public-auth-layout { display: flex; flex-direction: column; min-height: 100vh; }
  .public-brand-panel { min-height: auto; padding: 22px 22px 18px; }
  .public-brand .app-brand-mark { width: 39px; height: 39px; flex-basis: 39px; border-radius: 12px; }
  .public-brand .app-brand-name { font-size: 20px; }
  .public-brand-message { margin: 23px 0 5px; padding: 0; }
  .public-kicker { font-size: 8px; }
  .public-brand-message h1 { max-width: 520px; margin: 8px 0 7px; font-size: 25px; }
  .public-brand-message > p:last-child { max-width: 540px; font-size: 10px; line-height: 1.55; }
  .public-brand-art { right: -175px; bottom: -150px; opacity: .42; transform: scale(.65) rotate(-12deg); }
  .public-brand-footer { display: none; }
  .public-auth-side { flex: 1; justify-content: flex-start; padding: 22px 14px 18px; }
  .public-auth-card { max-width: 540px; padding: 24px 20px; border-radius: 17px; }
  .public-auth-card h1 { font-size: 25px; }
  .public-copyright { margin-top: 14px; }
}
@media (max-width: 390px) {
  .app-topbar-workspace { max-width: 36vw; }
  .app-topbar-left { gap: 8px; }
  .app-topbar-heading h2 { font-size: 12px; }
  .rx-dashboard-hero-mark { display: none; }
  .rx-stat-grid { gap: 8px; }
  .rx-stat-card { padding: 12px 10px; }
  .rx-stat-value { font-size: 22px; }
  .rx-stat-value-compact { font-size: 16px; }
  .rx-quick-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Accounting Journal configuration */
#sortable-account-rows tr[draggable="true"] { cursor: grab; }
#sortable-account-rows tr[draggable="true"]:active { cursor: grabbing; }
#sortable-account-rows tr[draggable="true"] td:first-child { user-select: none; }
#sortable-account-rows tr[draggable="true"]:hover td:first-child span { color: var(--rx-accent-dark); background: var(--rx-accent-soft); }


/* Workspace logo: always use the image saved in Document Defaults without cropping or distortion. */
.company-logo-image { display: block; object-fit: contain; object-position: center; background: #fff; }
.app-brand-logo { width: 68px; height: 44px; max-width: 112px; flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(20,38,58,.08); border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.app-sidebar-footer-logo { width: 38px; height: 29px; flex: 0 0 38px; padding: 3px 4px; border: 1px solid rgba(20,38,58,.08); border-radius: 7px; }
.app-topbar-heading { display: flex; align-items: center; gap: 11px; }
.app-topbar-brand-logo { width: 48px; height: 38px; flex: 0 0 48px; padding: 3px 5px; border: 1px solid #e3eaf0; border-radius: 9px; }
.rx-hero-logo { width: 148px; height: 104px; max-width: 100%; padding: 8px; border: 1px solid rgba(20,38,58,.08); border-radius: 18px; box-shadow: 0 12px 35px rgba(4,22,35,.15); }
.public-brand .app-brand-logo { width: 76px; height: 48px; }

/* New Accounting Journal actions: quiet white buttons, black labels, and restrained hover motion. */
body.accounting-journal-ui .app-main a[class*="rounded-"],
body.accounting-journal-ui .app-main button[class*="rounded-"] {
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(17,24,39,.045);
  transition: transform .18s cubic-bezier(.2,.75,.25,1), box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
  will-change: transform;
}
body.accounting-journal-ui .app-main a[class*="rounded-"]:hover,
body.accounting-journal-ui .app-main button[class*="rounded-"]:hover:not(:disabled) {
  color: #000 !important;
  border-color: #9ca3af !important;
  background: #f9fafb !important;
  box-shadow: 0 7px 16px rgba(17,24,39,.09);
  transform: translateY(-2px);
}
body.accounting-journal-ui .app-main a[class*="rounded-"]:active,
body.accounting-journal-ui .app-main button[class*="rounded-"]:active:not(:disabled) {
  box-shadow: 0 2px 5px rgba(17,24,39,.07);
  transform: translateY(0) scale(.99);
}
body.accounting-journal-ui .app-main button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
body.accounting-journal-ui .app-main a[class*="rounded-"]:focus-visible,
body.accounting-journal-ui .app-main button[class*="rounded-"]:focus-visible { outline: 3px solid rgba(17,24,39,.14); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  body.accounting-journal-ui .app-main a[class*="rounded-"],
  body.accounting-journal-ui .app-main button[class*="rounded-"] { transition: none; }
}

@media (max-width: 767px) {
  .app-topbar-brand-logo { width: 38px; height: 34px; flex-basis: 38px; padding: 3px; }
  .public-brand .app-brand-logo { width: 68px; height: 40px; }
  .rx-hero-logo { width: 76px; height: 76px; padding: 5px; }
}
