/* Hábitat Aurora — optical surfaces and purposeful motion. */
:root {
  --ink: #153f38;
  --muted: #506e65;
  --aurora-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rim: #ffffffd9;
  --glass: linear-gradient(145deg, #ffffffe8, #f7fffbac 65%, #edf8f7bd);
  --glass-shadow:
    0 18px 50px #174a3910, 0 3px 8px #174a3905, inset 0 1px 0 #fff;
}
body {
  background:
    radial-gradient(ellipse at 0 0, #a6d6c8a6, transparent 45%),
    radial-gradient(ellipse at 100% 25%, #c5dfe97a, transparent 48%),
    radial-gradient(ellipse at 60% 100%, #dfd5ee80, transparent 48%), #eef3ef;
}
body::before {
  background: linear-gradient(115deg, #ffffff50, transparent 45%, #ffffff30);
}
.shell {
  gap: 18px;
  grid-template-columns: 250px minmax(0, 1fr);
}
.sidebar {
  margin: 18px 0 18px 18px;
  top: 18px;
  height: calc(100dvh - 36px);
  border-radius: 28px;
  background: linear-gradient(160deg, #ffffffcc, #e5f3ecb3);
  box-shadow: var(--glass-shadow);
}
.sidebar .brand img.company-logo {
  max-width: 160px;
  background: #ffffffe0;
  border-radius: 18px;
  padding: 15px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.6px;
}
.nav button {
  min-height: 42px;
  border-radius: 14px;
  gap: 12px;
  transition:
    background 0.22s,
    color 0.22s,
    box-shadow 0.22s,
    transform 0.32s var(--aurora-ease);
}
.nav button.active {
  background: linear-gradient(125deg, #227966, #14513f);
  box-shadow:
    0 7px 18px #14533e26,
    inset 0 1px #ffffff66;
}
.nav button.active::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c3ecd6;
  margin-left: auto;
  box-shadow: 0 0 9px #d7ffe680;
}
.main {
  padding: 0 34px 26px;
}
.topbar {
  gap: 14px;
  min-height: 78px;
  height: auto;
  padding: 16px 0;
}
.workspace-name {
  white-space: nowrap;
}
.top-meta {
  gap: 12px;
}
.quick-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ffffffd9;
  background: #ffffffa3;
  padding: 9px 13px;
  border-radius: 13px;
  color: #47675c;
  min-height: 40px;
  font-size: 12px;
  box-shadow: inset 0 1px #fff;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  border: 1px solid #c8dacf;
  background: #f3f8f4;
  padding: 3px 5px;
  border-radius: 5px;
  color: #587164;
}
.heading {
  margin: 34px 0 28px;
  gap: 20px;
}
.heading h1 {
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 650;
  letter-spacing: -1.8px;
  line-height: 1.12;
  margin: 10px 0 12px;
}
.heading .eyebrow {
  letter-spacing: 2px;
  font-size: 9px;
}
.heading p {
  line-height: 1.7;
  font-size: 13px;
}
.actions {
  gap: 9px;
}
.btn {
  border-radius: 13px;
  min-height: 44px;
  padding: 11px 16px;
  transition:
    transform 0.28s var(--aurora-ease),
    box-shadow 0.28s,
    background 0.2s;
  color: #245444;
}
.btn.primary {
  background: linear-gradient(125deg, #247e63, #14523f);
  box-shadow:
    0 7px 19px #1b624329,
    inset 0 1px #ffffff6b;
}
.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}
.aurora-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  padding: 30px 32px;
  margin-bottom: 22px;
  border: 1px solid #ffffff95;
  background:
    radial-gradient(ellipse at 92% 100%, #4a9d8575, transparent 62%),
    linear-gradient(120deg, #133e35, #266b58);
  color: white;
  box-shadow:
    0 18px 44px #234e3924,
    inset 0 1px #ffffff45;
}
.aurora-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at var(--light-x, 80%) var(--light-y, 30%),
    #e8ffe81f,
    transparent 50%
  );
  pointer-events: none;
}
.aurora-banner .eyebrow {
  color: #c1dfca;
  letter-spacing: 2px;
}
.aurora-banner h2 {
  font-size: clamp(22px, 2.3vw, 31px);
  letter-spacing: -1px;
  font-weight: 550;
  line-height: 1.25;
  margin: 11px 0 9px;
}
.aurora-banner p {
  font-size: 12px;
  line-height: 1.7;
  color: #d1e7db;
  margin: 0;
  max-width: 480px;
}
.aurora-banner .btn {
  background: #ffffff15;
  border-color: #ffffff66;
  color: white;
  white-space: nowrap;
  box-shadow: inset 0 1px #ffffff38;
}
.aurora-banner .btn:hover {
  background: #ffffff26;
}
.aurora-sculpture {
  width: 115px;
  height: 115px;
  flex: 0 0 115px;
  position: relative;
  margin: 0 12px;
  transform: rotate(-18deg);
  pointer-events: none;
}
.aurora-sculpture span {
  position: absolute;
  inset: 16px;
  border-radius: 25px;
  border: 1px solid #e8fff99c;
  background: linear-gradient(135deg, #e4fff433, #c0ead007);
  box-shadow:
    inset 0 1px 8px #ffffff24,
    0 14px 28px #0d37251a;
}
.aurora-sculpture span:nth-child(2) {
  transform: translate(16px, -12px) rotate(12deg);
}
.aurora-sculpture span:nth-child(3) {
  transform: translate(-16px, 12px) rotate(-12deg);
}
.stats {
  gap: 16px;
  margin-bottom: 24px;
}
.stat,
.panel,
.office-card,
.report-card,
.personal-asset,
.collaborator-card {
  border-color: #ffffffe8;
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
}
.stat {
  min-height: 172px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.stat .number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -1.2px;
  font-weight: 600;
}
.stat label {
  font-size: 11px;
  line-height: 1.5;
}
.stat .caption {
  font-size: 11px;
  line-height: 1.5;
}
.stat.featured {
  background:
    radial-gradient(ellipse at 100% 0, #7ab59869, transparent 65%),
    linear-gradient(135deg, #205f4b, #123f31);
}
.stat.featured .number {
  font-size: clamp(23px, 2.1vw, 34px);
}
.stat-icon {
  border-radius: 12px;
}
.action-stat {
  transition:
    transform 0.3s var(--aurora-ease),
    box-shadow 0.3s;
}
.action-stat .card-arrow {
  display: inline-block;
  transition: transform 0.25s;
}
.action-stat:hover .card-arrow {
  transform: translate(3px, -3px);
}
.dashboard-grid {
  gap: 22px;
  margin-bottom: 24px;
}
.panel-head {
  padding: 25px 26px 18px;
  gap: 16px;
}
.panel-head h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.panel-head p {
  font-size: 11px;
  line-height: 1.6;
}
.office-row {
  padding: 18px 26px;
}
.bar {
  height: 5px;
  border-radius: 8px;
  background: #dcebe3;
  overflow: hidden;
}
.bar i {
  background: linear-gradient(90deg, #348269, #90b69c);
  border-radius: 8px;
  transform-origin: left;
  animation: aurora-bar 0.8s var(--aurora-ease) both;
}
.category-list {
  padding: 4px 26px 20px;
}
.note-card {
  background: linear-gradient(120deg, #e3efe5b3, #eaf4ed99);
  border: 1px solid #ffffffa3;
  border-radius: 17px;
}
.request-search,
.toolbar,
.module-toolbar {
  border-radius: 22px;
}
.request-input input {
  background: #ffffffcf;
  border-color: #c9ded1;
  border-radius: 13px;
  min-height: 48px;
}
.module-tabs {
  padding: 5px;
  background: #ddebe49c;
  border: 1px solid #ffffffad;
  border-radius: 16px;
  gap: 5px;
}
.module-tabs button {
  border-radius: 11px;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}
.module-tabs button.active {
  background: #ffffffec;
  box-shadow: 0 3px 12px #275c3c15;
  color: #1c6247;
}
:where(
  .field input,
  .field select,
  .field textarea,
  .sheet-filters input,
  .sheet-filters select
) {
  background: #ffffffc9;
  border: 1px solid #cddfd5;
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
:where(.field input, .field select, .field textarea):focus {
  border-color: #438d72;
  box-shadow: 0 0 0 4px #3d876a12;
  background: #fff;
}
:where(input, select, textarea, button, a):focus-visible {
  outline: 2px solid #247b5c;
  outline-offset: 3px;
}
:where(td, th) {
  font-variant-numeric: tabular-nums;
}
.table-wrap,
.sheet-scroll {
  border-radius: 17px;
  scrollbar-width: thin;
  scrollbar-color: #abc8b5 #f1f7f3;
}
tbody tr {
  transition: background-color 0.18s;
}
.collaborator-card {
  min-width: 0;
  transition:
    transform 0.3s var(--aurora-ease),
    box-shadow 0.3s;
}
.collaborator-card > div:not(.avatar) {
  min-width: 0;
}
.collaborator-card strong {
  overflow-wrap: anywhere;
}
.assignment-count {
  flex-shrink: 0;
}
.custody-slot {
  border-radius: 20px;
  padding: 20px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.custody-slot.occupied {
  background: linear-gradient(130deg, #e9f5ede8, #ffffffe3);
  border-color: #a9cbb5;
}
.sheet-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sheet-toolbar {
  padding: 13px;
  background: #e9f3ec9c;
  border: 1px solid #ffffffd9;
  border-radius: 16px;
}
.sheet-table td:focus-within {
  box-shadow: inset 0 0 0 2px #438b65;
}
.auth {
  max-width: 1440px;
  margin: 24px auto;
  width: calc(100% - 48px);
  border-radius: 34px;
  min-height: calc(100dvh - 48px);
}
.auth-story {
  background:
    radial-gradient(ellipse at 10% 10%, #599f7c59, transparent 55%),
    radial-gradient(ellipse at 100% 100%, #a9b57e2e, transparent 55%),
    linear-gradient(145deg, #123f33, #286b55);
  padding: clamp(32px, 5vw, 72px);
}
.auth-story .outline,
.auth-story::after {
  display: none;
}
.auth-story h1 {
  font-weight: 550;
  letter-spacing: -2.3px;
  line-height: 1.06;
  font-size: clamp(38px, 4.5vw, 66px);
}
.auth-story .brand img.company-logo {
  max-width: 250px;
  border-radius: 24px;
  padding: 23px;
  background: #ffffffed;
}
.auth-form {
  padding: clamp(28px, 5vw, 70px);
  background: linear-gradient(145deg, #ffffffdc, #f3f9f2a3);
}
.auth-form form {
  max-width: 390px;
}
.auth-form h2 {
  font-size: 36px;
  letter-spacing: -1.2px;
  font-weight: 600;
}
.auth-form .field {
  margin: 22px 0;
}
.auth-form .field input {
  min-height: 49px;
}
.auth-form .btn {
  min-height: 52px;
  margin-top: 14px;
}
.auth-art {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  color: #d9ecdf;
  font-size: 11px;
}
.auth-art span {
  padding: 8px 12px;
  background: #ffffff0f;
  border: 1px solid #ffffff36;
  border-radius: 99px;
}
#modal {
  background: linear-gradient(145deg, #fffffff5, #f1f8f2f5);
  border-radius: 27px;
  border: 1px solid #fff;
  box-shadow: 0 30px 100px #153d393b;
}
#modal[open],
#quick-dialog[open] {
  animation: aurora-dialog 0.32s var(--aurora-ease) both;
}
dialog::backdrop {
  background: #16372f66;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dbe8e0;
  background: #ffffffa6;
  display: grid;
  place-items: center;
}
#toast {
  bottom: 25px;
  border-radius: 17px;
  background: #164c3ef2;
  box-shadow: 0 15px 38px #163b3029;
  padding: 15px 22px;
  max-width: calc(100vw - 32px);
  animation: aurora-dialog 0.28s var(--aurora-ease) both;
}
#quick-dialog {
  width: min(560px, calc(100vw - 32px));
  background: #f7fcf9f5;
  border-radius: 26px;
  overflow: hidden;
  padding: 0;
}
.quick-head {
  padding: 22px 24px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.quick-head h2 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.5px;
}
.quick-search {
  display: block;
  padding: 0 24px 15px;
}
.quick-search input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #c5dace;
  background: #fff;
  border-radius: 14px;
  color: var(--ink);
}
.quick-results {
  padding: 0 14px 12px;
  max-height: 45dvh;
  overflow: auto;
  display: grid;
  gap: 4px;
}
.quick-result {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 13px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #284e3c;
}
.quick-result:hover,
.quick-result:focus-visible {
  background: #e4f1e8;
  border-color: #c8dfce;
}
.quick-result > span:last-child {
  margin-left: auto;
  color: #638071;
}
.quick-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.quick-foot {
  border-top: 1px solid #dce9e1;
  padding: 13px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #567461;
  gap: 14px;
}
.motion-toggle {
  font-size: 11px;
  border: 0;
  background: transparent;
  color: #285b43;
  min-height: 36px;
  padding: 5px;
}
#view[aria-busy="true"]::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 20;
  background: linear-gradient(
    90deg,
    transparent,
    #278464,
    #abd9ba,
    transparent
  );
  animation: aurora-progress 1.2s ease-in-out infinite;
  pointer-events: none;
}
.footer-note {
  margin-top: 30px;
  line-height: 1.6;
  gap: 16px;
}
@keyframes aurora-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes aurora-dialog {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes aurora-progress {
  from {
    transform: translateX(-70%);
  }
  to {
    transform: translateX(70%);
  }
}
@media (hover: hover) and (pointer: fine) {
  .nav button:hover:not(.active) {
    transform: translateX(3px);
  }
  .action-stat:hover,
  .report-card:hover,
  .office-card:hover,
  .personal-asset:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 46px #21493618;
  }
  .report-card,
  .office-card,
  .personal-asset {
    transition:
      transform 0.35s var(--aurora-ease),
      box-shadow 0.35s;
  }
}
@media (min-width: 1500px) {
  .main {
    max-width: 1550px;
    width: 100%;
    margin-inline: auto;
    padding-inline: 44px;
  }
  .stats {
    gap: 22px;
  }
}
@media (max-width: 1100px) {
  .top-meta > span:last-child {
    display: none;
  }
  .quick-open kbd {
    display: none;
  }
  .shell {
    gap: 10px;
  }
  .main {
    padding-inline: 22px;
  }
  .aurora-sculpture {
    display: none;
  }
}
@media (max-width: 750px) {
  .shell {
    display: block;
  }
  .sidebar {
    margin: 8px;
    top: 8px;
    height: auto;
    border-radius: 20px;
    padding: 8px;
    background: #eff8f2ed;
    backdrop-filter: blur(12px);
  }
  .nav button {
    min-height: 44px;
    padding: 10px 12px;
  }
  .nav button.active::after {
    display: none;
  }
  .main {
    padding: 0 16px 24px;
  }
  .topbar {
    padding: 10px 0;
    min-height: 57px;
    gap: 10px;
  }
  .top-meta {
    gap: 6px;
  }
  .top-meta .pill {
    display: none;
  }
  .quick-open {
    font-size: 11px;
    padding: 8px 10px;
    min-height: 38px;
  }
  .quick-open kbd {
    display: none;
  }
  .workspace-name {
    font-size: 12px;
  }
  .heading {
    margin: 23px 0;
  }
  .heading h1 {
    font-size: 32px;
    letter-spacing: -1.2px;
  }
  .heading p {
    font-size: 12px;
  }
  .heading .actions {
    flex-wrap: wrap;
  }
  .aurora-banner {
    padding: 23px;
    border-radius: 23px;
    gap: 16px;
    align-items: flex-start;
    flex-direction: column;
  }
  .aurora-banner h2 {
    font-size: 25px;
  }
  .aurora-banner p {
    font-size: 11px;
  }
  .aurora-banner .btn {
    min-height: 42px;
  }
  .stats {
    gap: 11px;
  }
  .stat {
    padding: 17px;
    min-height: 149px;
    border-radius: 21px;
  }
  .stat .number,
  .stat.featured .number {
    font-size: clamp(20px, 5.5vw, 25px);
    letter-spacing: -0.8px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .stat label,
  .stat .caption {
    font-size: 10px;
  }
  .panel-head {
    padding: 20px 19px 15px;
    flex-wrap: wrap;
  }
  .office-row {
    padding: 17px 19px;
    gap: 10px;
  }
  .office-row .value {
    font-size: 12px;
  }
  .category-list {
    padding-inline: 19px;
  }
  .panel,
  .personal-asset {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(145deg, #fbfefb, #f1f8f4);
  }
  .auth {
    width: calc(100% - 16px);
    margin: 8px;
    min-height: calc(100dvh - 16px);
    border-radius: 26px;
  }
  .auth-story {
    padding: 28px 25px;
  }
  .auth-story .brand img.company-logo {
    max-width: 210px;
    padding: 17px;
    border-radius: 22px;
  }
  .auth-story h1 {
    font-size: 37px;
    letter-spacing: -1.6px;
    margin-top: 15px;
  }
  .auth-form {
    padding: 29px 25px;
  }
  .auth-form h2 {
    font-size: 31px;
  }
  .auth-art {
    margin-top: 18px;
    font-size: 10px;
    gap: 7px;
  }
  .auth-art span {
    padding: 6px 9px;
  }
  .quick-head,
  .quick-foot {
    padding-inline: 19px;
  }
  .quick-search {
    padding-inline: 19px;
  }
  .quick-foot > span {
    display: none;
  }
  .sheet-filters input {
    min-width: 0;
    flex-basis: 100%;
  }
  .sheet-view-settings .actions > * {
    max-width: 100%;
  }
  .custody-summary {
    flex-wrap: wrap;
  }
  .collaborator-card {
    padding: 18px;
  }
  .footer-note {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .stat,
  .panel,
  .report-card,
  .office-card,
  .personal-asset,
  #quick-dialog {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #f8fcf9;
  }
  .stat.featured {
    background: #184e3c;
  }
}
@supports not (backdrop-filter: blur(1px)) {
  .sidebar,
  .panel,
  .stat,
  .report-card,
  .personal-asset,
  .office-card {
    background: #f7fcf9;
  }
  .stat.featured {
    background: #184e3c;
  }
}
@media (forced-colors: active) {
  .aurora-banner,
  .stat.featured {
    background: Canvas;
    color: CanvasText;
  }
  .aurora-banner p,
  .aurora-banner .eyebrow,
  .stat.featured .number,
  .stat.featured label,
  .stat.featured .caption {
    color: CanvasText;
  }
  .aurora-sculpture {
    display: none;
  }
}
/* Keep hover feedback still when motion is disabled. */
html[data-motion="off"]
  :is(
    .btn,
    .nav button,
    .action-stat,
    .report-card,
    .office-card,
    .personal-asset,
    .collaborator-card
  ):hover,
html[data-motion="off"] .btn:active,
html[data-motion="off"] .action-stat:hover .card-arrow {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  :is(
    .nav button,
    .action-stat,
    .report-card,
    .office-card,
    .personal-asset,
    .collaborator-card
  ):hover,
  .btn:active,
  .action-stat:hover .card-arrow {
    transform: none;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .aurora-sculpture {
    animation: aurora-float 6s ease-in-out 3;
  }
}
@keyframes aurora-float {
  0%,
  100% {
    transform: translateY(0) rotate(-18deg);
  }
  50% {
    transform: translateY(-8px) rotate(-13deg);
  }
}
