:root {
  color: #17332f;
  background: #f5f7f5;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #e5f0e9 0, transparent 34rem), #f5f7f5; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; background: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.topbar { height: 74px; padding: 0 max(1.25rem, env(safe-area-inset-right)) 0 max(1.25rem, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dce4df; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); }
.brand { color: inherit; text-decoration: none; display: inline-flex; gap: .7rem; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: #123b35; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { color: #60736f; font-size: .72rem; margin-top: .1rem; }
.session-controls { display: flex; gap: .75rem; align-items: center; }
.secure-indicator { color: #2d6857; font-size: .82rem; font-weight: 700; }
.secure-indicator span { color: #2c9a68; margin-right: .25rem; }

main { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
.signed-out-panel { min-height: calc(100vh - 74px); display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: 4rem 0; }
.eyebrow { color: #2d6857; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; }
h1 { margin: .35rem 0 1rem; font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.045em; max-width: 760px; }
.welcome-copy > p:not(.eyebrow, .privacy-note) { max-width: 620px; font-size: 1.15rem; line-height: 1.65; color: #536864; }
.privacy-note { max-width: 560px; color: #667773; font-size: .82rem; margin-top: 1.25rem; }
.security-card { background: #123b35; color: white; border-radius: 26px; padding: 2rem; box-shadow: 0 24px 70px rgba(28, 61, 54, .16); }
.security-card h2 { margin: 1rem 0; font-size: 1.5rem; }
.security-card ul { padding-left: 1.25rem; margin: 0; line-height: 2; color: #d6e7df; }
.shield { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #dff3e8; color: #196342; font-weight: 900; }

.button { min-height: 42px; padding: .7rem 1rem; border: 0; border-radius: 11px; cursor: pointer; font-weight: 750; }
.button:focus-visible, [role="tab"]:focus-visible { outline: 3px solid #78bca6; outline-offset: 3px; }
.button:disabled { cursor: wait; opacity: .55; }
.button-primary { color: white; background: #17674e; box-shadow: 0 8px 20px rgba(23, 103, 78, .18); }
.button-secondary { color: #164c3f; background: #e3f0e9; }
.button-quiet { color: #38534e; background: transparent; }

.workspace { padding: 3.25rem 0 5rem; }
.workspace-nav { display: flex; gap: .4rem; width: fit-content; padding: .35rem; margin-bottom: 2.5rem; border: 1px solid #dce4df; border-radius: 14px; background: rgba(255,255,255,.75); }
.workspace-nav-item { min-width: 90px; border: 0; border-radius: 10px; padding: .7rem 1rem; color: #586c67; background: transparent; cursor: pointer; font-weight: 800; }
.workspace-nav-item[aria-current="page"] { color: white; background: #123b35; box-shadow: 0 4px 12px rgba(18,59,53,.16); }
.workspace-nav-item:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #78bca6; outline-offset: 3px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.workspace-heading h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
.section-intro { max-width: 650px; margin: -.25rem 0 .25rem; color: #62736f; line-height: 1.55; }
.tabs { display: flex; gap: .35rem; padding: .35rem; margin: 1.5rem 0 1rem; width: fit-content; background: #e8eeea; border-radius: 14px; }
[role="tab"] { border: 0; border-radius: 10px; padding: .7rem 1rem; color: #586c67; background: transparent; cursor: pointer; font-weight: 750; }
[role="tab"][aria-selected="true"] { color: #173d34; background: white; box-shadow: 0 2px 8px rgba(31, 64, 56, .08); }
.status-message { min-height: 1.25rem; color: #62736f; font-size: .86rem; }
.status-message.error { color: #a02f2f; }
.task-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 1rem; }
.task-card { display: flex; flex-direction: column; min-height: 230px; padding: 1.25rem; border: 1px solid #dce4df; border-top: 4px solid #8ca69d; border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(40, 66, 59, .06); }
.task-card[data-priority="urgent"] { border-top-color: #c74b46; }
.task-card[data-priority="soon"] { border-top-color: #d39537; }
.task-card-top { display: flex; justify-content: space-between; gap: .75rem; color: #6b7b77; font-size: .75rem; }
.priority { text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.task-card[data-priority="urgent"] .priority { color: #a53632; }
.task-card h2 { margin: 1.25rem 0 .6rem; font-size: 1.25rem; line-height: 1.25; }
.metadata { color: #647571; font-size: .86rem; line-height: 1.55; }
.task-action { margin-top: auto; align-self: flex-start; }

.team-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 1rem; margin: 1.25rem 0 2.25rem; }
.team-summary > div { display: flex; flex-direction: column; padding: 1rem 1.15rem; border: 1px solid #dce4df; border-radius: 16px; background: white; }
.team-summary strong { font-size: 1.75rem; line-height: 1; color: #164c3f; }
.team-summary span { margin-top: .45rem; color: #687975; font-size: .78rem; font-weight: 700; }
.admin-panel { margin: 2rem 0 3rem; padding: 1.4rem; border: 1px solid #cfe0d7; border-radius: 22px; background: #edf5f0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.section-heading h2 { margin: .2rem 0 .75rem; font-size: 1.65rem; }
.admin-forms { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 1rem; }
.management-card { display: grid; align-content: start; gap: .85rem; padding: 1.25rem; border: 1px solid #d7e5dd; border-radius: 17px; background: white; }
.management-card h3 { margin: 0; font-size: 1.15rem; }
.management-card > p { margin: -.35rem 0 .25rem; color: #687975; font-size: .8rem; line-height: 1.45; }
.management-card label { display: grid; gap: .35rem; color: #49615c; font-size: .78rem; font-weight: 800; }
.management-card input, .management-card select, .membership-form input, .membership-form select { min-height: 44px; width: 100%; padding: .65rem .75rem; border: 1px solid #cbd8d2; border-radius: 10px; color: #17332f; background: white; }
.management-card .button { justify-self: start; margin-top: .2rem; }
.directory-section { margin-top: 2.75rem; }
.directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.directory-card { display: flex; flex-direction: column; min-height: 220px; padding: 1.15rem; border: 1px solid #dce4df; border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(40,66,59,.05); }
.directory-card[data-inactive="true"] { opacity: .68; background: #f0f2f1; }
.directory-card-top { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-pill, .account-pill { display: inline-flex; width: fit-content; padding: .3rem .5rem; border-radius: 999px; color: #24614f; background: #e2f0e9; font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.account-pill { color: #596b67; background: #edf0ef; }
.directory-name { margin: 1rem 0 .35rem; font-size: 1.22rem; }
.directory-meta, .directory-detail { margin: .15rem 0; color: #62736f; font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.directory-action { align-self: flex-start; margin-top: auto; padding-left: 0; color: #2c6253; }
.member-list { display: grid; gap: .5rem; margin: .7rem 0 1rem; padding: 0; list-style: none; }
.member-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .65rem .75rem; border-radius: 10px; background: #f2f6f3; }
.member-name, .member-priority { display: block; }
.member-name { font-size: .82rem; }
.member-priority { margin-top: .2rem; color: #6b7b77; font-size: .7rem; }
.remove-member { min-height: 34px; padding: .35rem; color: #8e3939; font-size: .75rem; }
.empty-members, .empty-state { color: #71817d; font-size: .82rem; }
.membership-form { display: grid; grid-template-columns: minmax(0, 1fr) 78px auto; gap: .45rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid #e2e8e4; }
.membership-form .button { white-space: nowrap; }

.privacy-shield { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.5rem; text-align: center; color: white; background: #123b35; }
.privacy-shield > div { display: grid; justify-items: center; }
.privacy-shield h2 { font-size: 2rem; margin-bottom: .25rem; }
.privacy-shield p { color: #c9ddd6; margin-bottom: 1.5rem; }

@media (max-width: 760px) {
  .signed-out-panel { grid-template-columns: 1fr; padding: 3rem 0; }
  .security-card { display: none; }
  .secure-indicator, #hide-screen { display: none; }
  .button-quiet { padding-inline: .5rem; }
  .tabs { width: 100%; overflow-x: auto; }
  [role="tab"] { flex: 1; }
  .workspace { padding-top: 1.5rem; }
  .workspace-nav { width: 100%; margin-bottom: 1.75rem; }
  .workspace-nav-item { flex: 1; }
  .workspace-heading { align-items: start; }
  .admin-forms { grid-template-columns: 1fr; }
  .membership-form { grid-template-columns: 1fr 90px; }
  .membership-form .button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
