/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Manrope","arguments":[{"subsets":["latin","cyrillic"],"variable":"--font-sans","display":"swap"}],"variableName":"manrope"} ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/438aa629764e75f3-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/875ae681bfde4580-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/51251f8b9793cdb3-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/e857b654a2caa584-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/cc978ac5ee68c2b6-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Manrope_14cd0a';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/4c9affa5bc8f420e-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Manrope_Fallback_14cd0a';src: local("Arial");ascent-override: 103.31%;descent-override: 29.07%;line-gap-override: 0.00%;size-adjust: 103.19%
}.__className_14cd0a {font-family: '__Manrope_14cd0a', '__Manrope_Fallback_14cd0a';font-style: normal
}.__variable_14cd0a {--font-sans: '__Manrope_14cd0a', '__Manrope_Fallback_14cd0a'
}

/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Literata","arguments":[{"subsets":["latin","cyrillic"],"variable":"--font-display","display":"swap"}],"variableName":"literata"} ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/8140c3f5465d3dcb-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/c65239c6cd09dd6e-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/689d5aae6896c892-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/2404f3d7e0bb4cd0-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/b39c22a0b74cc818-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/47ae032d3fb504fe-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Literata_e009d6';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/_next/static/media/bf0b6634f251496a-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Literata_Fallback_e009d6';src: local("Times New Roman");ascent-override: 99.62%;descent-override: 26.07%;line-gap-override: 0.00%;size-adjust: 118.15%
}.__className_e009d6 {font-family: '__Literata_e009d6', '__Literata_Fallback_e009d6';font-style: normal
}.__variable_e009d6 {--font-display: '__Literata_e009d6', '__Literata_Fallback_e009d6'
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #eef3f6;
  --bg-soft: #f7fafb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --ink: #12212b;
  --ink-soft: #3d5160;
  --muted: #6a7f8f;
  --line: rgba(18, 33, 43, 0.1);
  --line-strong: rgba(18, 33, 43, 0.16);
  --brand: #0b3d4a;
  --brand-deep: #072f39;
  --accent: #0e8a8a;
  --accent-2: #147a8a;
  --accent-soft: rgba(14, 138, 138, 0.12);
  --danger: #c23b2e;
  --danger-soft: rgba(194, 59, 46, 0.1);
  --warn: #b86a14;
  --warn-soft: rgba(184, 106, 20, 0.12);
  --ok: #1f7a4d;
  --ok-soft: rgba(31, 122, 77, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(7, 47, 57, 0.08);
  --sidebar-w: 268px;
  --bottom-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: var(--font-sans), "Manrope", sans-serif;
  --font-display: var(--font-display), "Literata", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 0% -10%, rgba(14, 138, 138, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(11, 61, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #e7eef2 0%, var(--bg) 42%, #e9f0f3 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ——— Shell ——— */

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

.sidebar {
  display: none;
  background:
    linear-gradient(165deg, var(--brand-deep) 0%, var(--brand) 55%, #0f5460 100%);
  color: #e6f2f4;
  padding: 1.5rem 1.1rem 1.25rem;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 55%;
  background: radial-gradient(circle, rgba(14, 138, 138, 0.35), transparent 65%);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  animation: fade-up 0.5s var(--ease) both;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.62;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1;
  position: relative;
  z-index: 1;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-sm);
  color: rgba(230, 242, 244, 0.72);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-list a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 #5ed1c7;
}

.nav-ico {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  flex-shrink: 0;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-user {
  font-size: 0.84rem;
  line-height: 1.35;
}

.sidebar-user span {
  display: block;
  opacity: 0.6;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.main {
  min-width: 0;
  padding: 1rem 1rem calc(var(--bottom-h) + 1.15rem);
  animation: fade-up 0.45s var(--ease) both;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.user-chip {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
}

.user-chip strong {
  display: block;
  color: var(--ink-soft);
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottom-h);
  background: rgba(7, 47, 57, 0.94);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: rgba(230, 242, 244, 0.55);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.35rem;
  transition: color 0.2s var(--ease);
}

.bottom-nav a.active {
  color: #fff;
}

.bottom-nav .nav-ico {
  width: 20px;
  height: 20px;
}

/* ——— Surfaces ——— */

.panel {
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.panel.interactive {
  box-shadow: var(--shadow);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.task-row {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    background 0.2s var(--ease);
  animation: fade-up 0.4s var(--ease) both;
}

.task-row:nth-child(1) { animation-delay: 0.02s; }
.task-row:nth-child(2) { animation-delay: 0.05s; }
.task-row:nth-child(3) { animation-delay: 0.08s; }
.task-row:nth-child(4) { animation-delay: 0.11s; }
.task-row:nth-child(5) { animation-delay: 0.14s; }

.task-row:hover {
  border-color: rgba(14, 138, 138, 0.45);
  transform: translateY(-2px);
  background: var(--surface-solid);
}

.task-row .title {
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.badge.overdue {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
}

.empty-state strong {
  display: block;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

/* ——— Controls ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.62rem 1.05rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    opacity 0.18s var(--ease);
}

.btn:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.secondary:hover {
  background: #fff;
  border-color: rgba(14, 138, 138, 0.35);
}

.btn.danger {
  background: var(--danger);
}

.btn.ghost {
  background: transparent;
  color: #d7ecee;
  border-color: rgba(255, 255, 255, 0.22);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(14, 138, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 138, 138, 0.15);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.9rem;
  gap: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-soft);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.check-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.detail-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.detail-grid {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.detail-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.detail-grid dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
  color: var(--ink);
}

.prose-block p {
  margin: 0.3rem 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.criteria-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.criteria-list li {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(14, 138, 138, 0.05);
  border: 1px solid rgba(14, 138, 138, 0.1);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.25rem;
  margin-bottom: 0.25rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.tabs a {
  flex: 0 0 auto;
}

.tabs button {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 0.48rem 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.tabs button.active {
  background: var(--brand);
  color: #fff;
}

/* ——— Login ——— */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(14, 138, 138, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 80%, rgba(11, 61, 74, 0.45), transparent 50%),
    linear-gradient(150deg, #06262f 0%, #0b3d4a 42%, #0e666c 100%);
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 2rem 1.65rem 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 24px 60px rgba(2, 20, 26, 0.35);
  animation: fade-up 0.55s var(--ease) both;
}

.login-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.35rem;
}

.login-brand .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand-deep), var(--accent));
  border: none;
  color: #fff;
}

.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
  line-height: 1.2;
}

.login-card .sub {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(14, 138, 138, 0.22), transparent 55%),
    linear-gradient(150deg, #06262f 0%, #0b3d4a 50%, #0e666c 100%);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.loading-screen::after {
  content: "";
  width: 28px;
  height: 28px;
  margin-top: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #7ee0d6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  margin-top: 3.5rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 860px) {
  .app-shell {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .sidebar {
    display: flex;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .bottom-nav {
    display: none;
  }

  .main {
    padding: 1.75rem 2rem 2.25rem;
    width: 100%;
    max-width: min(100%, 1520px);
  }

  .topbar h1 {
    font-size: 1.75rem;
  }

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

  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.9rem;
    gap: 0.9rem;
  }

  .form-grid .span-2 {
    grid-column: 1 / -1;
  }

  .authority-form-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
  }

  .authority-arrow {
    display: grid;
  }
}

/* ——— Authority matrix ——— */

.authority-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.authority-intro {
  margin: 0;
  max-width: 52rem;
}

.authority-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1.15rem;
  gap: 1.15rem;
}

@media (min-width: 860px) {
  .authority-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
    align-items: start;
  }
}

.authority-main {
  min-width: 0;
}

.authority-side {
  min-width: 0;
}

.authority-side-hint {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.authority-metrics .section-label {
  margin-bottom: 0.75rem;
}

.authority-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

.authority-metric {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.18s var(--ease),
    transform 0.18s var(--ease),
    background 0.18s var(--ease);
}

.authority-metric:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 138, 138, 0.35);
}

.authority-metric.danger {
  background: var(--danger-soft);
  border-color: rgba(194, 59, 46, 0.22);
}

.authority-metric.warn {
  background: var(--warn-soft);
  border-color: rgba(184, 106, 20, 0.22);
}

.authority-metric-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.authority-metric-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.authority-metric.danger .authority-metric-value {
  color: var(--danger);
}

.authority-metric.warn .authority-metric-value {
  color: var(--warn);
}

.authority-stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.authority-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.authority-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.authority-stat-head strong {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.text-danger {
  color: var(--danger) !important;
}

.authority-stat-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(18, 33, 43, 0.08);
  overflow: hidden;
}

.authority-stat-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transition: width 0.45s var(--ease);
}

.authority-stat-fill.tone-muted {
  background: #8aa0ad;
}

.authority-stat-fill.tone-accent {
  background: var(--accent);
}

.authority-stat-fill.tone-brand {
  background: var(--brand);
}

.authority-stat-fill.tone-warn {
  background: var(--warn);
}

.authority-stat-fill.tone-ok {
  background: var(--ok);
}

.authority-stat-fill.tone-danger {
  background: var(--danger);
}

.authority-structure-empty {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.authority-structure-empty .muted {
  margin: 0;
  font-size: 0.86rem;
}

.authority-structure-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.authority-structure {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.authority-structure-node {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.authority-structure-assigner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.authority-structure-assigner strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.authority-structure-branch {
  display: flex;
  padding-left: 0.55rem;
}

.authority-structure-stem {
  width: 2px;
  height: 0.55rem;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.7;
}

.authority-structure-assignees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-left: 2px solid rgba(14, 138, 138, 0.35);
  padding-left: 0.75rem;
  margin-left: 0.45rem;
}

.authority-structure-assignees li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.hint {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(14, 138, 138, 0.22);
  color: var(--brand-deep);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ok-msg {
  margin: 0;
  color: var(--ok);
  font-size: 0.9rem;
}

.authority-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.authority-arrow {
  display: none;
  place-items: center;
  padding-bottom: 0.85rem;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1;
}

.authority-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.authority-rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.authority-rule-pair {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1;
}

.authority-person {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.authority-person strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.authority-role-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.authority-arrow-inline {
  color: var(--accent);
  font-weight: 650;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ——— New task: form + compact side + full-width legend ——— */

.task-new-page {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.task-new-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1.15rem;
  gap: 1.15rem;
}

@media (min-width: 860px) {
  .task-new-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 360px);
    align-items: start;
    gap: 1.25rem;
  }
}

/* ——— Shared page + side column (lists, goals, meetings) ——— */

.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1.15rem;
  gap: 1.15rem;
}

@media (min-width: 860px) {
  .page-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 380px);
    align-items: start;
  }
}

.page-main {
  min-width: 0;
}

.page-side {
  min-width: 0;
}

@media (min-width: 860px) {
  .page-side {
    position: -webkit-sticky;
    position: sticky;
    top: 1.25rem;
  }
}

.page-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.page-side-list a,
.page-side-list span {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.88rem;
  color: var(--ink);
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.page-side-list a:hover {
  border-color: rgba(14, 138, 138, 0.4);
  background: var(--surface-solid);
}

.page-side-list button.side-filter {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  color: var(--ink);
  transition:
    border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.page-side-list button.side-filter:hover,
.page-side-list button.side-filter.active {
  border-color: rgba(14, 138, 138, 0.4);
  background: var(--accent-soft);
}

.task-new-main {
  min-width: 0;
}

.task-new-side {
  min-width: 0;
  gap: 0.85rem;
}

.task-new-assignees .page-side-list {
  max-height: 11.5rem;
  overflow: auto;
}

.task-help {
  padding: 0;
  overflow: hidden;
}

.task-help-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.task-help-summary::-webkit-details-marker {
  display: none;
}

.task-help-summary-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.task-help-summary-title::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
  margin-top: -0.15rem;
}

.task-help[open] .task-help-summary-title::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.task-help-summary-hint {
  font-size: 0.8rem;
  line-height: 1.35;
}

.task-help-body {
  padding: 0.75rem 0.9rem 0.95rem;
  gap: 0.75rem;
}

.task-help-lead {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.task-help-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  counter-reset: help-step;
}

.task-help-steps li {
  counter-increment: help-step;
  position: relative;
  padding: 0.5rem 0.65rem 0.5rem 2.35rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.task-help-steps li::before {
  content: counter(help-step);
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--brand-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(14, 138, 138, 0.35);
}

.task-help-steps li strong {
  color: var(--ink);
  font-weight: 650;
}

.task-help-req {
  color: var(--danger);
  font-weight: 700;
}

/* Full-width bottom legend: tips + horizontal status example */
.task-new-legend {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.1rem 1.2rem 1.25rem;
  background:
    linear-gradient(
      165deg,
      rgba(14, 138, 138, 0.07) 0%,
      var(--surface-solid) 42%,
      var(--surface-solid) 100%
    );
  border: 1px solid rgba(14, 138, 138, 0.18);
}

.task-new-legend-tips .section-label,
.task-new-legend-flow .section-label {
  margin-bottom: 0.7rem;
  color: var(--brand-deep);
}

.task-new-tips-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

@media (min-width: 700px) {
  .task-new-tips-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.task-new-tip-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(14, 138, 138, 0.2);
}

.task-new-tip-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.task-new-tip-text {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}

.task-flow-band {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .task-flow-band {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }
}

.task-flow-band-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 1 1;
  min-width: 0;
  padding-right: 0.75rem;
}

@media (min-width: 700px) {
  .task-flow-band-item {
    padding-right: 1.1rem;
  }

  .task-flow-band-item:not(:last-child) {
    padding-right: 1.35rem;
  }
}

.task-flow-band-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  margin-bottom: 0.15rem;
}

.task-flow-band-index {
  font-size: 0.85rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--brand-deep);
  line-height: 1;
}

.task-flow-band-connector {
  display: none;
}

@media (min-width: 700px) {
  .task-flow-band-connector {
    display: block;
    position: absolute;
    left: 2.1rem;
    right: 0.35rem;
    top: 1.05rem;
    height: 2px;
    background: linear-gradient(
      90deg,
      var(--accent) 0%,
      rgba(14, 138, 138, 0.28) 100%
    );
    border-radius: 2px;
    opacity: 0.9;
    pointer-events: none;
  }
}

.task-flow-band-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.task-flow-band-caption {
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 11.5rem;
}

/* Desktop: compact sticky side; help always open */
@media (min-width: 860px) {
  .task-new-side {
    position: -webkit-sticky;
    position: sticky;
    top: 1.25rem;
  }

  .task-help {
    border: 1px solid var(--line);
  }

  .task-help-summary {
    cursor: default;
    pointer-events: none;
    padding: 0.75rem 0.9rem;
  }

  .task-help-summary-title::after {
    display: none;
  }

  .task-help-summary-hint {
    display: none;
  }

  /* Keep panel expanded on desktop even if user toggled on a narrow viewport */
  .task-help:not([open]) > .task-help-body {
    display: flex !important;
  }
}

/* ——— R1+ additions ——— */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--brand);
  background: var(--accent-soft);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.notif-bell:hover {
  transform: translateY(-1px);
  background: rgba(14, 138, 138, 0.2);
}

.notif-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #e8f6f7;
}

.callout {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
}

.callout.warn {
  background: var(--warn-soft);
  border-color: rgba(184, 106, 20, 0.25);
}

.callout.danger {
  background: var(--danger-soft);
  border-color: rgba(194, 59, 46, 0.25);
}

.file-list,
.postpone-list,
.comment-list,
.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.file-list li,
.postpone-list li,
.comment-list li,
.notif-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.notif-list li.unread {
  border-color: rgba(14, 138, 138, 0.35);
  background: rgba(14, 138, 138, 0.06);
}

.notif-body p,
.comment-list p,
.postpone-list p {
  margin: 0.25rem 0 0;
}

.muted.tight {
  margin: 0.25rem 0 0;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1 1;
  min-width: 160px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.empty-state {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.empty-state h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-deep);
}

.empty-state p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.done-text {
  text-decoration: line-through;
  color: var(--muted);
}

.file-btn {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
}

.comment-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.comment-meta strong {
  color: var(--ink);
}

.ai-box {
  border: 1px solid rgba(14, 138, 138, 0.25);
  background: linear-gradient(180deg, rgba(14, 138, 138, 0.08), transparent);
  border-radius: var(--radius);
  padding: 1rem;
}

.agenda {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
}

