:root {
  --yellow: #ffc400;
  --yellow-soft: #fff1c2;
  --amber: #ff9f0a;
  --orange: #f26b00;
  --orange-deep: #c24e00;
  --bg: #fffaee;
  --surface: #ffffff;
  --ink: #241b0d;
  --muted: #6f6451;
  --line: #f0e4c8;
  --line-strong: #dccfae;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(36, 27, 13, 0.05), 0 12px 32px rgba(194, 78, 0, 0.07);
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

i[data-lucide] {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

svg.lucide {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.muted {
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 8px;
}

.brand-name {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand-name::after {
  content: "";
  display: block;
  width: 38px;
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.shell {
  display: grid;
  grid-template-columns: 276px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  height: 100vh;
  padding: 32px 20px 24px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.sidebar .brand-name {
  align-self: flex-start;
  padding: 0 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--yellow-soft);
  color: var(--ink);
}

.nav-link.active {
  background: var(--yellow-soft);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--orange);
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.me {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.me-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.me-text strong,
.me-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-text small {
  color: var(--muted);
}

.content {
  width: 100%;
  max-width: 1120px;
  padding: 56px clamp(20px, 5vw, 64px) 72px;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}

.eyebrow {
  color: var(--orange-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.lead {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.avatar {
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--yellow-soft);
}

.avatar.sm {
  width: 40px;
  height: 40px;
}

.avatar.lg {
  width: 68px;
  height: 68px;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--yellow), var(--amber));
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}

.avatar-fallback.lg {
  font-size: 1.7rem;
}

.button,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  font: 700 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.button {
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--yellow), var(--amber) 60%, var(--orange));
  box-shadow: 0 6px 18px rgba(242, 107, 0, 0.25);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(242, 107, 0, 0.32);
}

.ghost {
  padding: 11px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  justify-content: flex-start;
}

.ghost:hover {
  background: var(--yellow-soft);
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.2rem;
}

.card-link {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--yellow-soft), #ffe2b0);
  border-color: transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(194, 78, 0, 0.16);
}

.card-link .muted {
  margin-top: 6px;
  color: #6a5328;
}

.identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.identity-text strong {
  font-family: var(--display);
  font-size: 1.25rem;
}

.badge {
  align-self: flex-start;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--yellow-soft);
  color: var(--orange-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.access-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.access-list li {
  display: flex;
  gap: 12px;
}

.access-list li > i,
.access-list li > svg {
  margin-top: 3px;
  color: var(--orange);
}

.access-list li div {
  display: flex;
  flex-direction: column;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 500;
}

.role-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--yellow-soft);
  color: var(--ink);
  font-weight: 500;
}

.role-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.role-head h2 {
  font-size: 1.2rem;
}

.perms {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.perm:hover {
  border-color: var(--amber);
  background: #fffdf6;
}

.perm input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--orange);
  flex: none;
}

.perm input:disabled + .perm-text {
  opacity: 0.55;
}

.perm-text {
  display: flex;
  flex-direction: column;
}

.perm-text small {
  color: var(--muted);
  font-size: 0.88rem;
}

.role-card .button {
  align-self: flex-start;
}

.login {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 56px clamp(28px, 6vw, 80px);
  background: linear-gradient(135deg, var(--yellow) 0%, var(--amber) 55%, var(--orange) 100%);
  color: var(--ink);
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.login-hero::before {
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
}

.login-hero::after {
  right: 80px;
  bottom: -160px;
  width: 300px;
  height: 300px;
}

.login-hero .brand-name {
  align-self: flex-start;
}

.login-hero .brand-name::after {
  background: var(--ink);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.hero-copy p {
  max-width: 44ch;
  font-size: 1.15rem;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 2rem;
}

.message {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.message-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.message-card h1 {
  font-size: 2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-foot {
    margin-top: 0;
  }

  .login {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
