﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--app-font-family);
}

:root {
  --app-font-family: "Yekan Bakh", Tahoma, Arial, sans-serif;
}

html[data-font-family="shabnam"],
body[data-font-family="shabnam"] {
  --app-font-family: "Shabnam", Tahoma, Arial, sans-serif;
}

html[data-font-family="shabnam"],
body[data-font-family="shabnam"] {
  font-family: "Shabnam", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="yekan"],
body[data-font-family="yekan"] {
  font-family: "Yekan Bakh", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="shabnam"] :where(body, div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em),
body[data-font-family="shabnam"] :where(div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  font-family: "Shabnam", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="yekan"] :where(body, div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em),
body[data-font-family="yekan"] :where(div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  font-family: "Yekan Bakh", Tahoma, Arial, sans-serif !important;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-Thin.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-Regular.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/fonts/yekan/YekanBakhNoEn-ExtraBold.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam-Bold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src: url("/fonts/shabnam/Shabnam-Bold.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

html[data-font-family="vazir"],
body[data-font-family="vazir"] {
  --app-font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}

html[data-font-family="vazir"],
body[data-font-family="vazir"] {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="iransans"],
body[data-font-family="iransans"] {
  --app-font-family: "IRANSansXFaNum", Tahoma, Arial, sans-serif;
}

html[data-font-family="iransans"],
body[data-font-family="iransans"] {
  font-family: "IRANSansXFaNum", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="iransans2"],
body[data-font-family="iransans2"] {
  --app-font-family: "IRANSansDN", Tahoma, Arial, sans-serif;
}

html[data-font-family="iransans2"],
body[data-font-family="iransans2"] {
  font-family: "IRANSansDN", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="vazir"] :where(body, div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em),
body[data-font-family="vazir"] :where(div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="iransans"] :where(body, div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em),
body[data-font-family="iransans"] :where(div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  font-family: "IRANSansXFaNum", Tahoma, Arial, sans-serif !important;
}

html[data-font-family="iransans2"] :where(body, div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em),
body[data-font-family="iransans2"] :where(div, span, p, a, button, input, select, textarea, label, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  font-family: "IRANSansDN", Tahoma, Arial, sans-serif !important;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazir/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-UltraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-demiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansXFaNum";
  src: url("/fonts/iransans/IRANSansXFaNum-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansDN";
  src: url("/fonts/iransans2/iransansdnlight.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansDN";
  src: url("/fonts/iransans2/iransansdn.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansDN";
  src: url("/fonts/iransans2/iransansdnbold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #6767ec;
  --primary-dark: #5353d6;
  --accent: #f6b73c;
  --coral: #ef6f6c;
  --night: #17242f;
  --night-soft: #203241;
  --ink: #24313d;
  --muted: #76818d;
  --line: #dde7ee;
  --surface: #ffffff;
  --soft: #f6f9fb;
  --danger: #d94f5c;
  --success-bg: #ececff;
  --success-text: #4b4bb6;
}

body {
  min-height: 100vh;
  background: #eef4f6;
  color: var(--ink);
  padding: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  background: none;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(103, 103, 236, 0.16), transparent 38%),
    linear-gradient(225deg, rgba(246, 183, 60, 0.18), transparent 42%),
    #eef4f6;
}

.auth-card {
  width: min(100%, 450px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(23, 36, 47, 0.18);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.auth-brand {
  padding: 32px 30px 22px;
  background:
    linear-gradient(120deg, rgba(246, 183, 60, 0.28), transparent 44%),
    linear-gradient(135deg, var(--night), var(--primary-dark));
  color: #fff;
}

.auth-brand-logo {
  width: 82px;
  height: 82px;
  display: block;
  margin: 0 auto 16px;
  border-radius: 24px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.auth-brand-logo-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.auth-brand strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  text-align: center;
}

.auth-brand p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.9;
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f6f6f6;
  border-bottom: 1px solid #e3e3e3;
}

.auth-tab {
  padding: 13px;
  color: #666;
  border-bottom: 3px solid transparent;
}

.auth-tab.active {
  color: var(--primary-dark);
  background: #fff;
  border-bottom-color: var(--accent);
}

.auth-form {
  display: none;
  padding: 26px;
  background: #fff;
}

.auth-form.active {
  display: grid;
}

.auth-form .field + .field {
  margin-top: 12px;
}

.auth-text-btn {
  margin-top: 10px;
  justify-self: start;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.auth-message {
  margin-top: 2px;
}

.auth-message.error-message {
  background: #fff1f2;
  color: var(--danger);
  border-color: rgba(217, 79, 92, 0.2);
}

.dashboard-app {
  min-height: 100vh;
}

.auth-completion-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.auth-completion-card {
  width: min(100%, 460px);
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.auth-completion-card h2 {
  margin-top: 10px;
  color: #0f172a;
  font-size: 24px;
}

.auth-completion-card p {
  margin-top: 8px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.9;
}

.auth-completion-card form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

#dashboardPanel .pulse-timer-card {
  padding: 20px 18px 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.08), transparent 44%),
    linear-gradient(180deg, #ffffff, #fbfbff);
  box-shadow: 0 18px 38px rgba(91, 70, 232, 0.08);
}

#dashboardPanel .pulse-focus-card {
  --focus-ring-track: rgba(123, 97, 255, 0.16);
  --focus-ring-progress: #7c5cff;
  --focus-meta: #6754f1;
  --focus-pill-bg: #f5f2ff;
  --focus-pill-text: #7566f0;
  --focus-card-bg:
    radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.08), transparent 44%),
    linear-gradient(180deg, #ffffff, #fbfbff);
}

#dashboardPanel .pulse-focus-card.is-break {
  --focus-ring-track: rgba(34, 197, 94, 0.16);
  --focus-ring-progress: #22c55e;
  --focus-meta: #16a34a;
  --focus-pill-bg: #ecfdf5;
  --focus-pill-text: #15803d;
  --focus-card-bg:
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.08), transparent 44%),
    linear-gradient(180deg, #ffffff, #f7fffb);
}

#dashboardPanel .pulse-focus-card {
  background: var(--focus-card-bg);
}

.focus-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.focus-settings-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #5b46e8;
  background: rgba(91, 70, 232, 0.08);
  font-size: 18px;
}

.focus-settings-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(91, 70, 232, 0.12);
  border-radius: 16px;
  background: #f9f8ff;
}

.focus-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.focus-settings-note {
  color: #6f7687;
  font-size: 11px;
  line-height: 1.7;
}

.focus-settings-field {
  display: grid;
  gap: 6px;
}

.focus-settings-field span {
  color: #5b6475;
  font-size: 12px;
  font-weight: 800;
}

.focus-settings-field input,
.focus-settings-field select {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e3defa;
  border-radius: 12px;
  background: #fff;
  color: #18212f;
}

.focus-settings-save-btn {
  min-height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7257f7, #8b5cf6);
  color: #fff;
}

.focus-session-title-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.focus-session-chip {
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #ece9fb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.focus-session-chip-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #6d59ea;
  background: rgba(109, 89, 234, 0.08);
  font-size: 13px;
}

.focus-session-chip b {
  color: #2d3441;
  font-size: 14px;
  font-weight: 800;
}

.focus-ring-wrap {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 8px auto 6px;
}

.focus-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.focus-ring-track,
.focus-ring-progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.focus-ring-track {
  stroke: var(--focus-ring-track);
}

.focus-ring-progress {
  stroke: var(--focus-ring-progress);
  stroke-dasharray: 553;
  stroke-dashoffset: 553;
  transition: stroke-dashoffset 0.4s ease;
}

.focus-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 26px 22px;
  row-gap: 4px;
}

#dashboardPanel .pulse-focus-card .focus-ring-display {
  margin: 0;
  color: #202534;
  width: 100%;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1;
  direction: ltr;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  padding: 0;
  background: transparent;
  white-space: nowrap;
}

#dashboardPanel .pulse-focus-card .focus-ring-status {
  display: none;
}

#dashboardPanel .pulse-focus-card .focus-ring-meta {
  margin-top: 2px;
  color: var(--focus-meta);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.focus-break-pill {
  width: fit-content;
  margin: 6px auto 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--focus-pill-bg);
  color: var(--focus-pill-text);
  font-size: 12px;
  font-weight: 800;
}

#dashboardPanel .focus-goal-box {
  margin-bottom: 10px;
}

#dashboardPanel .focus-progress-line {
  margin-bottom: 12px;
}

#dashboardPanel .focus-actions {
  display: grid;
}

#dashboardPanel .focus-start-btn,
#dashboardPanel .focus-pause-btn,
#dashboardPanel .focus-stop-btn,
#dashboardPanel .focus-cancel-btn {
  min-height: 46px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
}

#dashboardPanel .focus-start-btn {
  background: linear-gradient(135deg, #7257f7, #8b5cf6);
}

#dashboardPanel .focus-stop-box {
  display: grid;
  gap: 10px;
}

#dashboardPanel .focus-stop-box select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid #ece8fb;
  background: #fff;
}

#dashboardPanel .focus-pause-btn {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e5e7eb;
}

#dashboardPanel .focus-stop-btn {
  background: linear-gradient(135deg, #ff6257, #ef4444);
}

#dashboardPanel .focus-test-btn {
  background: #ffffff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

#dashboardPanel .focus-cancel-btn {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

#dashboardPanel .focus-manual-time {
  margin-top: 12px;
}

.topbar {
  height: 64px;
  margin: 0;
  background: #f8fafc;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.topbar-right,
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #d5e4f7;
  background: #1a2b45;
  font-size: 18px;
  font-weight: 900;
}

.app-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.top-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  font-size: 19px;
}

.top-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

.account-menu,
.plan-status {
  color: #475569;
  font-size: 13px;
}

.plan-status {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  line-height: 1.7;
}

.buy-btn {
  padding: 8px 14px;
  background: var(--accent);
  color: #17242f;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(246, 183, 60, 0.26);
  font-size: 13px;
}

.logout-btn {
  padding: 8px 13px;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  font-size: 13px;
}

.logout-btn:hover {
  background: #e0e7ff;
}

.search-box {
  width: 320px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
}

.search-box span {
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  padding: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.search-box b {
  font-size: 22px;
  line-height: 1;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.workspace-top-module {
  margin: 0 18px 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body[data-header-layout="header2"] .topbar {
  height: 72px;
  padding-inline: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #15204a 0%, #1e2c63 46%, #24337a 100%);
  color: #f8fbff;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

body[data-header-layout="header2"] .topbar-right,
body[data-header-layout="header2"] .topbar-left {
  gap: 10px;
}

body[data-header-layout="header2"] .app-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-header-layout="header2"] .account-menu,
body[data-header-layout="header2"] .plan-status {
  color: rgba(248, 251, 255, 0.82);
}

body[data-header-layout="header2"] .plan-status {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-header-layout="header2"] .search-box {
  width: 280px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(12px);
}

body[data-header-layout="header2"] .search-box input {
  color: #ffffff;
}

body[data-header-layout="header2"] .search-box input::placeholder {
  color: rgba(248, 251, 255, 0.72);
}

body[data-header-layout="header2"] .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #18324d;
  border: 1px solid rgba(207, 224, 238, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

body[data-header-layout="header2"] #mobileMenuBtn,
body[data-ui-theme="light"] #mobileMenuBtn,
body[data-ui-theme="white"] #mobileMenuBtn {
  color: #18324d;
}

body[data-header-layout="header2"] .top-icon,
body[data-header-layout="header2"] .workspace-top-avatar,
body[data-header-layout="header2"] .avatar {
  box-shadow: 0 10px 24px rgba(8, 15, 40, 0.24);
}

body[data-header-layout="header2"] .workspace-top-module {
  margin: 12px 18px 12px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
  border: 1px solid rgba(199, 214, 227, 0.85);
  box-shadow: 0 18px 40px rgba(25, 39, 61, 0.08);
}

body[data-header-layout="header2"] .workspace-top-module-main h2 {
  color: #10243d;
  font-size: 18px;
}

body[data-header-layout="header2"] .workspace-top-module-main p {
  color: #60748a;
}

body[data-header-layout="header2"] .workspace-top-search {
  background: #ffffff;
  border-color: #d7e3ee;
  color: #5d7188;
}

body[data-header-layout="header2"] .workspace-top-create-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
}

body[data-header-layout="header2"] .workspace-top-notify-btn {
  background: linear-gradient(180deg, #ffffff, #f3f8fd);
  border-color: #d8e4ee;
}

body[data-header-layout="header2"] .workspace-top-profile-dropdown {
  border-color: #d8e4ee;
}

/* Notes page true EOF lock */
#notesPanel.page-panel {
  padding: 18px;
}

#notesPanel .notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .note-composer-body {
  grid-template-columns: minmax(0, 1fr) 340px;
}

#notesPanel .note-composer-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

#notesPanel .note-toolbar-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

#notesPanel .note-toolbar-group--select {
  flex: 0 0 170px;
}

#notesPanel .note-toolbar-group--spacer {
  margin-inline-start: auto;
  justify-content: flex-end;
}

#notesPanel .note-toolbar-divider {
  flex: 0 0 auto;
}

@media (max-width: 1260px) {
  #notesPanel .notes-shell,
  #notesPanel .note-composer-body {
    grid-template-columns: 1fr;
  }
}

#notesPanel .note-composer-toolbar {
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
}

#notesPanel .note-toolbar-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

#notesPanel .note-toolbar-group--select {
  flex: 1 1 180px;
  min-width: 180px;
}

#notesPanel .note-toolbar-group--spacer {
  flex: 1 1 100%;
  justify-content: flex-end;
  margin-inline-start: 0;
}

#notesPanel .note-toolbar-divider {
  flex: 0 0 auto;
}

/* Notes page EOF lock */
#notesPanel.page-panel {
  padding: 18px;
}

#notesPanel .notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .note-composer-body {
  grid-template-columns: minmax(0, 1fr) 340px;
}

@media (max-width: 1260px) {
  #notesPanel .notes-shell,
  #notesPanel .note-composer-body {
    grid-template-columns: 1fr;
  }
}

/* Notes page final lock */
#notesPanel.page-panel {
  padding: 18px;
}

#notesPanel .notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .notes-list-column,
#notesPanel .note-composer,
#notesPanel .notes-page-hero,
#notesPanel .notes-utility-bar {
  border-radius: 24px;
}

#notesPanel .notes-list-column {
  min-height: calc(100vh - 220px);
}

#notesPanel .notes-list-scroll {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

#notesPanel .note-composer-body {
  grid-template-columns: minmax(0, 1fr) 340px;
}

#notesPanel .note-composer-side {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

@media (max-width: 1260px) {
  #notesPanel .notes-shell,
  #notesPanel .note-composer-body {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-list-column {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  #notesPanel.page-panel {
    padding: 12px;
  }

  #notesPanel .notes-page-hero,
  #notesPanel .notes-utility-bar,
  #notesPanel .notes-list-column,
  #notesPanel .note-composer {
    border-radius: 20px;
  }
}

/* Notes page hard-final override v2 */
#notesPanel.page-panel {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

#notesPanel .notes-page-hero,
#notesPanel .notes-utility-bar,
#notesPanel .notes-list-column,
#notesPanel .note-composer {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(210, 221, 233, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(14px);
}

#notesPanel .notes-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 12px;
  border-radius: 24px;
}

#notesPanel .notes-page-hero-copy {
  display: grid;
  gap: 8px;
}

#notesPanel .notes-page-hero-copy span {
  color: #22c55e;
  font-size: 13px;
  font-weight: 800;
}

#notesPanel .notes-page-hero-copy h1 {
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}

#notesPanel .notes-page-hero-copy p {
  color: #6b7c93;
  max-width: 640px;
  line-height: 1.8;
}

#notesPanel .notes-page-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#notesPanel .notes-hero-btn,
#notesPanel .notes-utility-btn,
#notesPanel .notes-list-create-btn,
#notesPanel .notes-side-summary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#notesPanel .notes-hero-btn:hover,
#notesPanel .notes-utility-btn:hover,
#notesPanel .notes-list-create-btn:hover,
#notesPanel .notes-side-summary-btn:hover,
#notesPanel .notes-hero-icon-btn:hover,
#notesPanel .notes-utility-icon:hover {
  transform: translateY(-1px);
}

#notesPanel .notes-hero-btn--primary,
#notesPanel .notes-utility-btn--primary,
#notesPanel .notes-list-create-btn,
#notesPanel .notes-side-summary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #16c784 0%, #2fd07c 100%);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.22);
}

#notesPanel .notes-hero-btn--primary,
#notesPanel .notes-list-create-btn,
#notesPanel .notes-side-summary-btn {
  min-height: 46px;
  padding: 0 18px;
}

#notesPanel .notes-hero-icon-btn,
#notesPanel .notes-utility-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  border: 1px solid #dbe5ef;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: #172033;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#notesPanel .notes-hero-icon-btn svg,
#notesPanel .notes-utility-icon svg {
  width: 20px;
  height: 20px;
}

#notesPanel .notes-utility-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 24px;
}

#notesPanel .notes-utility-left,
#notesPanel .notes-utility-center,
#notesPanel .notes-utility-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#notesPanel .notes-utility-center {
  justify-content: center;
}

#notesPanel .notes-utility-right {
  justify-content: flex-end;
  color: #617186;
  text-align: right;
  white-space: nowrap;
}

#notesPanel .notes-utility-caption {
  font-size: 12px;
  color: #89a0b8;
}

#notesPanel .notes-utility-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f7fbff;
  border: 1px solid #e3ebf3;
}

#notesPanel .notes-utility-dots span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

#notesPanel .notes-utility-dots span:nth-child(1) {
  background: radial-gradient(circle at 35% 35%, #b39dfc, #8b5cf6);
}

#notesPanel .notes-utility-dots span:nth-child(2) {
  background: radial-gradient(circle at 35% 35%, #fdc9ad, #f97316);
}

#notesPanel .notes-utility-dots span:nth-child(3) {
  background: radial-gradient(circle at 35% 35%, #d5dfef, #94a3b8);
}

#notesPanel .notes-search-field,
#notesPanel .notes-sort-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#notesPanel .notes-search-field {
  width: min(100%, 420px);
}

#notesPanel .notes-search-field svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex: none;
}

#notesPanel .notes-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1e293b;
  font-size: 14px;
  outline: none;
}

#notesPanel .notes-sort-field select {
  min-width: 150px;
  border: 0;
  background: transparent;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

#notesPanel .notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .notes-list-column {
  min-width: 0;
  min-height: calc(100vh - 220px);
  border-radius: 24px;
  padding: 16px;
  direction: rtl;
  display: grid;
  gap: 14px;
}

#notesPanel .notes-list-shell {
  display: grid;
  gap: 14px;
  min-height: 0;
}

#notesPanel .notes-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#notesPanel .notes-list-head h2 {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

#notesPanel .notes-list-head p {
  color: #72849d;
}

#notesPanel .notes-list-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#notesPanel .notes-list-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #e2eaf2;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

#notesPanel .notes-list-stat span {
  color: #8191a8;
  font-size: 12px;
  font-weight: 700;
}

#notesPanel .notes-list-stat b {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

#notesPanel .notes-sidebar-filters {
  display: grid;
  gap: 10px;
}

#notesPanel .notes-sidebar-filter,
#notesPanel .notes-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #dfe8f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1f2937;
  text-align: right;
}

#notesPanel .notes-sidebar-filter.active,
#notesPanel .notes-chip.active {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(180deg, rgba(241, 255, 247, 0.95), rgba(229, 253, 238, 0.95));
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

#notesPanel .notes-sidebar-filter > span:not(.notes-chip-dot),
#notesPanel .notes-chip > span:not(.notes-chip-dot) {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

#notesPanel .notes-sidebar-filter b,
#notesPanel .notes-chip b {
  flex: none;
  font-size: 13px;
  font-weight: 900;
  color: #22c55e;
}

#notesPanel .notes-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

#notesPanel .notes-list-scroll {
  min-height: 0;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding-left: 4px;
}

#notesPanel .notes-grid--cards {
  display: grid;
  gap: 14px;
}

#notesPanel .note-card {
  border-radius: 22px;
  border: 1px solid rgba(225, 232, 241, 0.96);
  background: var(--note-fill, linear-gradient(180deg, #ffffff, #f8fbff));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  height: 280px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#notesPanel .note-card.is-selected {
  box-shadow: 0 18px 36px rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

#notesPanel .note-composer {
  min-width: 0;
  border-radius: 24px;
  padding: 18px;
  direction: rtl;
  display: grid;
  gap: 16px;
}

#notesPanel .notes-blank-surface {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #d7e3ee;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(243, 247, 252, 0.98));
}

#notesPanel .notes-blank-surface.is-hidden {
  display: none;
}

#notesPanel .notes-blank-surface-inner {
  max-width: 520px;
  text-align: center;
  display: grid;
  gap: 8px;
  padding: 18px;
}

#notesPanel .notes-blank-kicker {
  color: #22c55e;
  font-size: 13px;
  font-weight: 800;
}

#notesPanel .notes-blank-surface-inner h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

#notesPanel .notes-blank-surface-inner p {
  color: #64748b;
  line-height: 1.9;
}

#notesPanel .notes-composer-sheet {
  display: grid;
  gap: 16px;
}

#notesPanel .notes-composer-sheet.is-hidden {
  display: none;
}

#notesPanel .note-composer-header {
  padding-bottom: 16px;
  border-bottom: 1px solid #e6edf5;
}

#notesPanel .note-composer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

#notesPanel .note-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid #dbe5ef;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#notesPanel .note-icon-btn svg {
  width: 18px;
  height: 18px;
}

#notesPanel .note-composer-header-copy span {
  color: #22c55e;
  font-size: 13px;
  font-weight: 800;
}

#notesPanel .note-composer-header-copy strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

#notesPanel .note-composer-header-copy p {
  color: #6d7f95;
  max-width: 720px;
  font-size: 12px;
  line-height: 1.85;
}

#notesPanel .note-composer-meta-row {
  gap: 12px;
}

#notesPanel .note-composer-chip {
  min-height: 50px;
  border-color: #dbe5ef;
  border-radius: 18px;
}

#notesPanel .note-composer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
  direction: ltr;
}

#notesPanel .note-composer-main,
#notesPanel .note-composer-side {
  direction: rtl;
}

#notesPanel .note-composer-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
  min-height: 0;
}

#notesPanel .note-composer-title-wrapper {
  min-height: 92px;
  padding-inline: 20px;
  border-radius: 22px;
  border: 0;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

#notesPanel .note-composer-title-wrapper input {
  font-size: 20px;
  font-weight: 900;
}

#notesPanel .note-editor-content {
  min-height: 520px;
  border-radius: 22px;
}

#notesPanel .note-composer-toolbar {
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid #dfe8f1;
  background: linear-gradient(180deg, #ffffff, #fafcff);
  overflow-x: auto;
}

#notesPanel .note-toolbar-divider {
  flex: none;
  height: 26px;
}

#notesPanel .note-toolbar-hint {
  color: #70839b;
  white-space: nowrap;
}

#notesPanel .note-editor-footer {
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

#notesPanel .note-composer-side {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4ebf3;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

#notesPanel .notes-side-summary {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dff2e8;
  background: linear-gradient(180deg, #f2fff7, #eafaf1);
}

#notesPanel .notes-side-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#notesPanel .notes-side-summary-head span {
  display: block;
  color: #16a34a;
  font-size: 12px;
  font-weight: 800;
}

#notesPanel .notes-side-summary-head strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

#notesPanel .notes-side-summary-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1ecf7b, #22c55e);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.18);
}

#notesPanel .notes-side-summary-icon svg {
  width: 24px;
  height: 24px;
}

#notesPanel .notes-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#notesPanel .notes-summary-stat-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #dfe8f1;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

#notesPanel .notes-summary-stat-card b {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

#notesPanel .notes-summary-stat-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

#notesPanel .notes-chip-list {
  display: grid;
  gap: 10px;
}

#notesPanel .notes-chip-list .notes-chip {
  width: 100%;
}

#notesPanel .notes-chip-list .notes-sidebar-empty {
  padding: 14px;
  color: #7b8ca3;
  border: 1px dashed #d9e4ef;
  border-radius: 16px;
  background: #fbfdff;
}

#notesPanel .note-composer-section--summary {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

#notesPanel .note-composer-actions {
  justify-content: stretch;
}

#notesPanel .note-save-btn {
  width: 100%;
}

@media (max-width: 1260px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-list-column {
    min-height: 0;
  }

  #notesPanel .note-composer-body {
    grid-template-columns: 1fr;
  }

  #notesPanel .note-composer-side {
    padding: 0;
    border: 0;
    background: transparent;
  }
}

@media (max-width: 1024px) {
  #notesPanel .notes-page-hero,
  #notesPanel .notes-utility-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  #notesPanel .notes-utility-left,
  #notesPanel .notes-utility-center,
  #notesPanel .notes-utility-right {
    width: 100%;
  }

  #notesPanel .notes-utility-center {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  #notesPanel .notes-search-field {
    width: 100%;
  }

  #notesPanel .note-composer-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  #notesPanel.page-panel {
    padding: 12px;
  }

  #notesPanel .notes-page-hero,
  #notesPanel .notes-utility-bar,
  #notesPanel .notes-list-column,
  #notesPanel .note-composer {
    border-radius: 20px;
  }

  #notesPanel .notes-page-hero {
    padding: 18px;
  }

  #notesPanel .notes-page-hero-copy h1 {
    font-size: 22px;
  }

  #notesPanel .notes-utility-bar {
    padding: 12px;
  }

  #notesPanel .notes-utility-dots {
    display: none;
  }

  #notesPanel .note-composer {
    padding: 14px;
  }

  #notesPanel .note-composer-body {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #notesPanel .note-composer-main {
    gap: 10px !important;
  }

  #notesPanel .note-composer-header {
    align-items: start;
    flex-direction: column;
  }

  #notesPanel .note-composer-header-copy strong {
    font-size: 20px;
  }

  #notesPanel .note-composer-meta-row {
    flex-direction: column;
  }

  #notesPanel .note-composer-chip,
  #notesPanel .note-composer-chip--color {
    width: 100%;
    flex: 1 1 auto;
  }

  #notesPanel .notes-list-stats,
  #notesPanel .notes-summary-stats {
    grid-template-columns: 1fr;
  }

  #notesPanel .note-composer-side {
    display: none !important;
  }

  #notesPanel .note-editor-content {
    min-height: 180px;
    height: clamp(180px, 24vh, 250px);
    max-height: clamp(180px, 24vh, 250px);
    resize: none;
  }

  #notesPanel .note-editor-frame-shell {
    max-height: clamp(180px, 30vh, 260px);
  }

  #notesPanel .note-toolbar-divider,
  #notesPanel .note-toolbar-hint {
    display: none;
  }
}

/* Notes page hard-final override */
#notesPanel.page-panel {
  padding: 20px 18px 18px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

#notesPanel.page-panel .page-title {
  margin-bottom: 14px;
}

#notesPanel .notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .notes-list-column {
  order: 1;
  direction: rtl;
  min-width: 0;
  min-height: calc(100vh - 170px);
  border: 1px solid #dfe7f0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#notesPanel .notes-list-column .notes-grid,
#notesPanel .notes-grid--cards {
  grid-template-columns: 1fr !important;
}

#notesPanel .note-composer {
  order: 2;
  direction: rtl;
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid #dfe7f0;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(31, 175, 104, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

#notesPanel .note-composer-header {
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e7edf4;
}

#notesPanel .note-composer-header-copy strong {
  font-size: 18px;
  font-weight: 800;
}

#notesPanel .note-composer-meta-row {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 2px;
}

#notesPanel .note-composer-chip {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 50px;
  border-color: #e5eaf1;
  background: #fff;
  box-shadow: none;
}

#notesPanel .note-composer-chip--color {
  flex: 1 1 280px;
}

#notesPanel .note-composer-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  direction: ltr;
}

#notesPanel .note-composer-main,
#notesPanel .note-composer-side {
  direction: rtl;
}

#notesPanel .note-composer-main {
  display: grid;
  gap: 14px;
}

#notesPanel .note-composer-side {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
}

#notesPanel .note-composer-section {
  border-color: #e5eaf1;
  background: #fff;
}

#notesPanel .note-composer-main input {
  min-height: 64px;
  font-size: 16px;
  font-weight: 700;
}

#notesPanel .note-editor-content {
  min-height: 560px;
  font-size: 14px;
}

#notesPanel .note-composer-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
}

#notesPanel .note-toolbar-divider {
  flex: none;
}

#notesPanel .note-toolbar-hint {
  white-space: nowrap;
}

#notesPanel .note-editor-footer {
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

#notesPanel .notes-shell .note-composer-side .note-save-btn {
  width: 100%;
}

@media (max-width: 1200px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-list-column,
  #notesPanel .note-composer {
    order: initial;
  }
}

@media (max-width: 1024px) {
  #notesPanel .note-composer-body {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  #notesPanel .note-composer-side {
    padding: 0;
    border: 0;
    background: transparent;
  }

  #notesPanel .note-composer-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  #notesPanel.page-panel {
    padding: 12px;
  }

  #notesPanel .note-composer {
    padding: 14px;
  }

  #notesPanel .note-composer-header {
    align-items: start;
    flex-direction: column;
  }

  #notesPanel .note-composer-header-copy strong {
    font-size: 18px;
  }

  #notesPanel .note-composer-meta-row {
    flex-direction: column;
  }

  #notesPanel .note-composer-chip,
  #notesPanel .note-composer-chip--color {
    flex: 1 1 auto;
    width: 100%;
  }

  #notesPanel .note-composer-main input {
    min-height: 52px;
    font-size: 15px;
  }

  #notesPanel .note-editor-content {
    min-height: 240px;
  }

  #notesPanel .note-toolbar-divider,
  #notesPanel .note-toolbar-hint {
    display: none;
  }
}

/* Notes page final layout override */
.page-panel#notesPanel {
  padding: 24px 20px 20px;
  background: linear-gradient(135deg, #f0f5fb 0%, #f8fafd 50%, #eff4fb 100%);
}

.page-panel#notesPanel .page-title {
  margin-bottom: 20px;
}

.notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  direction: ltr;
}

.notes-shell .notes-list-column {
  order: 1;
  direction: rtl;
  min-width: 0;
}

.notes-shell .note-composer {
  order: 2;
  direction: rtl;
  min-width: 0;
}

.notes-list-column {
  display: grid;
  gap: 12px;
  padding: 16px;
  min-height: calc(100vh - 170px);
  border: 1px solid #e0e8f1;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.notes-list-column:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.02);
}

.notes-list-head h2 {
  font-size: 20px;
  font-weight: 900;
  color: #0f1729;
  letter-spacing: -0.3px;
}

.notes-list-head p {
  color: #6b809d;
  font-size: 13px;
  font-weight: 500;
}

.notes-list-column .notes-grid,
.notes-grid--cards {
  grid-template-columns: 1fr !important;
}

.note-composer {
  padding: 20px;
  border: 1px solid #dfe7f0;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(31, 175, 104, 0.05), transparent 30%),
    linear-gradient(180deg, #ffffff, #fafbfd);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  transition: all 0.3s ease;
}

.note-composer:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.02);
}

.note-composer-header {
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e7edf4;
}

.note-composer-header-copy span {
  color: #1faf68;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.note-composer-header-copy strong {
  font-size: 26px;
  font-weight: 900;
  color: #0f1729;
  letter-spacing: -0.5px;
}

.note-composer-meta-row {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 2px;
}

.note-composer-chip {
  min-width: 0;
  flex: 1 1 220px;
  min-height: 48px;
  border-color: #e5eaf1;
  background: #fff;
  box-shadow: none;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.note-composer-chip:focus-within {
  border-color: #1faf68;
  box-shadow: 0 0 0 3px rgba(31, 175, 104, 0.1);
}

.note-composer-chip--color {
  flex: 1 1 280px;
}

.note-composer-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  direction: ltr;
}

.note-composer-main,
.note-composer-side {
  direction: rtl;
}

.note-composer-main {
  display: grid;
  gap: 14px;
}

.note-composer-side {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 4px 12px rgba(25, 39, 61, 0.02);
}

.note-composer-section {
  border-color: #e5eaf1;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  transition: all 0.2s ease;
}

.note-composer-section:hover {
  border-color: rgba(31, 175, 104, 0.2);
  background: #fbfcfe;
}

.note-composer-main input {
  min-height: 60px;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid #e5eaf1;
  border-radius: 12px;
  padding: 12px 16px;
  color: #0f1729;
  transition: all 0.2s ease;
}

.note-composer-main input::placeholder {
  color: #93a3b9;
  font-weight: 500;
}

.note-composer-main input:focus {
  border-color: #1faf68;
  box-shadow: 0 0 0 3px rgba(31, 175, 104, 0.1);
  outline: none;
}

.note-editor-content {
  min-height: 560px;
  font-size: 15px;
  border: 1px solid #e5eaf1;
  border-radius: 12px;
  padding: 16px;
  color: #1b2737;
  line-height: 1.7;
  transition: all 0.2s ease;
}

.note-editor-content:focus {
  border-color: #1faf68;
  box-shadow: 0 0 0 3px rgba(31, 175, 104, 0.1);
  outline: none;
}

.note-composer-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  padding: 8px 0;
}

.note-toolbar-btn {
  transition: all 0.2s ease;
}

.note-toolbar-btn:hover {
  background: #f0f5fb;
  border-color: rgba(31, 175, 104, 0.3);
}

.note-toolbar-btn:active {
  transform: scale(0.95);
}

.note-toolbar-divider {
  flex: none;
  height: 20px;
  margin: 0 2px;
  background: #e5eaf1;
}

.note-toolbar-hint {
  white-space: nowrap;
  color: #6b809d;
  font-size: 12px;
}

.note-editor-footer {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #e5eaf1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes-shell .note-composer-side .note-composer-section {
  min-width: 0;
}

.notes-shell .note-composer-side .note-composer-actions {
  justify-content: stretch;
}

.notes-shell .note-composer-side .note-save-btn {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.notes-shell .note-composer-side .note-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.notes-shell .note-composer-side .note-save-btn:active {
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .notes-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .notes-shell .notes-list-column,
  .notes-shell .note-composer {
    order: initial;
  }
}

@media (max-width: 1024px) {
  .page-panel#notesPanel {
    padding: 20px 16px 16px;
  }

  .notes-shell {
    gap: 16px;
  }

  .note-composer-body {
    grid-template-columns: 1fr;
    direction: rtl;
    gap: 14px;
  }

  .note-composer-side {
    padding: 14px;
    border: 1px solid #e5eaf1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
    border-radius: 20px;
  }

  .note-composer-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .page-panel#notesPanel {
    padding: 16px 12px 12px;
  }

  .note-composer {
    padding: 16px;
  }

  .note-composer-header {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .note-composer-header-copy strong {
    font-size: 20px;
  }

  .note-composer-meta-row {
    flex-direction: column;
    gap: 10px;
  }

  .note-composer-chip,
  .note-composer-chip--color {
    flex: 1 1 auto;
    width: 100%;
  }

  .note-composer-main input {
    min-height: 48px;
    font-size: 16px;
  }

  .note-editor-content {
    min-height: 300px;
    font-size: 15px;
  }

  .note-toolbar-divider,
  .note-toolbar-hint {
    display: none;
  }

  .notes-list-head h2 {
    font-size: 18px;
  }

  .note-card {
    padding: 14px;
  }
}

.notes-sidebar-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e6edf6;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 2px 6px rgba(25, 39, 61, 0.02);
  transition: all 0.2s ease;
}

.notes-sidebar-card:hover {
  border-color: rgba(31, 175, 104, 0.15);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
}

.notes-sidebar-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notes-sidebar-card-head span {
  color: #0f1729;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.notes-sidebar-card-head small {
  color: #1faf68;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.notes-sidebar-filters,
.notes-chip-list {
  display: grid;
  gap: 8px;
}

.notes-sidebar-filter,
.notes-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid #dbe6f0;
  border-radius: 18px;
  background: #fff;
  color: #0f1729;
  text-align: right;
  direction: rtl;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.notes-sidebar-filter > span:not(.notes-chip-dot),
.notes-chip > span:not(.notes-chip-dot) {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.notes-sidebar-filter b,
.notes-chip b {
  color: #22c55e;
  font-size: 12px;
  font-weight: 900;
  min-width: 14px;
  text-align: left;
}

.notes-sidebar-filter.active,
.notes-chip.active,
.notes-sidebar-filter:hover,
.notes-chip:hover {
  border-color: rgba(31, 175, 104, 0.26);
  background: #fbfdff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.notes-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  display: block;
}

#notesPanel .notes-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  display: block;
}

.notes-sidebar-empty {
  color: #7f8fa6;
  font-size: 13px;
  line-height: 1.9;
}

.notes-main {
  min-width: 0;
  display: grid;
  gap: 12px;
  order: 1;
  direction: rtl;
}

.notes-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e4ebf3;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(25, 39, 61, 0.05);
}

.notes-topbar-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 28%;
}

.notes-topbar-copy strong {
  display: block;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.notes-topbar-copy span {
  display: block;
  margin-top: 2px;
  color: #6b809d;
  font-size: 12px;
}

.notes-topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.notes-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 28%;
  justify-content: flex-end;
}

.notes-avatar-stack {
  display: flex;
  align-items: center;
}

.notes-avatar-stack span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-inline-start: -9px;
  background:
    linear-gradient(135deg, rgba(31, 175, 104, 0.92), rgba(45, 207, 141, 0.92));
  box-shadow: 0 6px 14px rgba(25, 39, 61, 0.12);
}

.notes-avatar-stack span:first-child {
  margin-inline-start: 0;
  background: linear-gradient(135deg, #e8eef8, #bfd2ea);
}

.notes-avatar-stack span:nth-child(2) {
  background: linear-gradient(135deg, #f8d7c3, #f4a27a);
}

.notes-avatar-stack span:nth-child(3) {
  background: linear-gradient(135deg, #c7d2fe, #8b5cf6);
}

.notes-topbar-bell {
  width: 42px;
  height: 42px;
  border: 1px solid #e5ecf5;
  border-radius: 14px;
  background: #fff;
  color: #152033;
  cursor: pointer;
  font-size: 18px;
}

.notes-topbar-new {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #1cc98e, #18ae75);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(28, 201, 142, 0.24);
}

.notes-search {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid #e5ecf5;
  border-radius: 16px;
  background: #fff;
  color: #7d8ca1;
}

.notes-search svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.notes-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #111827;
  font: inherit;
}

.notes-search input::placeholder {
  color: #93a3b9;
}

.notes-sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e5ecf5;
  border-radius: 16px;
  background: #fff;
  color: #111827;
}

.notes-sort span {
  font-size: 13px;
  font-weight: 700;
}

.notes-sort select {
  border: 0;
  outline: none;
  background: transparent;
  color: #111827;
  font: inherit;
}

.notes-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
  align-items: start;
}

.notes-list-column {
  min-width: 0;
  direction: rtl;
}

.notes-list-column {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4ebf3;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 28px rgba(25, 39, 61, 0.05);
  min-height: calc(100vh - 190px);
  overflow: hidden;
}

.notes-list-shell {
  min-width: 0;
  overflow: hidden;
}

.notes-list-column > * {
  min-width: 0;
}

.notes-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.notes-list-head h2 {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.notes-list-head p {
  margin-top: 4px;
  color: #6b809d;
  font-size: 12px;
}

.notes-grid {
  display: grid;
  gap: 10px;
}

.notes-grid--cards {
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: stretch;
  width: 100%;
  min-width: 0;
}

.notes-board {
  margin-bottom: 0;
}

#notesPanel .note-composer > .notes-board {
  margin-top: 0;
}

#notesPanel .notes-board .notes-list-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe7f0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
}

#notesPanel .notes-board .notes-list-scroll {
  overflow: visible;
}

#notesPanel .notes-board .notes-grid--cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.note-card {
  position: relative;
  padding: 28px 28px 22px;
  border: 1px solid rgba(225, 233, 243, 0.95);
  border-left: 0;
  border-radius: 36px;
  background:
    radial-gradient(circle at 18px 18px, rgba(15, 23, 42, 0.02) 0 2px, transparent 2px) 0 0 / 18px 18px,
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  height: 280px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  cursor: default;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.note-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), transparent 42%);
  pointer-events: none;
}

.note-card:hover,
.note-card.is-selected {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.1);
  border-color: rgba(199, 216, 232, 0.98);
}

.note-card.note-mint {
  --note-accent: #6767ec;
  --note-fill: linear-gradient(180deg, #f8f8ff 0%, #eef0ff 100%);
}

.note-card.note-amber {
  --note-accent: #f59e0b;
  --note-fill: linear-gradient(180deg, #fffcf0 0%, #fef9e7 100%);
}

.note-card.note-rose {
  --note-accent: #fb7185;
  --note-fill: linear-gradient(180deg, #fffbfb 0%, #ffe4e8 100%);
}

.note-card.note-sky {
  --note-accent: #38bdf8;
  --note-fill: linear-gradient(180deg, #fbfdff 0%, #ecf7fe 100%);
}

.note-card.note-violet {
  --note-accent: #8b5cf6;
  --note-fill: linear-gradient(180deg, #fefbff 0%, #f3e8ff 100%);
}

.note-card.note-paper {
  --note-accent: #6b7280;
  --note-fill: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.note-card-head {
  position: relative;
  z-index: 1;
  direction: ltr;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.note-card-head strong {
  color: #0f1729;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.6px;
}

.note-card-title {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-meta-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.note-card-meta-icon svg {
  width: 100%;
  height: 100%;
}

.note-card-edit-icon {
  justify-self: end;
  align-self: center;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 16px;
  background: #ffffff;
  color: #10b3b4;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

.note-card-edit-icon svg {
  width: 22px;
  height: 22px;
}

.note-card-body-trigger {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 18px;
}

.note-card-body-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  color: #7a8699;
}

.note-card-body-metric span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
}

.note-card-body-metric b {
  color: #0f1729;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
}

.note-card-body-lines {
  display: grid;
  gap: 20px;
  padding: 10px 0 4px;
}

.note-card-body-lines span {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 223, 231, 0.92), rgba(216, 223, 231, 0.3));
}

.note-card-summary {
  margin: 0;
  color: #748094;
  font-size: 14px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-body-trigger:hover .note-card-summary {
  color: #1f2937;
}

.note-card-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(231, 236, 242, 0.95);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.note-card-meta-pill {
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  padding: 12px 18px 12px 18px;
  border: 1px solid rgba(183, 221, 226, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  text-align: right;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.note-card-meta-pill span {
  color: #7a8797;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.note-card-meta-pill strong {
  min-width: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-meta-pill::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(195, 214, 224, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.58);
  transform: translateY(-50%);
  flex: none;
}

.note-card-meta-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(170, 210, 220, 0.98);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
  filter: saturate(1.03);
}

.notes-composer-sheet.is-hidden {
  display: none;
}

.workspace-top-module-main h2 {
  margin: 0;
  color: #111c31;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.workspace-top-module-main p {
  margin: 4px 0 0;
  color: #6b7d95;
  font-size: 12px;
}

.workspace-top-invite-summary {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #0f766e;
  font-size: 12px;
  font-weight: 600;
}

.workspace-top-module-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-top-switcher {
  min-width: 180px;
  height: 42px;
  display: flex;
  align-items: center;
}

.workspace-top-switcher select {
  width: 100%;
  height: 100%;
  border: 1px solid #d6dfeb;
  border-radius: 12px;
  background: #ffffff;
  color: #000000;
  padding: 0 14px;
  font: inherit;
  font-weight: 300;
}

.sidebar-workspace-switcher {
  display: none;
  padding: 10px 10px 14px;
}

.sidebar-workspace-switcher-label {
  display: block;
  margin-bottom: 8px;
  color: #000000;
  font-size: 11px;
  font-weight: 300;
}

.sidebar-workspace-switcher select {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.3);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}

.workspace-top-search-wrap {
  position: relative;
  width: min(560px, 45vw);
  flex: 0 1 auto;
}

.workspace-top-search {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #d9e3ef;
  border-radius: 10px;
  background: transparent;
  color: #5f7088;
}

.workspace-top-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #000000;
  outline: none;
}

.workspace-top-search input::placeholder {
  color: #000000;
  font-weight: 300;
  opacity: 1;
}

.workspace-top-search-icon {
  flex: 0 0 auto;
  color: #65748a;
  font-size: 22px;
  line-height: 1;
}

.workspace-top-search-results {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline: 0;
  z-index: 40;
  display: grid;
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #d9e3ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.workspace-top-search-group {
  display: grid;
  gap: 8px;
}

.workspace-top-search-group-title {
  color: #5f7088;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.workspace-top-search-result {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7fafc;
  color: #0f172a;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.workspace-top-search-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workspace-top-search-result:hover,
.workspace-top-search-result:focus-visible {
  background: #eef4ff;
  border-color: #c9d8ff;
  transform: translateY(-1px);
  outline: none;
}

.workspace-top-search-result strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.workspace-top-search-result small {
  color: #65748a;
  font-size: 12px;
  line-height: 1.6;
}

.workspace-top-search-result-meta {
  color: #4b5563;
  font-size: 11px;
  font-weight: 700;
}

.workspace-top-search-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.workspace-top-search-kind-project {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.workspace-top-search-kind-task {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.workspace-top-search-kind-contact {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.workspace-top-search-empty,
.workspace-top-search-loading {
  padding: 14px 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.workspace-top-create-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6767ec;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.workspace-top-notify-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e1ec;
  background: #ffffff;
  color: #24344f;
  font-size: 17px;
}

.workspace-top-notify-icon {
  line-height: 1;
}

.workspace-top-notify-badge {
  position: absolute;
  top: -6px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #fff;
}

.workspace-top-notify-menu {
  position: relative;
  flex: 0 0 auto;
}

.workspace-top-notify-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid #d9e3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 10px;
  z-index: 50;
}

.workspace-top-notify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-top-notify-header strong {
  color: #1e2a3f;
  font-size: 14px;
  font-weight: 800;
}

.workspace-top-notify-mark-read {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f4ea2;
  font-size: 12px;
  font-weight: 700;
}

.workspace-top-notify-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.workspace-top-notify-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e4ebf5;
  background: #f9fbff;
  display: grid;
  gap: 4px;
  text-align: right;
  color: #1f2d43;
}

.workspace-top-notify-item.is-unread {
  border-color: #cddbf8;
  background: #eef4ff;
}

.workspace-top-notify-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workspace-top-notify-item-title {
  color: #101828;
  font-size: 13px;
  font-weight: 800;
}

.workspace-top-notify-item-time {
  color: #6c7a92;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-top-notify-item-body {
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
}

.workspace-top-notify-empty,
.workspace-top-notify-loading {
  padding: 14px 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.workspace-top-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6767ec, #8b5cf6);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex: 0 0 auto;
}

.workspace-top-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.workspace-top-profile-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.workspace-top-profile-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 148px;
  padding: 6px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 40;
}

.workspace-top-profile-menu:hover .workspace-top-profile-dropdown,
.workspace-top-profile-menu:focus-within .workspace-top-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.workspace-top-profile-dropdown a,
.workspace-top-profile-dropdown button {
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  font-size: 13px;
  color: #25334a;
  background: transparent;
}

.workspace-top-profile-dropdown a:hover,
.workspace-top-profile-dropdown button:hover {
  background: #f2f6fc;
}

/* ============================================================
   Add-Time page — modern SaaS redesign
   Design tokens (scoped to the panel for easy theming)
   ============================================================ */
.add-time-panel {
  --at-primary: #6767ec;
  --at-primary-dark: #5353d6;
  --at-green: #10b07a;
  --at-green-dark: #0e9268;
  --at-ink: #16243c;
  --at-muted: #6b809d;
  --at-line: #e4ebf3;
  --at-soft: #f4f7fb;
  --at-radius: 18px;
  --at-shadow-sm: 0 1px 2px rgba(18, 43, 82, 0.04), 0 6px 16px rgba(18, 43, 82, 0.06);
  --at-shadow-md: 0 2px 6px rgba(18, 43, 82, 0.05), 0 18px 40px rgba(18, 43, 82, 0.09);
  --at-ring: 0 0 0 4px rgba(103, 103, 236, 0.16);

  display: none;
  padding: 26px;
}

.add-time-panel.active {
  display: block;
}

/* ---------- Header ---------- */
.add-time-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.add-time-header-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--at-primary), #8b5cf6);
  box-shadow: 0 10px 22px rgba(103, 103, 236, 0.32);
}

.add-time-header-icon svg {
  width: 26px;
  height: 26px;
}

.add-time-header h1 {
  color: var(--at-ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
}

.add-time-header p {
  margin-top: 6px;
  color: var(--at-muted);
  font-size: 14px;
}

/* ---------- Hero timer card ---------- */
.add-time-hero-card {
  margin-top: 24px;
  border: 1px solid var(--at-line);
  border-radius: 24px;
  background:
    radial-gradient(120% 100% at 50% -10%, rgba(18, 176, 122, 0.09), transparent 56%),
    linear-gradient(180deg, #fcfffd 0%, #f8fffc 100%);
  box-shadow: var(--at-shadow-md);
  overflow: hidden;
}

.add-time-hero-wrapper {
  position: relative;
  min-height: 238px;
  padding: 30px 28px 26px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(260px, 1.2fr) minmax(140px, 1fr);
  align-items: center;
  gap: 18px;
}

.add-time-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.add-time-hero-visual {
  position: relative;
  min-height: 170px;
  border-radius: 22px;
  overflow: hidden;
}

.add-time-hero-visual--left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-time-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--at-soft);
  border: 1px solid var(--at-line);
  color: var(--at-muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.add-time-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--at-green);
  box-shadow: 0 0 0 0 rgba(16, 176, 122, 0.5);
  animation: addTimePulse 2s infinite;
}

@keyframes addTimePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 176, 122, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(16, 176, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 176, 122, 0); }
}

.add-time-clock {
  font-size: clamp(46px, 5vw, 60px);
  font-weight: 800;
  color: var(--at-ink);
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.add-time-divider {
  height: 1px;
  background: var(--at-line);
  width: 100%;
}

.add-time-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.add-time-timer-stop-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.add-time-hero-visual--left::before,
.add-time-hero-visual--left::after {
  content: "";
  position: absolute;
  inset: 24px auto auto 22px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(16, 176, 122, 0.16), rgba(16, 176, 122, 0.03) 60%, transparent 72%);
  filter: blur(1px);
}

.add-time-hero-visual--left::after {
  inset: auto 18px 18px auto;
  width: 92px;
  height: 92px;
  opacity: 0.65;
}

.add-time-hero-leaf {
  position: absolute;
  background: linear-gradient(135deg, rgba(16, 176, 122, 0.22), rgba(16, 176, 122, 0.06));
  border-radius: 100% 0 100% 0;
  transform-origin: center;
  filter: blur(0.2px);
  animation: leaf-float 4s ease-in-out infinite;
}

.add-time-hero-leaf--one {
  width: 58px;
  height: 132px;
  inset-inline-start: 22px;
  inset-block-start: 20px;
  transform: rotate(27deg);
  animation-delay: 0s;
}

.add-time-hero-leaf--two {
  width: 52px;
  height: 118px;
  inset-inline-start: 64px;
  inset-block-start: 40px;
  transform: rotate(44deg);
  opacity: 0.85;
  animation-delay: 0.6s;
}

.add-time-hero-leaf--three {
  width: 72px;
  height: 150px;
  inset-inline-start: 102px;
  inset-block-start: 68px;
  transform: rotate(62deg);
  opacity: 0.7;
  animation-delay: 1.2s;
}

@keyframes leaf-float {
  0%, 100% {
    transform: rotate(var(--rotate)) translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: rotate(var(--rotate)) translateY(-8px);
    opacity: 0.8;
  }
}

.add-time-hero-visual--right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-time-hero-spark {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(16, 176, 122, 0.12), rgba(16, 176, 122, 0.02));
  transform: rotate(35deg);
  animation: spark-twinkle 3s ease-in-out infinite;
}

.add-time-hero-spark--one {
  width: 18px;
  height: 8px;
  inset-inline-end: 36px;
  inset-block-start: 40px;
  opacity: 0.75;
  animation-delay: 0s;
}

.add-time-hero-spark--two {
  width: 14px;
  height: 6px;
  inset-inline-end: 78px;
  inset-block-start: 56px;
  opacity: 0.56;
  animation-delay: 0.8s;
}

.add-time-hero-spark--three {
  width: 24px;
  height: 10px;
  inset-inline-end: 58px;
  inset-block-end: 34px;
  opacity: 0.48;
  animation-delay: 1.6s;
}

@keyframes spark-twinkle {
  0%, 100% {
    opacity: 0.4;
    transform: rotate(35deg) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: rotate(35deg) scale(1.1);
  }
}

.add-time-hero-clock-illustration {
  position: relative;
  width: 118px;
  height: 148px;
  display: block;
}

.add-time-hero-clock-top {
  position: absolute;
  top: 4px;
  inset-inline-start: 45px;
  width: 28px;
  height: 18px;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, #b9efd0, #7ed8ab);
  box-shadow: 0 6px 10px rgba(16, 176, 122, 0.18);
}

.add-time-hero-clock-body {
  position: absolute;
  inset: 18px 0 0;
  border-radius: 50%/48%;
  border: 6px solid #89ddb0;
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 176, 122, 0.08), transparent 54%),
    #fff;
  box-shadow: 0 18px 28px rgba(16, 176, 122, 0.14);
}

.add-time-hero-clock-handle,
.add-time-hero-clock-arm {
  position: absolute;
  inset-inline-start: 50%;
  top: 56px;
  width: 4px;
  border-radius: 999px;
  background: #59c88d;
  transform-origin: bottom center;
}

.add-time-hero-clock-handle {
  height: 28px;
  transform: translateX(-50%) rotate(5deg);
  animation: clock-tick 2s ease-in-out infinite;
}

.add-time-hero-clock-arm--short {
  height: 20px;
  width: 4px;
  top: 63px;
  transform: translateX(-50%) rotate(88deg);
  animation: clock-short 12s linear infinite;
}

.add-time-hero-clock-arm--long {
  height: 34px;
  width: 4px;
  top: 54px;
  transform: translateX(-50%) rotate(12deg);
  animation: clock-long 60s linear infinite;
}

@keyframes clock-tick {
  0%, 100% {
    transform: translateX(-50%) rotate(5deg);
  }
  25% {
    transform: translateX(-50%) rotate(8deg);
  }
  50% {
    transform: translateX(-50%) rotate(12deg);
  }
  75% {
    transform: translateX(-50%) rotate(8deg);
  }
}

@keyframes clock-short {
  from {
    transform: translateX(-50%) rotate(88deg);
  }
  to {
    transform: translateX(-50%) rotate(448deg);
  }
}

@keyframes clock-long {
  from {
    transform: translateX(-50%) rotate(12deg);
  }
  to {
    transform: translateX(-50%) rotate(372deg);
  }
}

.add-time-start-btn,
.add-time-stop-btn,
.add-time-cancel-btn,
.add-time-pause-btn,
.add-time-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 180px;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.add-time-start-btn svg,
.add-time-stop-btn svg,
.add-time-cancel-btn svg,
.add-time-pause-btn svg,
.add-time-save-btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.add-time-start-btn {
  background: linear-gradient(135deg, var(--at-green), var(--at-green-dark));
  box-shadow: 0 12px 28px rgba(16, 176, 122, 0.32);
}

.add-time-open-manual-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.add-time-stop-btn {
  background: linear-gradient(135deg, #ef6f6c, #d94f5c);
  box-shadow: 0 12px 28px rgba(217, 79, 92, 0.3);
}

.add-time-cancel-btn {
  background: #eef2f7;
  color: #5a6b7d;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(25, 56, 95, 0.08), inset 0 0 0 1.5px var(--at-line);
}

.add-time-pause-btn {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 12px 28px rgba(71, 85, 105, 0.24);
}

.add-time-save-btn {
  background: linear-gradient(135deg, #16a34a, #0f8a3a);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.28);
}

.add-time-start-btn:hover,
.add-time-open-manual-btn:hover,
.add-time-stop-btn:hover,
.add-time-pause-btn:hover,
.add-time-save-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(16, 176, 122, 0.38);
}

.add-time-open-manual-btn:hover {
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.add-time-stop-btn:hover {
  box-shadow: 0 16px 36px rgba(217, 79, 92, 0.36);
}

.add-time-pause-btn:hover {
  box-shadow: 0 16px 36px rgba(71, 85, 105, 0.3);
}

.add-time-save-btn:hover {
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.34);
}

.add-time-cancel-btn:hover {
  transform: translateY(-2px);
  background: #e4eaf3;
  box-shadow: 0 4px 12px rgba(25, 56, 95, 0.12), inset 0 0 0 1.5px #d2dce9;
}

.add-time-start-btn:active,
.add-time-stop-btn:active,
.add-time-cancel-btn:active,
.add-time-pause-btn:active,
.add-time-save-btn:active {
  transform: translateY(-1px);
}

.add-time-start-btn:focus-visible,
.add-time-stop-btn:focus-visible,
.add-time-cancel-btn:focus-visible,
.add-time-pause-btn:focus-visible,
.add-time-save-btn:focus-visible {
  outline: none;
  box-shadow: var(--at-ring);
}

.add-time-controls-card {
  margin: 18px 0 0;
  padding: 20px 22px 24px;
  border: 1px solid var(--at-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--at-shadow-sm);
}

.add-time-controls-card--modal {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.add-time-controls-head--modal {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 6px;
}

.add-time-controls-head--modal > div {
  min-width: 0;
}

.add-time-controls-head--modal .add-time-manual-close {
  flex: none;
  margin-top: 2px;
}

.add-time-controls-head {
  padding-bottom: 16px;
}

.add-time-controls-head h2 {
  color: var(--at-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.add-time-controls-head p {
  margin-top: 6px;
  color: var(--at-muted);
  font-size: 13px;
}

/* ---------- Controls (description / task / project) ---------- */
.add-time-controls {
  width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 16px;
}

.add-time-control-item {
  display: grid;
  gap: 9px;
  transition: transform 0.2s ease;
}

.add-time-control-item:hover {
  transform: translateY(-1px);
}

.add-time-control-item--full {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(16, 176, 122, 0.08);
}

.add-time-control-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--at-ink);
  letter-spacing: 0.3px;
}

.add-time-field {
  position: relative;
  display: block;
}

.add-time-field-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--at-muted);
  pointer-events: none;
  transition: color 0.16s ease;
}

.add-time-controls input,
.add-time-controls select {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  border: 1px solid var(--at-line);
  padding-inline: 46px 16px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  color: var(--at-ink);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.18s ease;
  appearance: none;
}

.add-time-controls select {
  cursor: pointer;
  padding-inline: 46px 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b809d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

.add-time-controls input::placeholder {
  color: #a0b0c0;
}

.add-time-controls input:hover,
.add-time-controls select:hover {
  border-color: #c2cce0;
  background: linear-gradient(180deg, #fff, #f8fbff);
  transform: translateY(-1px);
}

.add-time-controls input:focus,
.add-time-controls select:focus {
  outline: none;
  border-color: var(--at-primary);
  box-shadow: 0 0 0 4px rgba(103, 103, 236, 0.12), 0 10px 24px rgba(103, 103, 236, 0.08);
  background: #fff;
}

.add-time-controls-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.add-time-controls-actions .add-time-save-btn {
  min-width: 150px;
}

.add-time-controls-message {
  margin-top: 16px;
}

.add-time-field:focus-within .add-time-field-icon {
  color: var(--at-primary);
}

/* ---------- Manual entry card ---------- */
.add-time-manual-card {
  margin-top: 18px;
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  background: #fff;
  box-shadow: var(--at-shadow-sm);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.add-time-manual-card--modal {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: grid;
  gap: 18px;
}

#timerSaveModal {
  z-index: 99999;
}

.add-time-manual-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.add-time-manual-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--at-primary);
  background: rgba(103, 103, 236, 0.1);
}

.add-time-manual-icon svg {
  width: 22px;
  height: 22px;
}

.add-time-manual-head h2 {
  color: var(--at-ink);
  font-size: 17px;
  font-weight: 800;
}

.add-time-manual-head p {
  margin-top: 3px;
  color: var(--at-muted);
  font-size: 13px;
}

.add-time-manual-form {
  display: grid;
  gap: 14px;
}

.add-time-manual-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-time-manual-form-head strong {
  color: var(--at-ink);
  font-size: 15px;
  font-weight: 800;
}

.add-time-manual-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--at-line);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--at-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.add-time-manual-close:hover {
  background: #eef3fb;
  color: var(--at-ink);
  transform: translateY(-1px);
}

.add-time-manual-form-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 130px 130px 160px;
  gap: 14px;
  align-items: end;
}

.add-time-manual-form label {
  display: grid;
  gap: 8px;
}

.add-time-manual-form span {
  font-size: 13px;
  color: var(--at-ink);
  font-weight: 600;
}

.add-time-manual-form input {
  height: 50px;
  border-radius: 13px;
  border: 1px solid var(--at-line);
  padding: 0 14px;
  background: #fff;
  color: var(--at-ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.add-time-manual-form input:hover {
  border-color: #c8d4e2;
}

.add-time-manual-form input:focus {
  outline: none;
  border-color: var(--at-primary);
  box-shadow: var(--at-ring);
}

.add-time-manual-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--at-primary), #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(103, 103, 236, 0.24);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.add-time-manual-form button svg {
  width: 18px;
  height: 18px;
}

.add-time-manual-form button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.add-time-manual-form button:active {
  transform: translateY(0);
}

.add-time-manual-form button:focus-visible {
  outline: none;
  box-shadow: var(--at-ring);
}

/* ---------- Stats grid ---------- */
.add-time-stats-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.add-time-stat-card {
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  background: #fff;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--at-shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.add-time-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--at-shadow-md);
}

.add-time-stat-icon {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.add-time-stat-icon svg {
  width: 24px;
  height: 24px;
}

.add-time-stat-card--today .add-time-stat-icon {
  color: var(--at-green-dark);
  background: rgba(16, 176, 122, 0.12);
}

.add-time-stat-card--week .add-time-stat-icon {
  color: var(--at-primary);
  background: rgba(103, 103, 236, 0.12);
}

.add-time-stat-card--count .add-time-stat-icon {
  color: #d9883a;
  background: rgba(246, 183, 60, 0.16);
}

.add-time-stat-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.add-time-stat-card small {
  color: var(--at-muted);
  font-size: 13px;
  font-weight: 600;
}

.add-time-stat-card strong {
  color: var(--at-ink);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* ---------- Recent entries table ---------- */
.add-time-recent-card {
  margin-top: 22px;
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  background: #fff;
  box-shadow: var(--at-shadow-sm);
  overflow: hidden;
}

.add-time-recent-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: var(--at-ink);
  font-size: 16px;
  font-weight: 800;
  border-bottom: 1px solid var(--at-line);
  background: var(--at-soft);
}

.add-time-recent-card h2 svg {
  width: 20px;
  height: 20px;
  color: var(--at-primary);
}

.add-time-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.add-time-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  direction: rtl;
  padding: 8px 12px 14px;
}

.add-time-table th,
.add-time-table td {
  text-align: right;
  padding: 14px 16px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--at-ink);
}

.add-time-table th {
  color: var(--at-muted);
  font-size: 12px;
  font-weight: 700;
  padding-block: 6px 10px;
}

.add-time-table tbody tr {
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 56, 95, 0.04), 0 6px 14px rgba(25, 56, 95, 0.05);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.add-time-table tbody tr:hover {
  background: #f7faff;
  box-shadow: 0 8px 20px rgba(25, 56, 95, 0.12);
  transform: translateY(-1px);
}

.add-time-table tbody td {
  border-block: 1px solid var(--at-line);
}

.add-time-table tbody td:first-child {
  border-inline-start: 1px solid var(--at-line);
  border-start-start-radius: 12px;
  border-end-start-radius: 12px;
}

.add-time-table tbody td:last-child {
  border-inline-end: 1px solid var(--at-line);
  border-start-end-radius: 12px;
  border-end-end-radius: 12px;
}

.add-time-empty {
  text-align: center !important;
  color: var(--at-muted);
  padding: 28px 16px !important;
  font-size: 14px;
}

.add-time-delete-btn {
  border: 1px solid rgba(217, 79, 92, 0.22);
  border-radius: 10px;
  padding: 7px 14px;
  background: rgba(217, 79, 92, 0.08);
  color: #c23b48;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.add-time-delete-btn:hover {
  background: #d94f5c;
  color: #fff;
  transform: translateY(-1px);
}

.add-time-edit-btn {
  margin-inline-end: 6px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 10px;
  padding: 7px 14px;
  background: rgba(37, 99, 235, 0.08);
  color: #2451c6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.add-time-edit-btn:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}

.add-time-project-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-time-project-cell i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(23, 36, 47, 0.2);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .add-time-hero-wrapper {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .add-time-hero-visual {
    min-height: 120px;
  }

  .add-time-hero-visual--left {
    order: 1;
  }

  .add-time-hero-center {
    order: 2;
  }

  .add-time-hero-visual--right {
    order: 3;
  }

  .add-time-controls {
    grid-template-columns: 1fr;
  }

  .add-time-control-item--full {
    grid-column: 1;
  }

  .add-time-manual-form-fields {
    grid-template-columns: 1fr;
  }

  .add-time-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .add-time-hero-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
  }

  .add-time-hero-visual--left,
  .add-time-hero-visual--right {
    display: none;
  }

  .add-time-controls {
    grid-template-columns: 1fr;
  }

  .add-time-control-item {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .add-time-panel {
    padding: 20px;
  }

  .add-time-clock {
    font-size: clamp(44px, 8vw, 56px);
    letter-spacing: 2px;
  }

  .add-time-hero-wrapper {
    padding: 24px 18px 20px;
  }

  .add-time-controls {
    padding: 0;
    gap: 12px 14px;
  }

  .add-time-controls-card {
    padding: 18px 18px 20px;
    margin-top: 12px;
  }

  .add-time-control-label {
    font-size: 12px;
  }

  .add-time-controls input,
  .add-time-controls select {
    height: 50px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .add-time-panel {
    padding: 16px 12px;
  }

  .add-time-hero-wrapper {
    padding: 24px 16px;
    gap: 18px;
  }

  .add-time-clock {
    letter-spacing: 2px;
  }

  .add-time-hero-visual {
    min-height: 110px;
  }

  .add-time-start-btn,
  .add-time-stop-btn,
  .add-time-cancel-btn,
  .add-time-pause-btn,
  .add-time-save-btn {
    width: 100%;
    min-width: 0;
    height: 52px;
    font-size: 14px;
  }

  .add-time-hero-actions {
    width: 100%;
    gap: 10px;
  }

  .add-time-controls-card {
    padding: 16px 14px 18px;
    border-radius: 20px;
  }

  .add-time-controls {
    gap: 12px;
  }

  .add-time-control-label {
    font-size: 12px;
  }

  .add-time-controls input,
  .add-time-controls select {
    height: 50px;
    font-size: 14px;
  }

  .add-time-controls select {
    background-position: left 12px center;
  }

  .add-time-manual-form-head {
    flex-wrap: wrap;
  }

  .add-time-manual-form-fields {
    gap: 12px;
  }
}

.app-layout {
  width: 100%;
  margin-top: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "content sidebar";
  align-items: stretch;
  direction: ltr;
}

.sidebar {
  grid-area: sidebar;
  direction: rtl;
  min-height: 100vh;
  width: 248px;
  justify-self: end;
  background:
    radial-gradient(circle at 20% 0, rgba(129, 140, 248, 0.22), transparent 28%),
    linear-gradient(180deg, #0b1533, #111f45 42%, #14275a);
  color: #dbe6ff;
  padding: 14px 10px 16px;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  position: sticky;
  top: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  transition:
    width 0.5s ease-in-out,
    padding 0.5s ease-in-out,
    transform 0.5s ease-in-out,
    box-shadow 0.5s ease-in-out;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1120px) {
  .mobile-menu-btn {
    display: inline-grid;
    place-items: center;
    color: #000;
  }

  .workspace-top-switcher {
    display: none;
  }

  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "content";
    position: relative;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(72vw, 280px);
    height: 100vh;
    z-index: 1200;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }

  .sidebar-workspace-switcher {
    display: block;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.5);
    border: 0;
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }
}

@media (max-width: 520px) {
  .sidebar {
    width: min(70vw, 250px);
  }
}

.side-menu {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  align-content: start;
}

.side-submenu {
  display: none;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.side-submenu.is-open {
  display: grid;
}

.side-submenu .menu-item.sub-item {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 450;
  background: transparent;
}

#contactsSideSubmenu .menu-item.sub-item {
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: right;
}

#contactsSideSubmenu .menu-text {
  text-align: right;
}

.sidebar-brand {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 8px;
}

.sidebar-brand > div:last-child {
  text-align: center;
}

.sidebar-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 16px;
}

.sidebar-brand strong {
  display: block;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.sidebar-brand small {
  color: rgba(219, 230, 255, 0.7);
  font-size: 11px;
  display: block;
  text-align: center;
}

.side-menu-title {
  padding: 8px 10px 4px;
  color: rgba(219, 230, 255, 0.56);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.side-menu-account {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.menu-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #000000;
  border-radius: 10px;
  box-shadow: none;
  text-align: right;
  font-size: 14px;
  font-weight: 450;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.menu-text {
  flex: 1 1 auto;
  min-width: 0;
  word-spacing: 1px;
  letter-spacing: 0.01em;
}

.menu-item-label-with-badge {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.menu-item-label-with-badge .menu-text {
  flex: 0 1 auto;
}

.menu-item-meta {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}

.menu-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.menu-item:hover,
.menu-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.42), rgba(139, 92, 246, 0.22));
  color: #000000;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.24);
}

.menu-item.active {
  font-weight: 550;
  box-shadow: inset 3px 0 0 #a5b4fc, 0 8px 20px rgba(99, 102, 241, 0.24);
}

.menu-item.active .menu-text {
  word-spacing: 1.5px;
}

html[data-font-family="yekan"] .sidebar .menu-item,
body[data-font-family="yekan"] .sidebar .menu-item {
  font-weight: 550;
}

html[data-font-family="yekan"] .sidebar .menu-item.active,
body[data-font-family="yekan"] .sidebar .menu-item.active {
  font-weight: 650;
}

html[data-font-family="yekan"] .sidebar .side-submenu .menu-item.sub-item,
body[data-font-family="yekan"] .sidebar .side-submenu .menu-item.sub-item {
  font-weight: 550;
}

.menu-item.muted {
  background: transparent;
}

.menu-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  color: #a8c7e8;
  font-size: 13px;
  line-height: 1;
  background: rgba(148, 163, 184, 0.16);
}

.menu-icon svg,
.sidebar-brand-icon svg,
.menu-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.menu-icon.red {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.26);
  font-size: 18px;
}

.menu-icon.blue {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.26);
}

.menu-icon.green {
  color: #a7a7ff;
  background: rgba(103, 103, 236, 0.24);
  border-radius: 6px;
}

.menu-icon.orange {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
}

.menu-icon.amber {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.22);
}

.menu-icon.gray {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
}

.menu-icon.cyan {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.24);
}

.menu-icon.violet {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.22);
}

.menu-item-has-submenu {
  padding-left: 10px;
}

.menu-chevron {
  width: 14px;
  height: 14px;
  color: rgba(159, 179, 203, 0.72);
}

.sidebar-upgrade-box {
  margin: 10px 6px 0;
  padding: 10px 11px 10px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(180deg, rgba(245, 248, 255, 0.98), rgba(235, 241, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 6px;
}

.sidebar-upgrade-kicker {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #49568a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar-upgrade-title {
  margin: 0;
  color: #10203e;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
}

.sidebar-upgrade-version {
  margin: -2px 0 0;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.sidebar-upgrade-box small {
  display: block;
  color: #6b7a98;
  font-size: 10px;
  line-height: 1.55;
}

.sidebar-upgrade-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #edf3ff);
  color: #3551d6;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-upgrade-box a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.sidebar-section,
.team-box,
.storage-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.team-box strong {
  display: block;
  background: linear-gradient(90deg, #38bdf8, #93c5fd);
  color: #0f172a;
  padding: 8px 10px;
  font-size: 12px;
  text-align: right;
  border-radius: 10px;
}

.member {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
}

.member b,
.member small {
  display: block;
}

.member b {
  font-size: 12px;
}

.member small {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}

.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.avatar.teal {
  background: #bae6fd;
  color: #0f172a;
}

.invite-btn {
  width: 100%;
  padding: 8px;
  color: #0284c7;
  text-align: right;
  font-size: 12px;
  background: transparent;
}

.storage-box small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-bottom: 8px;
}

.storage-box span {
  display: block;
  height: 7px;
  background: linear-gradient(90deg, #38bdf8 78%, rgba(148, 163, 184, 0.18) 78%);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(56, 189, 248, 0.14);
}

.content {
  grid-area: content;
  direction: rtl;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  padding: 0;
  direction: rtl;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #f8fbfc, #fff 240px);
  border: 0;
  overflow: hidden;
}

.workspace-top-module {
  flex-shrink: 0;
}

body.notes-library-active .workspace-top-module {
  display: flex !important;
}

body.notes-library-active .workspace-top-module-main {
  display: block;
}

.page-panel {
  display: none;
  width: 100%;
  min-height: 100vh;
  min-height: 0;
}

.page-panel.active {
  display: block;
  flex: 1 1 0;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  overflow: auto;
}

body.projects-panel-active .content {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

.task-lists-page-shell {
  display: grid;
  gap: 20px;
}

.task-lists-hero-card,
.task-lists-board {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

.task-lists-hero-card {
  display: grid;
  gap: 12px;
  padding: 20px 24px;
  background:
    radial-gradient(circle at top right, rgba(246, 183, 60, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff, #eef8ff);
}

.task-list-create-form,
.task-list-item-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.task-list-create-toggle {
  width: fit-content;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #10a2df, #6767ec);
  box-shadow: 0 14px 26px rgba(103, 103, 236, 0.18);
  font-weight: 800;
}

.task-list-create-panel {
  display: grid;
}

.task-list-create-panel.is-hidden {
  display: none;
}

#taskListsPanel .page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#taskListsPanel .page-title h1 {
  margin: 0;
}

.task-list-create-form input,
.task-list-item-form input,
.task-list-item-input {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: #fff;
}

.task-list-create-form input:focus,
.task-list-item-form input:focus,
.task-list-item-input:focus {
  outline: none;
  border-color: rgba(16, 162, 223, 0.45);
  box-shadow: 0 0 0 4px rgba(16, 162, 223, 0.12);
}

.task-list-create-form button,
.task-list-item-form button,
.task-list-item-btn {
  padding: 14px 18px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #10a2df, #6767ec);
  box-shadow: 0 14px 26px rgba(103, 103, 236, 0.18);
}

.task-lists-board {
  padding: 20px;
}

.task-lists-tabs-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.task-lists-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.task-list-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
}

.task-list-tab.active {
  background: linear-gradient(135deg, rgba(16, 162, 223, 0.14), rgba(103, 103, 236, 0.14));
  border-color: rgba(103, 103, 236, 0.28);
}

.task-list-tab-title {
  padding: 10px 14px;
  color: var(--night);
  font-weight: 800;
  white-space: nowrap;
}

.task-list-tab-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-list-tab-icon,
.task-list-item-btn.danger {
  color: var(--danger);
}

.task-list-tab-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.task-lists-content {
  margin-top: 18px;
}

.task-list-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.task-list-content-head h3 {
  color: var(--night);
  font-size: 22px;
  margin-bottom: 4px;
}

.task-list-content-head p {
  color: var(--muted);
}

.task-list-items {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.task-list-table-wrap {
  overflow-x: auto;
}

.task-list-mobile-wrap {
  display: none;
  gap: 12px;
}

.task-list-mobile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.task-list-mobile-card.done {
  opacity: 0.78;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.9));
}

.task-list-mobile-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.task-list-mobile-head > .my-task-state-compact {
  order: 1;
  flex: 0 0 auto;
}

.task-list-mobile-head > .task-list-title-cell {
  min-width: 0;
  width: auto;
  max-width: 120px;
  flex: 0 1 120px;
  order: 2;
}

.task-list-mobile-head .task-list-item-text {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-list-mobile-head .task-list-linked-badge {
  margin-top: 6px;
}

.task-list-mobile-meta {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}

.task-list-mobile-meta > * {
  flex: 0 0 auto;
}

.task-list-mobile-meta .my-task-project-name {
  min-width: 0;
  white-space: nowrap;
}

.task-list-mobile-meta .my-task-project-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-list-mobile-actions {
  display: inline-flex;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 0;
  flex: 0 0 auto;
}

.task-list-mobile-card .my-task-mobile-progress-editor {
  flex: 0 0 100%;
  width: 100%;
  order: 10;
  margin-top: 4px;
}

.task-list-mobile-meta .task-list-date-pill {
  display: none;
}

@media (max-width: 520px) {
  .task-list-mobile-card {
    gap: 6px;
  }

  .task-list-mobile-head {
    gap: 6px;
  }

  .task-list-mobile-head > .task-list-title-cell {
    max-width: 88px;
    flex-basis: 88px;
  }

  .task-list-mobile-meta {
    flex-wrap: nowrap;
    gap: 6px;
  }
}

.task-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
}

.task-list-item.is-done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.9));
}

.task-list-item.is-done .task-list-item-input {
  color: #7a8899;
  text-decoration: line-through;
}

.task-list-item-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.task-list-item-check input {
  width: 18px;
  height: 18px;
  accent-color: #10a2df;
}

.task-list-item-input {
  width: 100%;
}

.task-list-item-text {
  display: block;
  color: var(--night);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.task-list-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.task-list-item-btn {
  min-width: 74px;
}

.task-list-item-btn.danger {
  min-width: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(217, 79, 92, 0.12);
  box-shadow: none;
}

.task-list-table th:nth-child(2),
.task-list-table td:nth-child(2) {
  width: 32%;
}

.task-list-table tr.done .task-list-item-input {
  color: #7a8899;
  text-decoration: line-through;
}

.task-list-title-cell {
  display: grid;
  gap: 6px;
}

.task-list-linked-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #24507a;
  font-size: 11px;
  font-weight: 800;
}

.task-list-linked-badge.is-manual {
  background: #eef2f7;
  color: #5b6b7f;
}

.task-list-date-pill {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px dashed #cfe0f7;
  border-radius: 10px;
  background: #f8fbff;
  color: #2f4f76;
  font-size: 12px;
  font-weight: 700;
}

.task-lists-empty-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 42px 20px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 22px;
}

.task-lists-empty-state.compact {
  padding: 28px 18px;
}

.task-lists-empty-state strong {
  color: var(--night);
  font-size: 20px;
}

.task-lists-empty-state p,
.task-lists-hero-card small,
.task-lists-content small {
  color: var(--muted);
}

@media (max-width: 760px) {
  #taskListsPanel {
    padding: 0 18px 24px;
  }

  .task-lists-hero-card,
  .task-lists-board {
    border-radius: 20px;
  }

  .task-lists-tabs {
    display: grid;
    gap: 10px;
    min-width: 100%;
  }

  .task-list-tab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
  }

  .task-list-tab-title {
    min-width: 0;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .task-list-create-form,
  .task-list-item-form,
  .task-list-item {
    grid-template-columns: 1fr;
  }

  .task-list-table-wrap {
    display: none;
  }

  .task-list-mobile-wrap {
    display: grid;
  }

  .task-list-item {
    justify-items: stretch;
  }

  .task-list-content-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-list-item-actions {
    justify-content: flex-end;
  }
}

.page-title {
  padding: 12px 32px 0;
  margin-bottom: 12px;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

.app-version {
  padding: 18px 20px 24px;
  text-align: center;
  color: #7a8899;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sidebar-version {
  margin-top: auto;
  padding: 14px 10px 4px;
  color: #fff;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

.dashboard-panel {
  padding: 0 32px 32px;
}

.dashboard-hero {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(246, 183, 60, 0.26), transparent 44%),
    linear-gradient(135deg, var(--night), #075f58);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(23, 36, 47, 0.18);
}

.dashboard-hero span {
  display: inline-block;
  margin-bottom: 10px;
  color: #a8f3e8;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-hero h1 {
  max-width: 720px;
  font-size: 30px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.9;
}

.hero-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  color: #17242f;
  background: var(--accent);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(246, 183, 60, 0.26);
}

.timer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 30px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.timer-panel > div:first-child span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.timer-panel strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--night);
  font-size: 46px;
  line-height: 1.2;
  direction: ltr;
  text-align: right;
}

.timer-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.timer-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.timer-start-btn,
.timer-stop-btn,
.timer-cancel-btn {
  min-width: 150px;
  padding: 14px 20px;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(103, 103, 236, 0.2);
}

.timer-start-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.timer-start-btn:disabled {
  cursor: default;
  opacity: 0.74;
}

.timer-stop-btn {
  background: var(--danger);
  box-shadow: 0 16px 34px rgba(217, 79, 92, 0.18);
}

.timer-cancel-btn {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.14);
  box-shadow: none;
}

.timer-stop-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-stop-box select {
  min-width: 210px;
}

.timer-message {
  grid-column: 1 / -1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.metric-card {
  min-height: 150px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 28px;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.8;
}

.monthly-summary-card {
  background: linear-gradient(135deg, #ffffff, #e9fbf7);
  border-color: rgba(103, 103, 236, 0.22);
}

.monthly-summary-card strong {
  color: var(--primary-dark);
  direction: ltr;
  text-align: right;
}

.monthly-summary-list {
  display: grid;
  gap: 6px;
}

.monthly-summary-list small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(103, 103, 236, 0.1);
  border-radius: 8px;
  font-weight: 800;
}

.monthly-summary-list b {
  color: var(--night);
  font-size: 14px;
}

.accent-card {
  background: linear-gradient(135deg, #fff, #fff7e5);
  border-color: rgba(246, 183, 60, 0.28);
}

.dark-card {
  background: var(--night);
  color: #fff;
}

.dark-card strong {
  color: #fff;
}

.dark-card span,
.dark-card small {
  color: rgba(255, 255, 255, 0.68);
}

.activity-panel {
  margin-top: 22px;
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.07);
}

.activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.activity-title h2 {
  font-size: 20px;
}

.activity-title span {
  color: var(--muted);
  font-size: 13px;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--soft);
  border-radius: 14px;
}

.activity-item b {
  font-size: 14px;
}

.activity-item small {
  color: var(--muted);
}

.dashboard-panel:not(.modern-dashboard) {
  padding: 20px;
  background: #f8fbfd;
}

.dashboard-overview,
.dashboard-middle-grid {
  display: grid;
  gap: 18px;
}

.dashboard-overview {
  grid-template-columns: 1fr 1.55fr 1.18fr;
}

.dashboard-middle-grid {
  grid-template-columns: 1.05fr 0.8fr 1.2fr;
  margin-top: 18px;
}

.dashboard-card {
  position: relative;
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dde7f1;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(42, 62, 82, 0.08);
}

.dashboard-card-title {
  display: block;
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #4f46e5;
  background: #ede9fe;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}

.dashboard-card-icon.small {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 17px;
}

.dashboard-card-icon.blue {
  color: #3578f6;
  background: #eaf2ff;
}

.dashboard-card-icon.green {
  color: #6767ec;
  background: #ececff;
}

.dashboard-card-icon.amber {
  color: #f59e0b;
  background: #fff4d7;
}

#tablePanel .table-page-shell {
  display: grid;
  gap: 18px;
}

#tablePanel .table-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(103, 103, 236, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(16, 162, 223, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 38px rgba(148, 163, 184, 0.12);
}

#tablePanel .table-page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#tablePanel .table-page-toolbar-actions.table-detail-mode {
  flex-wrap: nowrap;
}

#tablePanel .table-back-btn {
  background: #f3f6fb;
  color: #3a4d68;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

#tablePanel .table-page-search {
  position: relative;
  flex: 0 0 min(100%, 280px);
  min-width: 220px;
}

#tablePanel .table-page-search input {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  padding-inline-end: 48px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
  color: var(--night);
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#tablePanel .table-page-search::after {
  content: "⌕";
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  transform: translateY(-50%);
  color: #7b8ca4;
  font-size: 18px;
  pointer-events: none;
}

#tablePanel .table-page-search.is-hidden {
  display: none;
}

#tablePanel .table-primary-btn,
#tablePanel .table-secondary-btn,
#tablePanel .table-secondary-link,
#tablePanel .table-list-plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}

#tablePanel .table-primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #10a2df, #6767ec);
  box-shadow: 0 14px 26px rgba(103, 103, 236, 0.18);
}

#tablePanel .table-secondary-btn,
#tablePanel .table-secondary-link {
  color: #1f2e43;
  background: #eef4fb;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

#tablePanel .table-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

#tablePanel .table-board-list-card,
#tablePanel .table-board-canvas {
  padding: 18px;
}

#tablePanel .table-board-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#tablePanel .table-board-list-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

#tablePanel .table-list-plus-btn {
  width: 42px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #0ea66e, #10a2df);
}

#tablePanel .table-board-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#tablePanel .table-board-item {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 148px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff),
    radial-gradient(circle at top right, rgba(103, 103, 236, 0.06), transparent 28%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.08);
  text-align: right;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#tablePanel .table-board-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(148, 163, 184, 0.12);
  border-color: rgba(103, 103, 236, 0.22);
}

#tablePanel .table-board-item.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 246, 255, 0.98));
  border-color: rgba(103, 103, 236, 0.34);
  box-shadow: 0 18px 34px rgba(103, 103, 236, 0.14);
}

#tablePanel .table-board-item-main {
  display: grid;
  gap: 8px;
}

#tablePanel .table-board-item-eyebrow {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(103, 103, 236, 0.1);
  color: #6767ec;
  font-size: 11px;
  font-weight: 800;
}

#tablePanel .table-board-item-arrow {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  color: #7c8da7;
  font-size: 24px;
  font-weight: 700;
}

#tablePanel .table-board-item strong {
  display: block;
  color: var(--night);
  font-size: 16px;
  font-weight: 800;
}

#tablePanel .table-board-item small {
  display: block;
  color: #63748b;
  font-size: 12px;
  line-height: 1.8;
}

#tablePanel .table-board-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#tablePanel .table-board-item-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #5a6d85;
  font-size: 11px;
  font-weight: 700;
}

#tablePanel .table-empty-state {
  min-height: 560px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(16, 162, 223, 0.05), transparent 34%),
    radial-gradient(circle at bottom left, rgba(14, 166, 110, 0.05), transparent 34%),
    linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

#tablePanel .table-empty-state-inner {
  width: min(460px, 100%);
  text-align: center;
  padding: 24px;
}

#tablePanel .table-empty-emoji {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 24px;
  font-size: 30px;
  background: linear-gradient(135deg, rgba(16, 162, 223, 0.12), rgba(14, 166, 110, 0.12));
}

#tablePanel .table-empty-state h2 {
  color: var(--night);
  font-size: 24px;
}

#tablePanel .table-empty-state p {
  margin: 10px auto 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

#tablePanel .table-board-workspace {
  display: grid;
  gap: 14px;
}

#tablePanel .table-board-canvas.is-hidden {
  display: none;
}

#tablePanel .table-board-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

#tablePanel .table-board-name-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
}

#tablePanel .table-board-name-field span {
  color: #6e8197;
  font-size: 12px;
  font-weight: 700;
}

#tablePanel .table-board-name-field input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
  color: var(--night);
  font-size: 15px;
  font-weight: 700;
}

#tablePanel .table-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#tablePanel .table-sheet-wrap {
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.45) rgba(226, 232, 240, 0.9);
  scrollbar-gutter: stable both-edges;
}

#tablePanel .table-sheet-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

#tablePanel .table-sheet-wrap::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.65);
  border-radius: 999px;
}

#tablePanel .table-sheet-wrap::-webkit-scrollbar-thumb {
  border: 3px solid rgba(226, 232, 240, 0.65);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.82), rgba(15, 118, 110, 0.82));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

#tablePanel .table-sheet-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.95), rgba(17, 94, 89, 0.95));
}

#tablePanel .table-sheet-wrap::-webkit-scrollbar-corner {
  background: rgba(226, 232, 240, 0.65);
}

body.is-resizing-table {
  user-select: none !important;
}

body.is-resizing-table-col,
body.is-resizing-table-col * {
  cursor: col-resize !important;
}

body.is-resizing-table-row,
body.is-resizing-table-row * {
  cursor: row-resize !important;
}

#tablePanel .table-sheet {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

#tablePanel .table-sheet thead th,
#tablePanel .table-sheet tbody td,
#tablePanel .table-sheet tbody th {
  border-bottom: 1px solid #e5edf5;
  border-left: 1px solid #e5edf5;
  vertical-align: top;
}

#tablePanel .table-sheet thead th:first-child,
#tablePanel .table-sheet tbody th {
  background: #f8fbff;
}

#tablePanel .table-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 180px;
  padding: 10px 10px 12px;
  background: #f8fbff;
  overflow: visible;
}

#tablePanel .table-sheet thead th:first-child {
  min-width: 28px;
  width: 28px;
}

#tablePanel .table-sheet tbody th {
  position: relative;
  width: 28px;
  padding: 12px 4px;
  color: #6f8299;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#tablePanel .table-column-header {
  display: grid;
  gap: 8px;
  position: relative;
  padding-inline-end: 6px;
}

#tablePanel .table-column-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

#tablePanel .table-column-delete-btn,
#tablePanel .table-row-delete-btn {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #e11d48;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#tablePanel .table-column-delete-btn:hover,
#tablePanel .table-row-delete-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 114, 182, 0.38);
  background: #fff1f2;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.12);
}

#tablePanel .table-column-delete-btn:active,
#tablePanel .table-row-delete-btn:active {
  transform: translateY(0);
}

#tablePanel .table-row-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#tablePanel .table-col-resize-handle {
  position: absolute;
  top: 0;
  inset-inline-end: -8px;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

#tablePanel .table-col-resize-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  inset-inline-start: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(103, 103, 236, 0.38);
  opacity: 0;
  transition: opacity 0.15s ease;
}

#tablePanel .table-column-header:hover .table-col-resize-handle::after {
  opacity: 1;
}

#tablePanel .table-column-header:hover .table-col-resize-handle,
#tablePanel .table-col-resize-handle:active {
  background: linear-gradient(180deg, transparent, rgba(103, 103, 236, 0.04), transparent);
}

#tablePanel .table-column-name-input,
#tablePanel .table-column-type-select,
#tablePanel .table-cell-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
}

#tablePanel .table-column-name-input {
  min-height: 28px;
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
}

#tablePanel .table-column-type-select {
  width: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: #5e718a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11px;
  font-weight: 700;
}

#tablePanel .table-column-type-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #356188;
  font-size: 11px;
  font-weight: 700;
}

#tablePanel .table-sheet td {
  position: relative;
  min-width: 180px;
  height: 54px;
  padding: 0;
  cursor: cell;
}

#tablePanel .table-sheet td.is-empty {
  background: linear-gradient(180deg, #fff, #fcfdff);
}

#tablePanel .table-sheet td.is-selected {
  background: #eff9ff;
  box-shadow: inset 0 0 0 2px #10a2df;
}

#tablePanel .table-cell-wrap {
  min-height: 54px;
  display: flex;
  align-items: stretch;
}

#tablePanel .table-row-resize-handle {
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 12px;
  cursor: row-resize;
  touch-action: none;
  user-select: none;
}

#tablePanel .table-row-resize-handle::after {
  content: "";
  position: absolute;
  inset-inline-start: 14px;
  inset-inline-end: 14px;
  bottom: 50%;
  height: 2px;
  transform: translateY(50%);
  border-radius: 999px;
  background: rgba(103, 103, 236, 0.24);
  opacity: 0;
  transition: opacity 0.15s ease;
}

#tablePanel .table-row-resize-handle:hover::after {
  opacity: 1;
}

#tablePanel .table-cell-input {
  min-height: 54px;
  padding: 14px 12px;
  color: var(--night);
  font-size: 14px;
  cursor: cell;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

#tablePanel .table-cell-input::placeholder {
  color: #c0c9d6;
}

#tablePanel .table-cell-input[data-table-column-type="number"] {
  direction: ltr;
  text-align: right;
}

#tablePanel .table-cell-input:focus {
  background: rgba(16, 162, 223, 0.04);
}

#tablePanel .table-cell-checkbox {
  width: 100%;
  min-height: 54px;
  display: grid;
  place-items: center;
}

#tablePanel .table-cell-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #10a2df;
}

#tablePanel .table-board-empty-row td {
  text-align: center;
  color: #6f8299;
  font-size: 13px;
}

@media (max-width: 1100px) {
  #tablePanel .table-page-toolbar,
  #tablePanel .table-board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #tablePanel .table-page-toolbar-actions {
    flex-wrap: wrap;
  }

  #tablePanel .table-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #tablePanel {
    padding: 14px 12px 18px;
  }

  #tablePanel .table-page-shell {
    gap: 14px;
  }

  #tablePanel .table-page-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
  }

  #tablePanel .table-page-search {
    order: 1;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
  }

  #tablePanel .table-page-toolbar-actions {
    order: 2;
    width: 100%;
  }

  #tablePanel:not(.table-detail-open) #tableAddColumnBtn,
  #tablePanel:not(.table-detail-open) #tableAddRowBtn {
    display: none;
  }

  #tablePanel #tableCreateBoardBtn {
    width: 100%;
  }

  #tablePanel .table-page-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #tablePanel .table-board-list-card {
    padding: 14px;
  }

  #tablePanel .table-board-canvas {
    padding: 14px;
  }

  #tablePanel .table-board-list {
    grid-template-columns: 1fr;
  }

  #tablePanel .table-board-item {
    min-height: 126px;
  }

  #tablePanel .table-board-actions {
    width: 100%;
  }

  #tablePanel .table-board-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  #tablePanel .table-primary-btn,
  #tablePanel .table-secondary-btn,
  #tablePanel .table-secondary-link {
    width: 100%;
  }

  #tablePanel #tableCreateBoardBtn {
    grid-column: 1 / -1;
  }

  #tablePanel .table-page-hero-actions {
    flex-direction: column;
  }

  #tablePanel .table-board-list-head {
    align-items: flex-start;
  }

  #tablePanel .table-board-list-head > button {
    width: 46px;
    min-width: 46px;
  }

  #tablePanel .table-board-toolbar {
    gap: 10px;
  }

  #tablePanel .table-sheet-wrap {
    border-radius: 16px;
  }

  #tablePanel .table-empty-state {
    min-height: 420px;
  }

  #tablePanel .table-sheet {
    min-width: 760px;
  }

  #tablePanel .table-sheet thead th {
    min-width: 150px;
    padding: 8px 8px 10px;
  }

  #tablePanel .table-sheet td {
    min-width: 150px;
  }

  #tablePanel .table-column-name-input {
    font-size: 13px;
  }

  #tablePanel .table-column-type-select {
    font-size: 10px;
  }

  #tablePanel .table-cell-input {
    font-size: 13px;
    padding: 12px 10px;
  }

  #tablePanel .table-sheet td,
  #tablePanel .table-sheet thead th {
    min-width: 140px;
  }

  #tablePanel .table-sheet tbody th {
    padding: 10px 8px;
    font-size: 11px;
  }
}

.timer-overview-card {
  display: grid;
  gap: 12px;
  min-height: 172px;
  padding: 26px 24px 20px;
  border-color: #7967ff;
}

.timer-overview-card .dashboard-card-icon {
  position: absolute;
  top: 18px;
  left: 18px;
}

.timer-overview-card strong {
  display: block;
  margin-top: 20px;
  color: #121a31;
  font-size: 29px;
  font-weight: 900;
  direction: ltr;
  text-align: right;
  letter-spacing: 0;
}

.timer-overview-card p,
.active-project-card p,
.progress-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.timer-overview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timer-overview-card .timer-start-btn,
.timer-overview-card .timer-stop-btn,
.timer-overview-card .timer-cancel-btn {
  min-width: 44px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 9px;
  background: #5b46e8;
  box-shadow: 0 12px 24px rgba(91, 70, 232, 0.22);
}

.timer-overview-card .timer-stop-btn {
  background: #ef4444;
}

.timer-overview-card .timer-cancel-btn {
  color: #334155;
  background: #fff;
  border: 1px solid #dce5ef;
  box-shadow: none;
}

.timer-overview-card .timer-stop-box {
  flex-wrap: wrap;
}

.timer-overview-card .timer-stop-box select {
  min-width: 160px;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  line-height: 42px;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.manual-time-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(68px, 0.45fr) minmax(68px, 0.45fr) minmax(96px, 0.7fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  background: #f8fbfc;
  border: 1px solid rgba(91, 70, 232, 0.12);
  border-radius: 8px;
}

.manual-time-form select,
.manual-time-form input,
.manual-time-form button {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.manual-time-form button {
  color: #fff;
  background: var(--primary-dark);
  font-weight: 900;
  white-space: nowrap;
  min-width: 0;
  justify-self: stretch;
}

.task-count-card,
.active-project-card,
.progress-card {
  min-height: 172px;
  padding: 26px 24px 20px;
}

.task-status-overview-card {
  display: grid;
  gap: 18px;
  min-height: 172px;
  padding: 26px 24px 20px;
  background:
    linear-gradient(145deg, rgba(240, 249, 255, 0.96), rgba(255, 255, 255, 0.94) 48%),
    #fff;
  border-color: rgba(14, 116, 144, 0.14);
}

.task-status-overview-card .dashboard-card-icon {
  position: absolute;
  top: 18px;
  left: 18px;
}

.task-status-overview-head {
  padding-left: 46px;
}

.task-status-overview-head strong {
  display: block;
  margin: 8px 0 2px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
}

.task-status-overview-head p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.task-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-status-stat {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.task-status-stat span {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.task-status-stat strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.task-status-stat.status-open {
  background: #f8fafc;
}

.task-status-stat.status-in-progress {
  background: #e0f2fe;
}

.task-status-stat.status-review {
  background: #fef3c7;
}

.task-status-stat.status-done {
  background: #d1fae5;
}

.task-count-card .dashboard-card-icon,
.active-project-card .dashboard-card-icon {
  position: absolute;
  top: 18px;
  left: 18px;
}

.active-project-card {
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(232, 248, 239, 0.92), rgba(255, 255, 255, 0.94) 48%),
    #fff;
  border-color: rgba(17, 166, 106, 0.18);
}

.active-project-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -40px -24px;
  height: 110px;
  background: linear-gradient(90deg, rgba(22, 163, 106, 0.12), rgba(91, 70, 232, 0.12));
  pointer-events: none;
}

.active-project-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-left: 46px;
}

.active-project-head strong {
  display: block;
  margin: 8px 0 2px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.area-chart-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.area-chart-box {
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.area-chart-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.area-chart-label span {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.area-chart-label b {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-area-chart {
  width: 100%;
  height: 62px;
  display: block;
  overflow: visible;
}

.dashboard-area-chart .area-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 7px rgba(15, 23, 42, 0.12));
}

.dashboard-area-chart .area-fill {
  stroke: none;
}

.dashboard-area-chart .area-points circle {
  stroke: #fff;
  stroke-width: 2;
}

.task-count-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.task-count-split > div + div {
  border-right: 1px solid #dfe8f0;
  padding-right: 18px;
}

.task-count-split span,
.task-count-split small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-count-split strong {
  display: block;
  margin: 8px 0;
  color: #121a31;
  font-size: 28px;
  font-weight: 900;
}

.mini-sparkline {
  height: 54px;
  display: flex;
  align-items: end;
  gap: 7px;
  margin-top: 12px;
  padding: 6px 0;
  overflow: hidden;
}

.mini-sparkline span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #22c879, rgba(34, 200, 121, 0.12));
}

.mini-sparkline span:nth-child(1) { height: 24%; }
.mini-sparkline span:nth-child(2) { height: 38%; }
.mini-sparkline span:nth-child(3) { height: 52%; }
.mini-sparkline span:nth-child(4) { height: 34%; }
.mini-sparkline span:nth-child(5) { height: 46%; }
.mini-sparkline span:nth-child(6) { height: 78%; }

.purple-line span {
  background: linear-gradient(180deg, #5b46e8, rgba(91, 70, 232, 0.1));
}

.progress-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.progress-ring,
.distribution-ring {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin-top: 14px;
  color: #121a31;
  background: conic-gradient(#5b46e8 0deg, #5b46e8 0deg, #eef1f5 0deg 360deg);
  border-radius: 50%;
}

.progress-ring strong,
.distribution-ring strong {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.dashboard-section-head {
  height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #e7edf3;
}

.dashboard-section-head h2,
.dashboard-bottom-card h2 {
  color: var(--night);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-section-head a {
  color: #5b46e8;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-task-list,
.dashboard-note-list,
.dashboard-project-list {
  display: grid;
}

.dashboard-task-row,
.dashboard-project-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid #eef2f6;
}

.dashboard-task-row {
  grid-template-columns: 60px 1fr 30px;
}

.dashboard-task-row:last-child,
.dashboard-project-row:last-child {
  border-bottom: 0;
}

.dashboard-priority {
  display: inline-flex;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-priority.high {
  color: #e5484d;
  background: #fff0f1;
}

.dashboard-priority.medium {
  color: #d98200;
  background: #fff5e8;
}

.dashboard-priority.low {
  color: #0c9a5b;
  background: #eaf9f1;
}

.dashboard-task-main strong,
.dashboard-project-main strong,
.dashboard-note-item strong {
  display: block;
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
}

.dashboard-task-main small,
.dashboard-project-main small,
.dashboard-note-item p,
.dashboard-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.dashboard-check {
  width: 18px;
  height: 18px;
  border: 2px solid #c9d5e3;
  border-radius: 50%;
}

.dashboard-note-list {
  gap: 10px;
  padding: 12px;
}

.dashboard-note-item {
  padding: 14px;
  background: #fbfdff;
  border: 1px solid #e7edf3;
  border-radius: 11px;
}

.dashboard-note-item time {
  display: block;
  margin-top: 8px;
  color: #637083;
  font-size: 11px;
  text-align: left;
}

.dashboard-project-row {
  grid-template-columns: 138px 1fr 42px;
}

.dashboard-project-progress b {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-project-meter {
  height: 5px;
  background: #e8edf2;
  border-radius: 999px;
  overflow: hidden;
}

.dashboard-project-meter span {
  display: block;
  height: 100%;
  background: #6767ec;
  border-radius: inherit;
}

.dashboard-project-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  color: #22a56a;
  background: #eaf9f1;
  border-radius: 10px;
  font-weight: 900;
}

.dashboard-project-row:nth-child(2) .dashboard-project-meter span {
  background: #f28c18;
}

.dashboard-project-row:nth-child(2) .dashboard-project-progress b {
  color: #f28c18;
}

.dashboard-project-row:nth-child(3) .dashboard-project-meter span {
  background: #4f86f7;
}

.dashboard-project-row:nth-child(3) .dashboard-project-progress b {
  color: #4f86f7;
}

.dashboard-project-row:nth-child(4) .dashboard-project-meter span {
  background: #5b46e8;
}

.dashboard-project-row:nth-child(4) .dashboard-project-progress b {
  color: #5b46e8;
}

.dashboard-project-row:nth-child(5) .dashboard-project-meter span {
  background: #ef4444;
}

.dashboard-project-row:nth-child(5) .dashboard-project-progress b {
  color: #ef4444;
}

.dashboard-empty {
  padding: 18px;
  text-align: center;
}

.dashboard-bottom-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 190px 300px 280px;
  gap: 24px;
  margin-top: 18px;
  padding: 18px;
}

.weekly-chart-card {
  position: relative;
  min-height: 172px;
}

.chart-filter {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 88px;
  padding: 8px 12px;
  color: #334155;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.weekly-chart-card h2 {
  text-align: center;
}

.weekly-chart {
  height: 120px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 20px;
  margin-top: 20px;
  padding: 0 30px;
  border-bottom: 1px solid #e8edf4;
  background: linear-gradient(180deg, transparent, rgba(91, 70, 232, 0.05));
}

.weekly-chart span {
  display: block;
  min-height: 18px;
  background: linear-gradient(180deg, #5b46e8, rgba(91, 70, 232, 0.1));
  border-radius: 999px 999px 0 0;
}

.chart-days {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 10px 30px 0;
  color: #6b7788;
  font-size: 11px;
  text-align: center;
}

.dashboard-week-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
}

.dashboard-week-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-week-summary b {
  color: #22a56a;
}

.dashboard-week-summary div:nth-child(3) b { color: #4f86f7; }
.dashboard-week-summary div:nth-child(4) b { color: #f28c18; }
.dashboard-week-summary div:nth-child(5) b { color: #ef4444; }

.work-distribution {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 18px;
}

.work-distribution h2 {
  grid-column: 1 / -1;
  text-align: right;
}

.distribution-ring {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0;
  background: conic-gradient(#6767ec 0 240deg, #4f86f7 240deg 320deg, #f28c18 320deg 360deg);
}

.distribution-ring strong {
  width: 80px;
  height: 80px;
  font-size: 22px;
}

.distribution-ring span {
  position: absolute;
  bottom: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.distribution-legend {
  display: grid;
  gap: 13px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.distribution-legend span {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
}

.distribution-legend b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.green-dot { background: #6767ec; }
.blue-dot { background: #4f86f7; }
.orange-dot { background: #f28c18; }

.dashboard-period-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f8fbfe);
}

.dashboard-period-summary-top {
  min-height: 236px;
}

.dashboard-period-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(36, 49, 61, 0.06);
  border-radius: 12px;
  background: #fff;
}

.dashboard-period-block > strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.dashboard-period-block div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-period-block b {
  color: #0f766e;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-period-block span {
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.stats-shell {
  padding: 0 32px 32px;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-kpi-card,
.stats-card {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(36, 49, 61, 0.07);
}

.stats-kpi-card {
  padding: 20px;
}

.stats-kpi-card span,
.stats-kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-kpi-card strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--night);
  font-size: 27px;
  font-weight: 900;
  direction: ltr;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.stats-card {
  padding: 20px;
}

.stats-wide-card {
  grid-column: span 1;
}

.stats-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-card-head h2 {
  color: var(--night);
  font-size: 17px;
}

.stats-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-area-chart {
  width: 100%;
  min-height: 220px;
  display: block;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.stats-grid-lines line {
  stroke: #e7edf4;
  stroke-width: 1;
}

.stats-area-fill {
  fill: rgba(34, 181, 115, 0.16);
}

.stats-area-line {
  fill: none;
  stroke: #6767ec;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stats-area-dots circle {
  fill: #6767ec;
  stroke: #fff;
  stroke-width: 3;
}

.stats-donut {
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
  margin: 12px auto 18px;
  position: relative;
  background: conic-gradient(#6767ec 0deg, #6767ec 0deg, #4f86f7 0deg 360deg);
  border-radius: 50%;
}

.stats-donut::before {
  content: "";
  position: absolute;
  inset: 25px;
  background: #fff;
  border-radius: 50%;
}

.stats-donut strong,
.stats-donut span {
  position: relative;
  z-index: 1;
}

.stats-donut strong {
  color: var(--night);
  font-size: 28px;
  font-weight: 900;
}

.stats-donut span {
  margin-top: 42px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.stats-legend,
.stats-project-list {
  display: grid;
  gap: 12px;
}

.stats-legend span {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-legend b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stats-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(36, 49, 61, 0.08);
}

.stats-project-row:last-child {
  border-bottom: 0;
}

.stats-project-row strong,
.stats-project-row span {
  display: block;
}

.stats-project-row strong {
  color: var(--night);
  font-size: 14px;
}

.stats-project-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stats-project-row > b {
  color: #5b46e8;
  font-size: 14px;
  font-weight: 900;
}

.stats-project-meter {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 999px;
}

.stats-project-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6767ec, #5b46e8);
  border-radius: inherit;
}

.stats-week-shell {
  margin: 28px 32px 32px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e3eb;
  border-radius: 4px;
  box-shadow: 0 18px 42px rgba(36, 49, 61, 0.06);
}

.stats-week-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #e9f0f4;
}

.stats-week-summary article {
  min-height: 98px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.46);
  text-align: center;
}

.stats-week-summary article:last-child {
  border-left: 0;
}

.stats-week-summary span {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.stats-week-summary strong {
  color: #111827;
  font-size: 25px;
  font-weight: 500;
  direction: ltr;
}

.stats-week-chart-card {
  padding: 24px 28px 18px;
  border-bottom: 1px solid #d9e3eb;
}

.stats-month-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.stats-month-mini-card {
  background: #fff;
  border: 1px solid #d9e1eb;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(20, 30, 50, 0.05);
  padding: 18px 18px 14px;
}

.stats-month-mini-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.stats-month-mini-head h2 {
  color: #101a2f;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.stats-month-mini-head p {
  color: #7587a0;
  font-size: 12px;
  font-weight: 700;
}

.stats-month-mini-head > strong {
  color: #101a2f;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  direction: ltr;
}

.stats-week-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.stats-week-chart-head h1 {
  color: var(--night);
  font-size: 20px;
}

.stats-week-chart-head p,
.stats-week-chart-head span {
  color: #7b8794;
  font-size: 12px;
  font-weight: 800;
}

.stats-range-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 680px;
  padding: 0;
  background: transparent;
}

.stats-range-controls label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.stats-range-controls input {
  width: 145px;
  height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

.stats-range-controls > button[type="submit"],
.stats-range-presets button {
  height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.stats-range-controls > button[type="submit"] {
  color: #fff;
  background: #111827;
}

.stats-range-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #edf2f6;
  border-radius: 9px;
}

.stats-range-presets button {
  color: #64748b;
  background: transparent;
}

.stats-range-presets button.active {
  color: #fff;
  background: #10a2df;
}

.stats-range-controls small {
  flex-basis: 100%;
  color: #94a3b8;
  font-size: 11px;
  text-align: left;
}

.stats-range-controls small.error-message {
  color: var(--danger);
}

.stats-week-chart {
  position: relative;
  min-height: 300px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  overflow-x: auto;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 33px, #d5dde5 34px),
    #fff;
}

#statsPanel .weekly-line-chart {
  position: relative;
  height: 246px;
  padding-bottom: 30px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fdfefe 0%, #fbfdff 100%);
  overflow: hidden;
}

#statsPanel .weekly-line-chart svg {
  position: absolute;
  inset: 10px 12px 30px 56px;
  width: calc(100% - 68px);
  height: calc(100% - 40px);
}

#statsPanel .weekly-line-chart .dashboard-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7587a0;
  font-size: 13px;
  font-weight: 700;
}

#statsPanel .weekly-line-chart.is-ready .dashboard-empty {
  display: none;
}

#statsPanel .weekly-y-axis {
  position: absolute;
  top: 10px;
  right: 0;
  bottom: 30px;
  width: 48px;
  display: grid;
  align-content: space-between;
  color: #3f4d63;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

#statsPanel .weekly-y-axis span {
  display: block;
  transform: translateY(-2px);
}

#statsPanel .weekly-x-axis {
  position: absolute;
  right: 12px;
  left: 56px;
  bottom: 0;
  display: grid;
  align-items: start;
  grid-template-columns: repeat(var(--stats-month-day-count, 31), minmax(0, 1fr));
}

#statsPanel .weekly-x-axis span {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #7f90a8;
}

#statsPanel .weekly-x-axis span b {
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  color: #3f4d63;
}

#statsPanel .weekly-x-axis span small {
  font-size: 10px;
  line-height: 1;
  color: #607086;
  font-weight: 500;
}

#statsPanel .weekly-chart-tooltip {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, -100%);
  background: #132342;
  color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 7px 10px;
  display: grid;
  gap: 2px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(11, 23, 45, 0.24);
}

#statsPanel .weekly-chart-tooltip strong {
  font-size: 13px;
  font-weight: 600;
}

#statsPanel .weekly-chart-tooltip span {
  font-size: 10px;
  color: #d6e3ff;
  font-weight: 500;
}

#statsPanel .weekly-chart-tooltip.is-hidden {
  display: none;
}

.stats-y-axis {
  display: grid;
  align-content: space-between;
  padding: 4px 0 42px;
  color: #adb7c2;
  font-size: 12px;
  direction: ltr;
}

.stats-day-bars {
  min-height: 270px;
  min-width: calc(var(--stats-day-count, 7) * 122px);
  display: grid;
  grid-template-columns: repeat(var(--stats-day-count, 7), minmax(20px, 1fr));
  gap: clamp(3px, 1.2vw, 18px);
  align-items: end;
  direction: rtl;
}

.stats-day-column {
  position: relative;
  height: 270px;
  display: grid;
  grid-template-rows: 24px 1fr 32px;
  align-items: end;
  justify-items: center;
  gap: 7px;
  direction: rtl;
}

.stats-day-column b {
  color: #6b7280;
  font-size: clamp(9px, 0.9vw, 13px);
  font-weight: 500;
  direction: ltr;
}

.stats-day-column small {
  color: #5f6770;
  font-size: clamp(8px, 0.8vw, 12px);
  white-space: nowrap;
  writing-mode: horizontal-tb;
  transform: none;
  direction: rtl;
  unicode-bidi: plaintext;
}

.stats-stack-bar {
  width: 100%;
  max-width: 122px;
  min-width: 10px;
  min-height: 2px;
  display: flex;
  flex-direction: column-reverse;
  align-self: end;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
  background: #e7eef4;
}

.stats-stack-bar:empty {
  height: 2px;
}

.stats-stack-bar span {
  display: block;
  width: 100%;
  min-height: 2px;
}

.stats-day-tooltip {
  position: absolute;
  right: 50%;
  bottom: calc(100% - 48px);
  z-index: 20;
  min-width: 250px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  display: none;
  gap: 8px;
  padding: 12px;
  color: #111827;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d9e3eb;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  text-align: right;
  overflow-y: auto;
}

.stats-day-tooltip.is-floating {
  position: fixed;
  right: auto;
  bottom: auto;
  display: grid;
  pointer-events: none;
  z-index: 999;
}

.stats-day-column.tooltip-right .stats-day-tooltip {
  right: auto;
  left: 0;
}

.stats-day-column.tooltip-left .stats-day-tooltip {
  right: 0;
}

.stats-day-column:hover .stats-day-tooltip,
.stats-day-column:focus-within .stats-day-tooltip,
.stats-day-column:focus .stats-day-tooltip {
  display: grid;
}

.stats-day-tooltip strong,
.stats-day-tooltip small {
  display: block;
}

.stats-day-tooltip .stats-day-tooltip-label {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed #d8e1ea;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.stats-day-tooltip strong {
  color: var(--night);
  font-size: 13px;
  direction: rtl;
  unicode-bidi: plaintext;
}

.stats-day-tooltip-project {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.stats-day-tooltip-project i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-top: 5px;
}

.stats-day-tooltip-project-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stats-day-tooltip b {
  color: #334155;
  font-weight: 800;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  direction: rtl;
}

.stats-day-tooltip em,
.stats-day-tooltip small {
  color: #64748b;
  font-style: normal;
  direction: ltr;
}

.stats-day-tooltip em {
  font-size: 11px;
  line-height: 1.4;
}

.stats-week-chart.is-compact {
  min-height: 300px;
  overflow-x: hidden;
}

.stats-week-chart.is-compact .stats-day-bars {
  gap: 7px;
  min-height: 270px;
  min-width: 100%;
  align-items: stretch;
}

.stats-week-chart.is-compact .stats-day-column {
  position: relative;
  height: 270px;
  display: block;
  min-width: 0;
}

.stats-week-chart.is-compact .stats-stack-bar {
  position: absolute;
  right: 50%;
  bottom: 54px;
  transform: translateX(50%);
  width: min(100%, 18px);
  max-width: 18px;
  min-width: 6px;
}

.stats-week-chart.is-compact .stats-day-column > b {
  display: none;
}

.stats-week-chart.is-compact .stats-day-column > small {
  position: absolute;
  right: 50%;
  bottom: 12px;
  width: 100%;
  transform: translateX(50%);
  transform-origin: center;
  text-align: center;
  color: #6b7280;
  font-size: 10px;
}

.stats-week-breakdown {
  min-height: 344px;
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(320px, 1fr);
  align-items: center;
  gap: 40px;
  padding: 24px 38px 34px;
}

.stats-project-donut {
  width: 224px;
  height: 224px;
  display: grid;
  place-items: center;
  justify-self: center;
  position: relative;
  background: #e8eef5;
  border-radius: 50%;
}

.stats-project-donut::before {
  content: "";
  position: absolute;
  inset: 74px;
  background: #fff;
  border-radius: 50%;
}

.stats-project-donut strong {
  position: relative;
  z-index: 1;
  color: #111827;
  font-size: 16px;
  font-weight: 500;
  direction: ltr;
}

.stats-project-share-list {
  display: grid;
  gap: 14px;
}

.stats-project-share-row {
  display: grid;
  grid-template-columns: 12px minmax(120px, 1fr) 76px minmax(150px, 250px) 64px;
  align-items: center;
  gap: 12px;
  color: #111827;
}

.stats-project-share-row > span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.stats-project-share-row strong {
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.stats-project-share-row b {
  font-size: 13px;
  font-weight: 500;
  direction: ltr;
}

.stats-project-share-row div {
  height: 26px;
  overflow: hidden;
  background: #edf2f6;
}

.stats-project-share-row i {
  display: block;
  height: 100%;
}

.stats-project-share-row em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  direction: ltr;
}

.page-title span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.page-title h1 {
  font-size: 30px;
  line-height: 1.5;
  margin: 4px 0 6px;
}

.page-title p {
  max-width: 720px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 32px 32px;
}

.project-add-btn {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 8px 12px;
  color: #334155;
  background: #eef2f7;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.16);
}

.project-add-btn.active {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.2);
}
.project-title-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: calc(100% - 260px);
  margin-top: -6px;
}

#projectsPanel .page-title {
  padding-top: 0;
  margin-bottom: 2px;
}

#projectsPanel.page-panel.active {
  margin-top: 0;
  position: relative;
  background:
    linear-gradient(180deg, #f7fbfd 0%, #ffffff 180px),
    radial-gradient(circle at top left, rgba(103, 103, 236, 0.08), transparent 26%),
    linear-gradient(180deg, #f8fbfc, #fff 240px);
  border-radius: 34px;
  overflow-x: hidden;
  overflow-y: auto;
}

#projectsPanel.page-panel.active > * {
  position: relative;
  z-index: 1;
}

#projectsPanel .page-title {
  padding-top: 0;
  margin-bottom: 0;
}

#projectsPanel .projects-shell {
  padding-top: 0;
}

#projectsPanel .projects-top-shell {
  display: grid;
  gap: 0;
  padding: 0 24px 0;
  direction: rtl;
}

#projectsPanel .projects-hero {
  position: relative;
  display: grid;
  direction: rtl;
  grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas: "copy visual";
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, rgba(248, 250, 252, 0.74), rgba(255, 255, 255, 0.46));
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#projectsPanel .projects-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top right, rgba(103, 103, 236, 0.08), transparent 38%);
}

#projectsPanel .projects-hero-visual {
  grid-area: visual;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

#projectsPanel .projects-hero-actions-wrap {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 100%;
  padding: 18px 20px;
  position: relative;
  z-index: 1;
}

#projectsPanel .projects-hero-nav {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

#projectsPanel .project-nav-tile {
  min-width: 100px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

#projectsPanel .project-nav-tile:hover {
  background: #ffffff;
  color: #1f2937;
}

#projectsPanel .project-nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(103, 103, 236, 0.1);
  color: #6767ec;
  font-size: 15px;
}

#projectsPanel .projects-hero-copy {
  grid-area: copy;
  direction: rtl;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 10px;
  padding: 0px 20px 18px 0px;
  text-align: right;
  border-radius: 0 30px 0 0;
  position: relative;
  z-index: 1;
}

#projectsPanel .projects-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

#projectsPanel .projects-title-actions .project-add-btn {
  min-width: 144px;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

#projectsPanel .projects-hero-heading {
  width: 100%;
}

#projectsPanel .projects-hero-copy h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.3;
  font-weight: 900;
}

#projectsPanel .projects-hero-controls {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

#projectsPanel .projects-hero-controls .project-category-filter {
  display: flex;
  flex: 0 0 220px;
  max-width: 220px;
}

#projectsPanel .project-workspace-switcher {
  margin-top: 0;
  padding: 8px 10px;
  gap: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 0 1 auto;
  max-width: 100%;
}

#projectsPanel .project-workspace-switcher-label {
  color: #5b6b7d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#projectsPanel .project-workspace-switcher select {
  min-width: 180px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

#projectsPanel .project-workspace-switcher #createWorkspaceBtn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
}

#projectsPanel .project-workspace-switcher .workspace-create-inline {
  max-width: 100%;
}

#projectsPanel .project-workspace-switcher .workspace-create-inline input {
  width: 168px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

#projectsPanel .project-workspace-switcher .workspace-create-inline button {
  height: 44px;
  border-radius: 12px;
}

#projectsPanel .project-workspace-switcher .workspace-create-inline small {
  color: #dc2626;
  font-size: 11px;
}

#projectsPanel .projects-hero-controls .project-category-filter .project-category-select {
  width: 100%;
}

#projectsPanel .projects-hero-copy .project-search-box {
  width: auto;
  min-width: 0;
  flex: 0 1 140px;
  max-width: 140px;
  margin-top: 0;
  justify-self: stretch;
}

#projectsPanel .project-search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid #d5e1ec;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.68);
  color: #1f3654;
  font-size: 13px;
  direction: rtl;
  text-align: right;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#projectsPanel .projects-hero-copy .project-search-box input {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

#projectsPanel .projects-hero-controls .project-category-filter,
#projectsPanel .projects-hero-controls .project-category-filter .project-category-select {
  background: rgba(255, 255, 255, 0.58);
}

#projectsPanel .projects-hero-controls .project-category-filter {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px;
}

#projectsPanel .projects-hero-controls .project-category-filter .project-category-select {
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#projectsPanel .project-title-actions {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  margin-top: 0;
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
}

#projectsPanel .project-title-actions .project-add-btn {
  min-width: 150px;
  min-height: 42px;
}

#projectsPanel .project-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row;
  direction: rtl;
}

#projectsPanel .project-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  flex: 0 0 auto;
}

#projectsPanel .project-btn-icon svg {
  width: 100%;
  height: 100%;
}

#projectsPanel .project-title-actions .project-add-btn {
  background: #eef2f7;
  color: #334155;
  border: 1px solid #dbe4ef;
}

#projectsPanel #showProjectFormBtn,
#projectsPanel #workspaceAddTaskBtn {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

#projectsPanel .project-add-btn--archive {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.project-action-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-right: 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.projects-shell {
  display: grid;
  gap: 16px;
  padding: 44px 32px 32px;
}

#projectsPanel .projects-shell > section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

#projectsPanel .projects-shell > section h3 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 900;
}

.project-form {
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
}

#addTimeManualModal {
  z-index: 99999;
}

#addTimeControlsModal {
  z-index: 99999;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 29, 0.52);
  backdrop-filter: blur(4px);
}

.project-modal-card {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 30px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 20px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 48%),
    linear-gradient(170deg, #ffffff, #f7fbff 68%, #eef4ff);
  box-shadow: 0 34px 64px rgba(7, 21, 34, 0.28);
}

.notes-composer-modal-card {
  width: min(1280px, calc(100vw - 24px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid rgba(223, 231, 240, 0.96);
  background: #ffffff;
  box-shadow: 0 34px 64px rgba(7, 21, 34, 0.28);
  overflow: visible;
}

.notes-composer-modal-card .note-composer {
  width: 100%;
  max-height: calc(100vh - 30px);
  overflow: auto;
  background: #ffffff;
}

#notes2Panel .notes-composer-modal-card {
  overflow: hidden;
}

#notes2Panel {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

#notes2Panel.active {
  display: flex;
}

#notes2Panel .notes-page-hero,
#notes2Panel .notes-utility-bar {
  flex: none;
}

#notes2Panel .notes-composer-modal-card .note-composer {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: none;
  overflow: hidden;
}

#notes2Panel .note-composer {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#notes2Panel .notes-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

#notes2Panel .notes-composer-modal-card .notes-composer-sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

#notes2Panel .notes-composer-modal-card .note-composer-body {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

#notes2Panel .note-composer-body {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

#notes2Panel .notes-composer-modal-card .note-composer-main {
  min-height: 0;
  overflow: auto;
}

#notes2Panel .note-composer-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

#notes2Panel .note-editor-content {
  min-height: 0;
  height: clamp(150px, 18vh, 210px);
  max-height: clamp(150px, 18vh, 210px);
  resize: none;
  overflow: auto;
}

#notes2Panel .notes-composer-modal-card .note-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), #fff 60%);
  backdrop-filter: blur(8px);
}

#notes2Panel .notes-composer-modal-card .note-composer-side {
  min-height: 0;
  overflow: auto;
}

#notes2Panel .note-composer-side {
  min-height: 0;
  overflow: auto;
}

#inviteModal .project-modal-card {
  width: min(700px, calc(100vw - 24px));
  max-height: min(78vh, 560px);
  overflow: visible;
}

.project-modal-card-wide {
  width: min(980px, calc(100vw - 24px));
}

.project-modal-head {
  margin-bottom: 14px;
  padding-left: 44px;
}

.project-modal-head h3 {
  color: #1b2936;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}

.project-modal-head p {
  color: #5a6876;
  font-size: 13px;
}

.project-modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(36, 49, 61, 0.14);
  background: #fff;
  color: #1d2a35;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(36, 49, 61, 0.12);
}

.project-modal .field input,
.project-modal .field select {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(36, 49, 61, 0.14);
  border-radius: 14px;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 14px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.project-modal .field input:focus,
.project-modal .field select:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.project-appearance-switch {
  display: inline-flex;
  gap: 6px;
  margin: 6px 0 10px;
  padding: 4px;
  background: #edf2f7;
  border-radius: 10px;
}

.project-appearance-tab {
  min-width: 72px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #516171;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.project-appearance-tab.active {
  color: #132331;
  background: #fff;
  border-color: rgba(36, 49, 61, 0.14);
  box-shadow: 0 6px 14px rgba(36, 49, 61, 0.1);
}

.project-form #projectColorSelect {
  max-width: 220px;
}

.project-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-color-picker button {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(36, 49, 61, 0.12);
}

.project-color-picker button.active {
  border-color: var(--night);
}

.project-icon-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.project-icon-swatch {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(36, 49, 61, 0.14);
  background: #fff;
  font-size: 20px;
}

.project-icon-swatch.active {
  border-color: rgba(59, 130, 246, 0.5);
  background: #eaf3ff;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.project-member-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-member-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  background: #fff;
}

.project-member-chip span {
  display: grid;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 700;
  color: #213141;
}

.project-member-chip small {
  color: #6a7886;
  font-size: 11px;
}

.project-modal .workspace-members-manage-list,
.project-modal .project-invitations-list {
  max-height: calc(100vh - 240px);
  overflow: auto;
  padding-left: 2px;
}

body.modal-open {
  overflow: hidden;
}

.project-status-filter,
.project-category-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.project-status-filter:empty,
.project-category-filter:empty {
  display: none;
}

#projectsPanel .project-category-filter {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.project-search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid #d5e1ec;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: #1f3654;
  font-size: 13px;
  direction: rtl;
  text-align: right;
}

.project-category-chip {
  min-height: 34px;
  padding: 0 14px;
  color: #526170;
  background: transparent;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 999px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
}

.project-category-chip.active {
  color: #1d4ed8;
  background: transparent;
  border-color: #93c5fd;
  box-shadow: none;
}

.project-category-select {
  min-width: 190px;
  height: 38px;
  padding: 0 36px 0 12px;
  color: #1f3654;
  background: #fff;
  border: 1px solid #d5e1ec;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(12px) calc(50% - 3px),
    calc(18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.project-category-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.18);
}

.workspace-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(36, 49, 61, 0.07);
}

.workspace-panel span,
.workspace-panel p {
  color: var(--muted);
  font-size: 12px;
}

.workspace-panel strong {
  display: block;
  margin: 6px 0;
  color: var(--night);
  font-size: 18px;
}

.workspace-member-form {
  display: flex;
  flex-direction: column;
  direction: rtl;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.invite-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 20px rgba(148, 163, 184, 0.12);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.invite-field {
  display: grid;
  gap: 6px;
}
.invite-field > span {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
}
.invite-field-email {
  grid-column: 1 / -1;
}
.workspace-member-form input[type="email"] {
  width: 100%;
  min-width: 0;
}
@media (max-width: 980px) {
  .invite-form-grid {
    grid-template-columns: 1fr;
  }
  .workspace-member-form {
    grid-template-columns: 1fr;
  }
}

.workspace-member-form input,
.workspace-member-form button,
.project-visibility-field select {
  border-radius: 8px;
  font-size: 12px;
}
.invite-form-grid select,
.invite-form-grid input {
  height: 38px;
  border-radius: 9px;
  border: 1px solid #d3deea;
  font-size: 12px;
  padding: 0 11px;
  background: #fff;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.invite-form-grid select:focus,
.invite-form-grid input:focus {
  border-color: #7dd3c8;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}
.invite-form-grid select:disabled {
  opacity: 0.6;
}

.workspace-member-form button {
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  font-weight: 800;
  align-self: flex-end;
  width: 160px;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(20, 184, 166, 0.28);
}
.project-invitations-list {
  display: grid;
  gap: 8px;
}
.project-invitation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 10px;
}
.project-invitation-actions {
  display: flex;
  gap: 6px;
}
.project-invitation-actions button {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
}

.workspace-member-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

#tablePanel .project-modal-card {
  width: min(640px, calc(100vw - 24px));
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

#tablePanel .project-modal-head {
  margin-bottom: 18px;
  padding-left: 48px;
}

#tablePanel .table-modal-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

#tablePanel .project-modal-head h3 {
  font-size: 24px;
  color: #0f172a;
}

#tablePanel .project-modal-head p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.8;
}

#tablePanel .project-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.18);
  color: #334155;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#tablePanel .table-modal-form {
  display: grid;
  gap: 12px;
}

#tablePanel .table-modal-field {
  display: grid;
  gap: 7px;
}

#tablePanel .table-modal-field > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

#tablePanel .table-modal-field input,
#tablePanel .table-modal-field select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 24px rgba(15, 23, 42, 0.04);
}

#tablePanel .table-modal-field input:focus,
#tablePanel .table-modal-field select:focus {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14), 0 10px 24px rgba(15, 23, 42, 0.04);
}

#tablePanel .table-modal-form button {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 14px 26px rgba(20, 184, 166, 0.22);
}

#tablePanel .table-modal-form small {
  margin-top: -2px;
  color: #0f766e;
  font-size: 12px;
}

#tablePanel .table-modal-form input::placeholder {
  color: #94a3b8;
}

.workspace-member-form small.error-message {
  color: var(--danger);
}
.workspace-switcher {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  position: static;
  top: auto;
  right: auto;
  left: auto;
  opacity: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-switcher select {
  min-width: 240px;
  height: 36px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid #d8e2ec;
  background: #fff;
  padding: 0 10px;
  color: #213547;
  box-shadow: none;
}

.workspace-switcher #createWorkspaceBtn {
  margin-top: 0;
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid #d8e2ec;
  color: #1f3348;
  background: #fff;
  box-shadow: none;
}

.workspace-create-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace-create-inline input {
  width: 190px;
  height: 38px;
  border: 1px solid #cfe0ef;
  border-radius: 10px;
  padding: 0 10px;
  background: transparent;
}

.workspace-create-inline button {
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #b8cbe0;
  background: transparent;
  color: #1f3348;
  font-size: 12px;
  font-weight: 800;
}

.workspace-create-inline-message {
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}
.workspace-members-manage-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed rgba(36, 49, 61, 0.2);
  border-radius: 10px;
  background: #fbfdff;
}
.workspace-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.workspace-member-row small {
  color: var(--muted);
  font-size: 12px;
}
.workspace-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workspace-member-actions select,
.workspace-member-actions button {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d6dee8;
}

.workspace-member-actions select {
  background: #f8fafc;
  color: #334155;
}

.workspace-member-actions button {
  background: #fff1f2;
  color: #b91c1c;
  border-color: #fecdd3;
}

.project-time-row {
  display: grid;
  grid-template-columns: minmax(0, 160px) 130px;
  gap: 10px;
  align-items: start;
  max-width: 310px;
}

.project-time-row label {
  color: var(--muted);
  font-size: 12px;
}

.project-time-row input,
.project-time-row select {
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 13px;
}

.project-message.error-message,
.message.error-message {
  background: #fff1f2;
  color: var(--danger);
  border-color: rgba(217, 79, 92, 0.2);
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  justify-content: start;
  gap: 12px;
  padding: 4px 6px;
}

.projects-owned-section {
  margin-top: 10px;
}

.project-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.07),
    0 2px 8px rgba(148, 163, 184, 0.08);
  isolation: isolate;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, transparent 65%, rgba(99, 102, 241, 0.04) 100%);
  z-index: 0;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(18px - 1px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  z-index: 0;
}

.project-card:hover {
  border-color: rgba(148, 163, 184, 0.88);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.10),
    0 6px 16px rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.project-card-glow {
  display: none;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.project-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.project-remaining-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  color: #14784f;
  background: transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.project-remaining-badge.is-muted {
  color: var(--muted);
  background: transparent;
}

.project-card-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 0;
  text-align: center;
}

.project-card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--project-accent, #3b82f6);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.project-card-title {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 8px;
}

.project-card-display {
  display: grid;
  gap: 6px;
  margin-top: 15px;
}

.project-card-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
}

.project-card-status-link {
  width: 100%;
  text-decoration: none;
  transition: color 0.18s ease;
}

.project-card-status-name {
  display: inline;
}

.project-card-status-link:hover {
  color: var(--primary-dark);
}

.project-card-status-dot {
  width: 10px;
  height: 10px;
  display: inline-grid;
  place-items: center;
  background: #22c55e;
  border-radius: 50%;
  font-size: 0;
  box-shadow: none;
}

.project-progress-group {
  position: relative;
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.project-progress-group.is-empty {
  min-height: 112px;
  border-radius: 18px;
  overflow: hidden;
}

.project-progress-group.is-empty::before,
.project-progress-group.is-empty::after {
  content: "";
  position: absolute;
  right: 16px;
  left: 16px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}

.project-progress-group.is-empty::before {
  top: 26px;
  height: 18px;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.16) 0%, rgba(34, 197, 94, 0.06) 55%, rgba(229, 231, 235, 0.45) 100%);
}

.project-progress-group.is-empty::after {
  top: 68px;
  height: 18px;
  background:
    linear-gradient(90deg, rgba(6, 182, 212, 0.16) 0%, rgba(6, 182, 212, 0.06) 55%, rgba(229, 231, 235, 0.45) 100%);
}

.project-progress-group.is-empty > *:not(.project-progress-empty-state) {
  opacity: 0.38;
  filter: blur(2px);
  transform: scale(0.985);
  position: relative;
  z-index: 1;
}

.project-progress-empty-box {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.9));
  border: 0;
}

.project-progress-empty-box--tasks {
  color: #15803d;
}

.project-progress-empty-box--time {
  color: #0f766e;
}

.project-progress-empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.36) 58%, rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  z-index: 2;
}

.project-card .project-progress {
  position: relative;
  height: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, #e5e7eb 0%, #eef2f7 100%);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.project-card .project-progress span {
  position: relative;
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.project-card .project-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.55) 45%, transparent 100%);
  transform: translateX(-100%);
  animation: projectProgressShine 2.8s ease-in-out infinite;
}

.project-card .project-progress--tasks span {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 45%, #4ade80 100%);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.28);
}

.project-card .project-progress--time span {
  background: linear-gradient(90deg, #0891b2 0%, #06b6d4 50%, #67e8f9 100%);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.22);
}

.project-progress-row--tasks .project-percent-badge {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.project-progress-row--time .project-percent-badge {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.2);
  color: #0f766e;
}

@keyframes projectProgressShine {
  0% {
    transform: translateX(-120%);
  }
  55% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.project-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.project-progress-row span {
  color: #64748b;
}

.project-progress-row b {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  direction: ltr;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.project-percent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.empty-state {
  color: var(--muted);
  font-size: 12px;
}

.project-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 0;
}

.project-card-actions-muted {
  justify-content: flex-start;
  padding-top: 2px;
}

.project-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-metric-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 186px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
}

.project-metric-ring {
  --metric-value: 0;
  --metric-color: #6d28d9;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 61%, transparent 62%),
    conic-gradient(var(--metric-color) calc(var(--metric-value) * 1%), #edf2f7 0);
}

.project-metric-ring--time {
  --metric-color: #14b8a6;
}

.project-metric-center {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.project-metric-center b {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.project-metric-center span {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.project-metric-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.project-metric-meta small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.project-metric-meta strong {
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.project-add-task-btn {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  color: #0f766e;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.project-edit-btn,
.project-manage-btn,
.project-quick-task-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #fff;
}

.project-edit-btn:hover,
.project-manage-btn:hover,
.project-quick-task-btn:hover {
  filter: brightness(0.98);
}

.project-manage-btn {
  color: #374151;
}

.project-manage-btn:hover {
  background: #f8fafc;
}

.project-edit-btn {
  color: #374151;
}

.project-edit-btn:hover {
  background: #f8fafc;
}

.project-edit-btn--footer,
.project-add-task-btn--footer {
  min-height: 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.project-edit-btn--footer {
  color: #111827;
  background: #fff;
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-add-task-btn--footer {
  color: #fff;
  background: linear-gradient(90deg, #6366f1 0%, #7c3aed 100%);
  border: 0;
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.24);
}

.project-add-task-btn--footer:hover {
  filter: brightness(1.03);
}

.project-card-actions--two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
  padding-top: 2px;
  border-top: 0;
}

.project-edit-btn--ghost {
  color: #111827;
  background: #fff;
  border-color: rgba(203, 213, 225, 0.85);
}

.project-add-task-btn--primary {
  color: #fff;
  font-size: 16px;
  background: linear-gradient(90deg, #6366f1 0%, #7c3aed 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.22);
}

.project-add-task-btn--primary:hover {
  filter: brightness(1.02);
}

.project-quick-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(248, 251, 252, 0.96);
  border: 1px solid rgba(103, 103, 236, 0.16);
  border-radius: 8px;
}

.project-task-box {
  display: grid;
  gap: 8px;
}

.project-quick-task-form input {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.project-quick-task-form button {
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.project-quick-task-form button[type="submit"] {
  color: #fff;
  background: var(--primary-dark);
}

.project-quick-task-form button[type="submit"]:disabled {
  cursor: default;
  opacity: 0.62;
}

.project-quick-task-cancel {
  color: var(--muted);
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.1);
}

.project-quick-task-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.project-quick-task-form small.error-message {
  color: var(--danger);
}

.project-normal-task-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  padding: 14px;
  background: rgba(248, 251, 252, 0.96);
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 8px;
}

.project-normal-task-form input,
.project-normal-task-form select,
.project-normal-task-form textarea {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
  color-scheme: light;
}

.project-normal-task-form select option {
  color: #1f2937;
  background: #fff;
}

.project-normal-task-form .project-picker,
.project-normal-task-form .priority-picker,
.project-modal .visibility-picker {
  position: relative;
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.my-tasks-quick-add .project-picker,
.my-tasks-quick-add .priority-picker {
  position: relative;
  min-width: 0;
  width: 100%;
}

.project-picker-trigger,
.priority-picker-trigger,
.visibility-picker-trigger {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe5ef;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.project-picker-trigger:focus,
.priority-picker-trigger:focus,
.visibility-picker-trigger:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.18);
}

.project-picker-trigger:disabled,
.priority-picker-trigger:disabled,
.visibility-picker-trigger:disabled {
  cursor: default;
  opacity: 0.72;
}

.project-picker::after,
.priority-picker::after,
.visibility-picker::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-60%) rotate(-45deg);
  pointer-events: none;
}

.project-picker-menu,
.priority-picker-menu,
.visibility-picker-menu {
  position: fixed;
  z-index: 3500;
  max-height: min(280px, 42vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.project-picker[data-open-direction="up"] .project-picker-menu,
.priority-picker[data-open-direction="up"] .priority-picker-menu,
.visibility-picker[data-open-direction="up"] .visibility-picker-menu {
  top: auto;
  bottom: auto;
}

.project-picker[data-open-direction="up"]::after,
.priority-picker[data-open-direction="up"]::after,
.visibility-picker[data-open-direction="up"]::after {
  top: auto;
  bottom: 14px;
  transform: translateY(0) rotate(135deg);
}

.project-picker[data-open-direction="down"]::after,
.priority-picker[data-open-direction="down"]::after,
.visibility-picker[data-open-direction="down"]::after {
  top: 50%;
  bottom: auto;
  transform: translateY(-60%) rotate(-45deg);
}

.member-scope-picker[data-open-direction="up"] .member-scope-picker-menu {
  top: auto;
  bottom: auto;
}

.member-scope-picker[data-open-direction="up"]::after {
  top: auto;
  bottom: 14px;
  transform: translateY(0) rotate(135deg);
}

.member-scope-picker[data-open-direction="down"]::after {
  top: 50%;
  bottom: auto;
  transform: translateY(-60%) rotate(-45deg);
}

.project-picker-empty,
.priority-picker-empty,
.visibility-picker-empty {
  padding: 12px 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.project-picker-option,
.priority-picker-option,
.visibility-picker-option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: right;
  color: #1f2937;
  background: transparent;
}

.project-picker-option strong,
.priority-picker-option strong,
.visibility-picker-option strong {
  font-size: 13px;
  font-weight: 700;
}

.project-picker-option span,
.priority-picker-option span,
.visibility-picker-option span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.project-picker-option:hover,
.project-picker-option.is-selected,
.priority-picker-option:hover,
.priority-picker-option.is-selected,
.visibility-picker-option:hover,
.visibility-picker-option.is-selected {
  background: #eef4fb;
}

.member-scope-picker {
  position: relative;
  min-width: 0;
  width: 100%;
}

.member-scope-picker-trigger {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe5ef;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.member-scope-picker-trigger:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.18);
}

.member-scope-picker::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-60%) rotate(-45deg);
  pointer-events: none;
}

.member-scope-picker-menu {
  position: fixed;
  z-index: 3500;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.member-scope-picker-option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: right;
  color: #1f2937;
  background: transparent;
}

.member-scope-picker-option strong {
  font-size: 13px;
  font-weight: 700;
}

.member-scope-picker-option span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.member-scope-picker-option:hover,
.member-scope-picker-option.is-selected {
  background: #eef4fb;
}

.project-modal-card-picker-open {
  overflow: visible;
}

#projectTaskNormalTitle {
  grid-column: 1 / -1;
}

#projectTaskProjectSelect {
  grid-column: 1 / -1;
}

#projectTaskNormalDescription {
  grid-column: 1 / -1;
  resize: vertical;
  min-height: 88px;
}

#projectTaskNormalPriority {
  grid-column: 1 / -1;
}

#projectTaskQuickModal .project-picker-trigger,
#projectTaskQuickModal .priority-picker-trigger {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-color: #dbe5ef !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

#projectTaskQuickModal .project-picker-trigger:hover,
#projectTaskQuickModal .priority-picker-trigger:hover,
#projectTaskQuickModal .project-picker-trigger:focus,
#projectTaskQuickModal .priority-picker-trigger:focus,
#projectTaskQuickModal .project-picker.is-open .project-picker-trigger,
#projectTaskQuickModal .priority-picker.is-open .priority-picker-trigger {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.18) !important;
}

.project-task-advanced-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(36, 49, 61, 0.2) !important;
  background: #fff !important;
  color: #2f5ea6 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.project-task-advanced-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-task-advanced-fields .project-task-normal-jalali-field {
  grid-column: 1 / 2;
}

.project-normal-task-form button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: #2f5ea6;
}

.project-normal-task-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #2f5ea6;
  font-size: 11px;
  font-weight: 800;
}

.project-task-share-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.project-task-share-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: #2f5ea6;
}

.project-task-share-row span {
  display: grid;
  gap: 3px;
}

.project-task-share-row strong {
  font-size: 12px;
  font-weight: 800;
}

.project-task-share-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.project-chat-task-picker-card {
  width: min(720px, calc(100vw - 32px));
}

.project-chat-task-picker-search {
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 94, 166, 0.18);
  border-radius: 12px;
  background: #fbfdff;
  font-size: 13px;
  font-weight: 500;
}

.project-chat-task-picker-search:focus {
  border-color: rgba(47, 94, 166, 0.42);
  box-shadow: 0 0 0 3px rgba(47, 94, 166, 0.08);
  outline: none;
}

.project-chat-task-picker-list {
  display: grid;
  gap: 10px;
  max-height: min(64vh, 620px);
  overflow: auto;
  padding: 4px 2px 2px;
}

.project-chat-task-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: right;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-chat-task-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 94, 166, 0.26);
  box-shadow: 0 14px 30px rgba(47, 94, 166, 0.08);
}

.project-chat-task-choice-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.project-chat-task-choice-main strong {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.project-chat-task-choice-main span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.project-chat-task-choice-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  flex: 0 0 auto;
  color: #475569;
}

.project-chat-task-choice-meta small {
  font-size: 11px;
  font-weight: 700;
}

.project-normal-task-form small.error-message {
  color: var(--danger);
}

.project-task-quick-modal-card {
  width: min(1040px, calc(100vw - 24px));
}

.project-members-box {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 8px;
}

.project-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-members-list > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.project-members-list small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.project-member-remove {
  padding: 2px 6px;
  color: var(--danger);
  background: #fff1f2;
  border-radius: 999px;
  font-size: 10px;
}

.project-member-remove:disabled {
  display: none;
}

.project-member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.project-member-form select,
.project-member-form button {
  border-radius: 7px;
  font-size: 12px;
}

.project-member-form button {
  padding: 9px 11px;
  color: #fff;
  background: var(--primary-dark);
  font-weight: 800;
}

.project-member-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.project-detail-members {
  padding: 16px;
}

.project-progress {
  height: 10px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.project-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #39c0b7);
  border-radius: inherit;
}

.time-meter .project-progress span {
  background: #4f46e5;
}

.empty-state {
  padding: 22px;
  background: #fff;
  border: 1px dashed rgba(36, 49, 61, 0.2);
  border-radius: 16px;
  text-align: center;
}

.task-panel {
  max-width: 900px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.project-room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding: 0 32px 32px;
  align-items: start;
}

.project-room-layout .task-panel {
  max-width: none;
}

.project-detail-category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
}

.project-detail-category-form span,
.project-detail-category-form small {
  color: var(--muted);
  font-size: 12px;
}

.project-detail-category-form strong {
  display: block;
  margin-top: 4px;
  color: var(--night);
  font-size: 16px;
}

.project-detail-category-form input {
  height: 42px;
  border-radius: 10px;
  font-size: 13px;
}

.project-detail-category-form button {
  height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.project-chat-panel {
  min-height: 520px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.project-chat-list {
  height: 410px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbfc, #fff);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
}

.project-chat-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
}

.project-chat-item.is-message {
  margin-right: 28px;
  background: #fff;
  border: 1px solid rgba(103, 103, 236, 0.14);
  box-shadow: 0 10px 22px rgba(36, 49, 61, 0.06);
}

.project-chat-item.is-event {
  margin-left: 28px;
  background: #fff8e9;
  border: 1px solid rgba(246, 183, 60, 0.24);
}

.project-chat-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-chat-meta b {
  color: var(--night);
  font-size: 12px;
}

.project-chat-meta span,
.project-chat-meta time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-chat-meta span {
  padding: 3px 7px;
  color: var(--primary-dark);
  background: rgba(103, 103, 236, 0.1);
  border-radius: 999px;
}

.project-chat-item.is-event .project-chat-meta span {
  color: #8a5b08;
  background: rgba(246, 183, 60, 0.18);
}

.project-chat-item p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.project-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.project-chat-input-wrap {
  position: relative;
}

.project-chat-form textarea {
  min-height: 48px;
  max-height: 130px;
  resize: vertical;
  border-radius: 10px;
  font-size: 13px;
}

.project-chat-actions {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
}

#projectChatEmojiBtn {
  width: 44px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #cfdbe6;
  background: #f8fbff;
  color: #1f3654;
  font-size: 20px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.project-chat-emoji-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(520px, calc(100vw - 80px));
  max-height: 300px;
  padding: 8px;
  border: 1px solid #d6e0eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  z-index: 50;
}

.project-chat-emoji-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid #e8eef5;
  margin-bottom: 8px;
}

.project-chat-emoji-tabs button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f6f9fc;
  border: 1px solid #dbe4ef;
  font-size: 15px;
}

.project-chat-emoji-tabs button.active {
  background: #e8f2ff;
  border-color: #bfdbfe;
}

.project-chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.project-chat-emoji-grid button {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid transparent;
  font-size: 20px;
}

.project-chat-emoji-grid button:hover {
  background: #f8fafc;
  border-color: #dbe4ef;
}

#projectChatEmojiBtn,
.project-chat-emoji-tabs button,
.project-chat-emoji-grid button {
  min-width: 0 !important;
  max-width: none !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}

.project-chat-form > button,
#projectChatSendBtn {
  align-self: stretch;
  min-width: 88px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 10px;
  font-weight: 900;
}

.project-chat-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.project-chat-form small.error-message {
  color: var(--danger);
}

.project-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.project-chat-main {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fff;
}

.project-chat-sidebar {
  padding: 16px;
  border: 1px solid #d8e1ec;
  border-radius: 16px;
  background: #fbfcfe;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.project-chat-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-chat-side-head h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  color: #0f172a;
}

.project-chat-side-head span {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #8a5b08;
  background: #fef3c7;
  border: 1px solid #f5d98d;
}

.project-chat-side-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.project-chat-side-progress i {
  display: block;
  height: 11px;
  background: #e6ebf2;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d9e1ea;
}

.project-chat-side-progress i span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6767ec, #8a8af5);
}

.project-chat-side-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1700px) {
  .project-title-link b {
    font-size: 17px;
  }

  .project-meter-label span {
    font-size: 13px;
  }

  .project-meter-label b {
    font-size: 15px;
  }

  .project-meter-meta b {
    font-size: 12px;
  }
}

@media (max-width: 980px) {
  .project-title-link b {
    font-size: 16px;
  }

  .project-meter-label span {
    font-size: 12px;
  }

  .project-meter-label b {
    font-size: 14px;
  }

  .project-meter-meta b {
    font-size: 11px;
  }

  .project-add-task-btn,
  .project-edit-btn,
  .project-manage-btn {
    min-height: 38px;
    font-size: 11px;
    border-radius: 10px;
  }
}

.project-chat-side-kpis article {
  padding: 12px 8px;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  text-align: center;
  background: #fff;
}
.project-chat-side-kpis article:nth-child(1) {
  background: #f8fafc;
  border-color: #dbe4ef;
}
.project-chat-side-kpis article:nth-child(2) {
  background: #fff9eb;
  border-color: #f3d58f;
}
.project-chat-side-kpis article:nth-child(3) {
  background: #ecfdf3;
  border-color: #cfd0ff;
}

.project-chat-side-kpis b {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin-bottom: 2px;
  color: #0f172a;
}

.project-chat-side-kpis small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.project-chat-side-section h4 {
  margin: 0 0 9px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.project-chat-side-members,
.project-chat-side-tasks {
  display: grid;
  gap: 6px;
}

.project-chat-side-member,
.project-chat-side-task {
  padding: 10px 11px;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  display: grid;
  gap: 3px;
}

.project-chat-side-member b,
.project-chat-side-task b {
  color: #1e293b;
  font-size: 13px;
}

.project-chat-side-member span,
.project-chat-side-task span {
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .project-chat-layout {
    grid-template-columns: 1fr;
  }

  .project-chat-sidebar {
    position: static;
  }
}

.direct-chat-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  padding: 0 32px 32px;
  align-items: stretch;
}

.direct-chat-start-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 8px;
}

.direct-chat-start-mini select,
.direct-chat-start-mini button {
  min-height: 36px;
  border-radius: 9px;
  font-size: 12px;
}

.direct-chat-start-mini button {
  min-width: 82px;
  color: #fff;
  background: var(--primary-dark);
  font-weight: 800;
}

#chatStartMessage {
  display: block;
  min-height: 14px;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
}

#chatStartMessage.error-message {
  color: var(--danger);
}

.direct-chat-members,
.direct-chat-room {
  height: min(930px, calc(100vh - 120px));
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(36, 49, 61, 0.08);
  overflow: hidden;
}

.direct-chat-members > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--night);
  font-size: 16px;
}

.direct-chat-member-list {
  display: grid;
  gap: 8px;
  max-height: calc(100% - 34px);
  overflow-y: auto;
}

.direct-chat-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.direct-chat-member {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.06);
  border-radius: 9px;
  text-align: right;
}

.direct-chat-member em {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.direct-chat-member:hover,
.direct-chat-member.active {
  background: rgba(103, 103, 236, 0.1);
  border-color: rgba(103, 103, 236, 0.24);
}

.direct-chat-member > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  font-weight: 900;
}

.chat-avatar-fallback {
  position: relative;
}

.direct-chat-message-avatar .chat-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.chat-avatar-fallback i {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5a5 5 0 0 0 5 5zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5a5 5 0 0 0 5 5zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.direct-chat-member b,
.direct-chat-member small {
  display: block;
}

.direct-chat-member b {
  color: var(--night);
  font-size: 13px;
}

.direct-chat-member small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.direct-chat-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  position: relative;
}

.direct-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(36, 49, 61, 0.08);
}

.direct-chat-back-btn {
  display: none;
  min-width: 74px;
  height: 34px;
  color: var(--night);
  background: #eef4f7;
  border: 1px solid rgba(36, 49, 61, 0.14);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.direct-chat-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.direct-chat-header strong {
  display: block;
  margin-top: 4px;
  color: var(--night);
  font-size: 18px;
}

.direct-chat-messages {
  min-height: 0;
  max-height: min(62vh, 560px);
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbfc, #fff);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
}

.direct-chat-day-separator {
  display: grid;
  place-items: center;
  margin: 4px 0;
}

.direct-chat-day-separator span {
  padding: 4px 10px;
  color: #475569;
  background: #e9eef3;
  border: 1px solid rgba(71, 85, 105, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.direct-chat-message {
  max-width: min(620px, 90%);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.direct-chat-message.from-me {
  justify-self: end;
}

.direct-chat-message.from-them {
  justify-self: start;
}

.direct-chat-message-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(36, 49, 61, 0.12);
}

.direct-chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.direct-chat-message-bubble {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 12px;
}

.direct-chat-message.from-me .direct-chat-message-bubble {
  background: #e9fbf7;
  border: 1px solid rgba(103, 103, 236, 0.18);
}

.direct-chat-message.from-me .direct-chat-message-avatar {
  order: 2;
}

.direct-chat-message.from-me {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.direct-chat-message.from-them .direct-chat-message-bubble {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  box-shadow: 0 10px 22px rgba(36, 49, 61, 0.05);
}

.direct-chat-message.is-system {
  max-width: min(720px, 96%);
  grid-template-columns: minmax(0, 1fr);
  justify-self: center;
}

.direct-chat-message.is-system .direct-chat-message-bubble {
  justify-self: center;
  width: 100%;
  max-width: 100%;
}

.direct-chat-message.is-system .direct-chat-message-bubble p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.direct-chat-message.is-system .direct-chat-message-bubble time {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.direct-chat-message.is-system .direct-chat-message-bubble strong {
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.direct-chat-message.is-jumped .direct-chat-message-bubble {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55), 0 10px 22px rgba(36, 49, 61, 0.08);
}

.direct-chat-scroll-bottom {
  position: absolute;
  left: 18px;
  bottom: 90px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  border: 1px solid rgba(36, 49, 61, 0.14);
  background: #fff;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(36, 49, 61, 0.16);
  z-index: 5;
}

.direct-chat-message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.direct-chat-message-bubble b {
  color: var(--night);
  font-size: 12px;
}

.direct-chat-message-bubble time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.direct-chat-message-bubble p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.direct-chat-reply-preview {
  width: 100%;
  display: grid;
  gap: 2px;
  margin: 4px 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-right: 3px solid var(--primary-dark);
  background: rgba(36, 49, 61, 0.04);
  text-align: right;
  color: var(--ink);
  cursor: pointer;
}

.direct-chat-reply-preview small {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.direct-chat-reply-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.direct-chat-reply-btn {
  margin-top: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  min-width: 0;
  justify-self: end;
  cursor: pointer;
}

.direct-chat-reply-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.08);
}

.direct-chat-reply-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.direct-chat-reply-box button {
  min-width: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  padding: 0;
}

.direct-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#directChatForm {
  margin-bottom: 0;
  padding: 0;
}

#projectChatForm {
  margin: 0;
  padding: 0;
}

.direct-chat-form textarea {
  min-height: 50px;
  max-height: 110px;
  resize: none;
  border-radius: 10px;
  font-size: 13px;
}

.direct-chat-form button {
  min-width: 88px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 10px;
  font-weight: 900;
}

.direct-chat-actions {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 8px;
  align-self: start;
}

#directChatTaskBtn,
#projectChatTaskBtn,
#projectChatEmojiBtn,
#projectChatSendBtn,
#directChatEmojiBtn {
  min-width: 44px;
  padding: 0 10px;
  background: #eef4f7;
  color: var(--night);
}

#directChatTaskBtn {
  min-width: 78px;
  padding: 0 12px;
  border: 1px solid rgba(47, 94, 166, 0.2);
  background: #eef4ff;
  color: #2f5ea6;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#directChatTaskBtn:hover {
  background: #e2ebff;
}

#projectChatTaskBtn {
  min-width: 78px;
  padding: 0 12px;
  border: 1px solid rgba(47, 94, 166, 0.2);
  background: #eef4ff;
  color: #2f5ea6;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#projectChatTaskBtn:hover {
  background: #e2ebff;
}

.direct-chat-emoji-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.direct-chat-emoji-picker button {
  min-width: 0;
  min-height: 34px;
  background: #f8fbfc;
  color: var(--night);
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 8px;
  font-size: 16px;
}

.direct-chat-voice {
  display: grid;
  gap: 6px;
}

.direct-chat-voice audio {
  width: min(320px, 100%);
  height: 34px;
}

.direct-chat-voice small {
  color: var(--muted);
  font-size: 11px;
}

.direct-chat-form button:disabled,
.direct-chat-form textarea:disabled {
  cursor: default;
  opacity: 0.58;
}

.direct-chat-form small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.direct-chat-form small.error-message {
  color: var(--danger);
}

.direct-chat-composer {
  grid-column: 1 / -1;
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 14px;
}

.direct-chat-composer textarea {
  order: 2;
  flex: 1 1 auto;
  direction: rtl;
  min-height: 40px;
  height: 40px;
  max-height: 96px;
  padding: 9px 18px;
  overflow-y: auto;
  border-radius: 999px;
  line-height: 1.6;
}

.direct-chat-composer .direct-chat-actions {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: center;
}

.direct-chat-composer .direct-chat-actions button {
  min-width: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-size: 18px;
}

.direct-chat-composer #directChatEmojiBtn {
  background: transparent;
  color: #0f172a;
}

.direct-chat-composer #directChatSendBtn {
  width: 38px;
  height: 38px;
  overflow: hidden;
  text-indent: 0;
  font-size: 0;
  color: #fff;
  background: #7ea1ea;
  box-shadow: none;
  position: relative;
}

.direct-chat-composer #directChatSendBtn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-18deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat;
}

.direct-chat-composer #directChatSendBtn:disabled {
  background: #dbe5f5;
  color: #ffffff;
}

.direct-chat-composer #projectChatEmojiBtn {
  background: transparent;
  color: #0f172a;
}

.direct-chat-composer #projectChatSendBtn {
  width: 38px;
  height: 38px;
  overflow: hidden;
  text-indent: 0;
  font-size: 0;
  color: #fff;
  background: #7ea1ea;
  box-shadow: none;
  position: relative;
}

.direct-chat-composer #projectChatSendBtn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-18deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat;
}

.direct-chat-composer #projectChatSendBtn:disabled {
  background: #dbe5f5;
  color: #ffffff;
}

/* Chat UI Polish */
#directChatPanel .direct-chat-shell {
  gap: 16px;
}

#directChatPanel .direct-chat-members,
#directChatPanel .direct-chat-room {
  border-radius: 18px;
  border: 1px solid rgba(103, 103, 236, 0.16);
  box-shadow: 0 18px 40px rgba(21, 32, 54, 0.08);
}

#directChatPanel .direct-chat-members {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(103, 103, 236, 0.1) 0%, rgba(103, 103, 236, 0) 52%),
    #ffffff;
}

#directChatPanel .direct-chat-room {
  background:
    radial-gradient(110% 90% at 0% 0%, rgba(28, 201, 142, 0.08) 0%, rgba(28, 201, 142, 0) 52%),
    #ffffff;
  gap: 6px;
}

#directChatPanel .direct-chat-members > strong {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1px;
}

#directChatSidebarTabs {
  margin-bottom: 10px;
  padding: 3px;
  background: linear-gradient(180deg, #edf3f9 0%, #e6edf5 100%);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

#directChatSidebarTabs button {
  min-width: 84px;
  font-weight: 900;
  border: 0;
  box-shadow: none;
}

.direct-chat-member-list {
  padding-right: 2px;
}

.direct-chat-member {
  border-radius: 12px;
  padding: 11px 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.direct-chat-member:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(36, 49, 61, 0.1);
}

.direct-chat-member.active {
  background: linear-gradient(135deg, rgba(103, 103, 236, 0.15), rgba(28, 201, 142, 0.11));
  border-color: rgba(103, 103, 236, 0.3);
}

#directChatProjects .direct-chat-member {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(36, 49, 61, 0.06) !important;
  background-image: none !important;
  box-shadow: none !important;
}

#directChatProjects .direct-chat-member::before,
#directChatProjects .direct-chat-member::after {
  content: none !important;
}

#directChatProjects .direct-chat-member:hover,
#directChatProjects .direct-chat-member.active {
  border-top-color: rgba(103, 103, 236, 0.24) !important;
}

.direct-chat-header {
  padding: 8px 4px 14px;
}

.direct-chat-header-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.direct-chat-header-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #6767ec, #1cc98e);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(103, 103, 236, 0.22);
}

.direct-chat-header-avatar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #22c55e;
}

.direct-chat-header-copy {
  min-width: 0;
  text-align: right;
}

.direct-chat-header strong {
  font-size: 19px;
  margin-top: 0;
  line-height: 1.4;
}

.direct-chat-header-copy span {
  display: block;
  margin-top: 2px;
  color: #738097;
  font-size: 12px;
  font-weight: 700;
}

.direct-chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}

.direct-chat-header-actions button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(103, 103, 236, 0.14);
  border-radius: 50%;
  color: #64708a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(21, 32, 54, 0.05);
}

.direct-chat-header-actions button:hover {
  color: #5353d6;
  background: #f4f6ff;
  border-color: rgba(103, 103, 236, 0.28);
}

.direct-chat-messages {
  border-radius: 16px;
  border-color: rgba(103, 103, 236, 0.14);
  background:
    linear-gradient(180deg, rgba(103, 103, 236, 0.06), rgba(103, 103, 236, 0) 120px),
    linear-gradient(180deg, #f8fbff, #ffffff);
}

.direct-chat-message-bubble {
  border-radius: 14px;
}

.direct-chat-message.from-me .direct-chat-message-bubble {
  background: linear-gradient(135deg, #e9fbf7, #def7ef);
  border-color: rgba(24, 163, 117, 0.26);
}

.direct-chat-message.from-them .direct-chat-message-bubble {
  border-color: rgba(103, 103, 236, 0.18);
}

.direct-chat-message-bubble p {
  line-height: 1.95;
}

.direct-chat-form textarea {
  border-radius: 12px;
  border: 1px solid rgba(103, 103, 236, 0.18);
  background: #fbfdff;
}

.direct-chat-form textarea:focus {
  border-color: rgba(103, 103, 236, 0.5);
  box-shadow: 0 0 0 3px rgba(103, 103, 236, 0.12);
}

#directChatSendBtn {
  background: linear-gradient(135deg, #6767ec, #1cc98e);
  box-shadow: 0 12px 24px rgba(103, 103, 236, 0.22);
}

#directChatEmojiBtn {
  border: 1px solid rgba(103, 103, 236, 0.2);
  background: #f2f6fb;
}

#projectChatSendBtn {
  background: linear-gradient(135deg, #6767ec, #1cc98e);
  box-shadow: 0 12px 24px rgba(103, 103, 236, 0.22);
}

#projectChatEmojiBtn {
  border: 1px solid rgba(103, 103, 236, 0.2);
  background: #f2f6fb;
}

.direct-chat-emoji-picker {
  padding: 8px;
  border: 1px solid rgba(103, 103, 236, 0.16);
  border-radius: 12px;
  background: #ffffff;
}

.direct-message-toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  gap: 4px;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 16px;
  color: #fff;
  background: var(--night);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(23, 36, 47, 0.24);
  animation: toast-in 0.22s ease-out;
}

.direct-message-toast b {
  font-size: 13px;
}

.direct-message-toast span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.direct-message-toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.page-panel#notesPanel .page-title span {
  font-size: 12px;
}

.page-panel#notesPanel .page-title h1 {
  margin: 4px 0 6px;
  font-size: 26px;
  line-height: 1.4;
}

/* Notes Panel - Modern SaaS Styling */
.notes-panel {
  display: none;
  padding: 32px;
}

.notes-panel.active {
  display: block;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.notes-header-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.32);
}

.notes-header-icon svg {
  width: 26px;
  height: 26px;
}

.notes-header h1 {
  color: #16243c;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
}

.notes-header p {
  margin-top: 6px;
  color: #6b809d;
  font-size: 14px;
}

.notes-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  direction: ltr;
}

.notes-shell .notes-grid {
  order: 1;
  direction: rtl;
}

.notes-shell .note-composer {
  order: 2;
  direction: rtl;
}

.note-composer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(31, 175, 104, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.06), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 255, 252, 0.96));
  box-shadow:
    0 24px 60px rgba(25, 39, 61, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.note-composer::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 175, 104, 0.14), transparent 68%);
  pointer-events: none;
}

.note-composer::after {
  content: "";
  position: absolute;
  inset: -40px auto auto -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
  pointer-events: none;
}

.note-composer-main,
.note-composer-side {
  position: relative;
  display: grid;
  gap: 14px;
}

.note-composer-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.note-composer-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.08);
}

.note-composer-header-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.note-composer-header-copy span {
  color: #1faf68;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.note-composer-header-copy strong {
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}

.note-composer-header-copy p {
  color: #6b809d;
  font-size: 13px;
  line-height: 1.8;
}

.note-composer-close {
  flex: none;
  align-self: start;
}

.note-composer-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.note-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(229, 236, 245, 0.95);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2a37;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(25, 39, 61, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.note-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.26);
  box-shadow: 0 12px 22px rgba(25, 39, 61, 0.08);
}

.note-icon-btn svg {
  width: 17px;
  height: 17px;
}

.note-icon-btn--star {
  color: #f59e0b;
}

.note-composer-meta-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.note-composer-chip {
  flex: 1 1 180px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(229, 236, 245, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(25, 39, 61, 0.04);
  min-width: 180px;
}

.note-composer-chip > span {
  color: #6b809d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: none;
}

.note-composer-chip--color {
  flex: 1 1 280px;
  min-width: 240px;
}

.note-composer-chip--color .note-color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.note-composer-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 236, 245, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 24px rgba(25, 39, 61, 0.04);
  flex-wrap: wrap;
}

.note-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-toolbar-group--select {
  flex: 1 1 170px;
}

.note-toolbar-group--spacer {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.note-toolbar-btn {
  width: 44px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(229, 236, 245, 0.95);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  color: #1f2a37;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(25, 39, 61, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.note-toolbar-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.26);
  box-shadow: 0 12px 22px rgba(25, 39, 61, 0.08);
}

.note-toolbar-btn svg {
  width: 18px;
  height: 18px;
  color: #0f172a;
}

.note-toolbar-select-wrap {
  display: inline-flex;
  width: 100%;
}

.note-toolbar-select {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(229, 236, 245, 0.95);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  box-shadow: 0 8px 18px rgba(25, 39, 61, 0.04);
}

.note-toolbar-select:focus {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.note-toolbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(203, 213, 225, 0.9);
  flex: none;
}

.note-toolbar-hint {
  color: #6b809d;
  font-size: 12px;
  font-weight: 700;
}

.note-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: #607086;
  font-size: 12px;
}

.note-editor-stats {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.note-editor-save-state {
  color: #15803d;
  font-weight: 700;
}

.note-composer-title-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.note-composer-icon {
  position: absolute;
  inset-inline-start: 16px;
  width: 19px;
  height: 19px;
  color: #10B981;
  pointer-events: none;
  flex: none;
}

.note-composer-main input {
  width: 100%;
  min-height: 62px;
  padding: 16px 18px 16px 54px;
  border: 1.5px solid rgba(16, 185, 129, 0.14);
  border-radius: 18px;
  font-size: 18px;
  font-weight: 900;
  color: #16243c;
  background: linear-gradient(180deg, #ffffff, #fbfffe);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.note-composer-main input::placeholder {
  color: #93a3b9;
}

.note-composer-main input:focus {
  outline: none;
  border-color: #10B981;
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.12),
    0 16px 32px rgba(16, 185, 129, 0.08);
  background: #fff;
  transform: translateY(-1px);
}

.note-editor-content {
  width: 100%;
  min-height: 560px;
  padding: 18px 20px;
  border: 1px solid rgba(229, 236, 245, 0.98);
  border-radius: 22px;
  line-height: 2;
  font-size: 15px;
  color: #16243c;
  background: #fff;
  font-family: inherit;
  resize: vertical;
  overflow: auto;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.note-editor-content[contenteditable="true"] {
  white-space: pre-wrap;
}

.note-editor-content[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #93a3b9;
  pointer-events: none;
}

.note-editor-content a {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.note-editor-content code {
  padding: 0.12em 0.45em;
  border-radius: 0.55em;
  background: rgba(15, 23, 42, 0.07);
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.note-editor-content blockquote {
  margin: 14px 0;
  padding: 14px 18px;
  border-inline-start: 4px solid rgba(245, 158, 11, 0.55);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7e6, #fff9ef);
  color: #4b5563;
}

.note-editor-content h1,
.note-editor-content h2,
.note-editor-content h3 {
  margin: 0.65em 0 0.35em;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
}

.note-editor-content h1 { font-size: 1.9em; }
.note-editor-content h2 { font-size: 1.45em; }
.note-editor-content h3 { font-size: 1.2em; }

.note-editor-content ul,
.note-editor-content ol {
  margin: 0.7em 0;
  padding-inline-start: 1.3em;
}

.note-editor-content li {
  margin: 0.35em 0;
}

.note-editor-content pre {
  margin: 14px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
  direction: ltr;
  text-align: left;
}

.note-editor-content::placeholder {
  color: #93a3b9;
}

.note-editor-content:focus {
  border-color: #10B981;
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.12),
    0 16px 32px rgba(16, 185, 129, 0.08);
}

.note-composer-side {
  gap: 12px;
  align-content: start;
  padding-inline-start: 0;
  border-inline-start: 0;
}

.note-composer-side .note-composer-section {
  min-width: 0;
}

.note-composer-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(229, 236, 245, 0.92);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
  box-shadow: 0 10px 24px rgba(25, 39, 61, 0.04);
}

.note-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f1729;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: default;
  text-transform: capitalize;
}

.note-section-label svg {
  width: 16px;
  height: 16px;
  color: #1faf68;
  flex: none;
  stroke-width: 2;
}

.note-select {
  width: 100%;
  min-height: 34px;
  padding: 0 28px 0 4px;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  color: #16243c;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, transform 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2.3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0 center;
}

.note-select:focus {
  outline: none;
  color: #111827;
  transform: translateY(-1px);
}

.note-color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.note-color-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  overflow: hidden;
}

.note-color-btn::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.note-color-btn:hover {
  transform: translateY(-2px) scale(1.08);
  filter: brightness(1.1);
}

.note-color-btn.active {
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(103, 103, 236, 0.08);
  box-shadow: 0 0 0 4px rgba(103, 103, 236, 0.15);
  transform: translateY(-2px) scale(1.06);
}

[data-note-color="mint"],
.note-mint {
  background: #ececff;
}

.note-color-btn[data-note-color="mint"]::before {
  background: #6767ec;
}

[data-note-color="amber"],
.note-amber {
  background: #fff3cb;
}

.note-color-btn[data-note-color="amber"]::before {
  background: #f4b400;
}

[data-note-color="rose"],
.note-rose {
  background: #ffe8ee;
}

.note-color-btn[data-note-color="rose"]::before {
  background: #fb7185;
}

[data-note-color="sky"],
.note-sky {
  background: #e5f3ff;
}

.note-color-btn[data-note-color="sky"]::before {
  background: #38bdf8;
}

[data-note-color="violet"],
.note-violet {
  background: #f0e9ff;
}

.note-color-btn[data-note-color="violet"]::before {
  background: #8b5cf6;
}

[data-note-color="paper"],
.note-paper {
  background: #fffdf5;
}

.note-color-btn[data-note-color="paper"]::before {
  background: #94a3b8;
}

.note-checklist-builder {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
}

.note-checklist-builder input {
  height: 46px;
  padding: 12px 14px;
  border: 1.5px solid #e5eaf1;
  border-radius: 12px;
  font-size: 14px;
  color: #0f1729;
  background: white;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
}

.note-checklist-builder input::placeholder {
  color: #93a3b9;
  font-weight: 500;
}

.note-checklist-builder input:focus {
  outline: none;
  border-color: #1faf68;
  box-shadow: 0 0 0 3px rgba(31, 175, 104, 0.1);
}

.note-checklist-btn {
  height: 46px;
  width: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  font-weight: 600;
  font-size: 18px;
}

.note-checklist-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.note-checklist-btn:active {
  transform: translateY(0);
}

.note-checklist-btn svg {
  width: 20px;
  height: 20px;
}

.note-checklist-list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-checklist-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: #f8fbfa;
  border: 1.5px solid #e5eaf1;
  border-radius: 10px;
  font-size: 13px;
  color: #0f1729;
  font-weight: 500;
  transition: all 0.2s ease;
}

.note-checklist-list li:hover {
  background: #f0fdf4;
  border-color: rgba(31, 175, 104, 0.3);
}

.note-checklist-list button {
  color: #d63a48;
  background: rgba(214, 58, 72, 0.08);
  border: 1.5px solid rgba(214, 58, 72, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: none;
}

.note-checklist-list button:hover {
  background: #d63a48;
  color: white;
  border-color: #d63a48;
}

.note-message-box {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.05);
  font-size: 12px;
  font-weight: 800;
  color: #10B981;
  text-align: right;
  display: flex;
  align-items: center;
  line-height: 1.8;
}

.note-message-box.error {
  border-color: rgba(217, 79, 92, 0.16);
  background: rgba(217, 79, 92, 0.06);
  color: #d94f5c;
}

.note-composer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  justify-content: space-between;
}

.note-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 240px;
  min-height: 54px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, #10B981, #059669);
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 18px 26px rgba(16, 185, 129, 0.26);
}

.note-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 30px rgba(16, 185, 129, 0.3);
  filter: saturate(1.03);
}

.note-save-btn svg {
  width: 18px;
  height: 18px;
}

.note-save-btn--compact {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.18);
}

.note-save-btn--compact svg {
  width: 16px;
  height: 16px;
}

.note-cancel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 18px;
  border: 1.5px solid rgba(16, 185, 129, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: #607089;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.note-cancel-btn:hover {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.26);
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(25, 39, 61, 0.05);
}

.note-cancel-btn svg {
  width: 18px;
  height: 18px;
}

.notes-grid {
  display: grid;
  gap: 18px;
}

.notes-grid--columns {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.note-column {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  min-width: 0;
  overflow: hidden;
}

.note-column-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.note-column-head span {
  display: block;
  margin-bottom: 4px;
  color: #7b8ba1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.note-column-head strong {
  display: block;
  color: #16243c;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.note-column-head b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.note-column-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.note-column-list > .note-card {
  width: 100%;
  min-width: 0;
}

.notes-grid--columns .empty-state {
  grid-column: 1 / -1;
  padding: 60px 40px;
  text-align: center;
  color: #9aa9bb;
  font-size: 15px;
  background: rgba(16, 185, 129, 0.02);
  border-radius: 16px;
  border: 1px dashed rgba(16, 185, 129, 0.2);
}

.note-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 200px;
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.note-card-head,
.note-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  width: 100%;
}

.note-card-head,
.note-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.note-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  flex-wrap: wrap;
}

.note-delete-btn,
.note-edit-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.note-delete-btn {
  color: #d94f5c;
  background: rgba(217, 79, 92, 0.1);
}

.note-delete-btn:hover {
  background: #d94f5c;
  color: white;
  transform: translateY(-2px);
}

.note-edit-btn {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.note-edit-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

.note-card-head strong {
  color: #16243c;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.note-card p {
  color: #5a6b7d;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.note-card-checklist {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-card-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note-card-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s ease;
  min-width: 0;
}

.note-card-checklist label:hover {
  background: rgba(16, 185, 129, 0.05);
}

.note-card-checklist input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.note-card-checklist span {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d4dce6;
  border-radius: 5px;
  background: white;
  transition: all 0.2s ease;
}

.note-card-checklist input:checked + span {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: #059669;
}

.note-card-checklist b {
  color: #16243c;
  font-size: 13px;
  font-weight: 500;
}

.note-card-checklist input:checked ~ b {
  color: #9aa9bb;
  text-decoration: line-through;
}
  line-height: 1.7;
}

.note-card-checklist li.done b {
  color: var(--muted);
  text-decoration: line-through;
}

.note-card-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(36, 49, 61, 0.08);
}

.note-card-foot span,
.note-card-foot small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.note-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-card-foot span,
.note-card-foot small {
  color: #9aa9bb;
  font-size: 12px;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .notes-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 1024px) {
  .notes-shell {
    grid-template-columns: 1fr;
  }

  .notes-shell .notes-grid,
  .notes-shell .note-composer {
    order: initial;
  }

  .note-composer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .note-composer-body,
  .note-composer-meta-row {
    grid-template-columns: 1fr;
  }

  .note-composer-meta-row {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .note-composer-side {
    border-left: none;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    padding-left: 0;
    padding-top: 16px;
  }

  .note-color-picker {
    flex-wrap: wrap;
  }

  .note-composer-chip--color .note-color-picker {
    flex-wrap: wrap;
  }

  .notes-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .notes-panel {
    padding: 20px;
  }

  .notes-header {
    margin-bottom: 24px;
  }

  .notes-header-icon {
    width: 44px;
    height: 44px;
  }

  .notes-header-icon svg {
    width: 22px;
    height: 22px;
  }

  .notes-header h1 {
    font-size: 21px;
  }

  .note-composer {
    padding: 18px;
    gap: 14px;
  }

  .note-composer-header {
    gap: 12px;
  }

  .note-composer-header-copy strong {
    font-size: 18px;
  }

  .note-composer-main input {
    min-height: 50px;
    font-size: 15px;
  }

  .note-editor-content {
    min-height: 220px;
    font-size: 14px;
  }

  .note-color-picker {
    flex-wrap: wrap;
    gap: 8px;
  }

  .note-color-btn {
    min-height: 40px;
  }

  .note-composer-chip {
    padding: 12px;
    min-width: 0;
    width: 100%;
  }

  .notes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .note-card {
    min-height: auto;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .notes-panel {
    padding: 16px;
  }

  .note-composer {
    padding: 14px;
  }

  .note-composer-header {
    flex-direction: column;
    align-items: stretch;
  }

  .note-composer-header-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .note-save-btn,
  .note-cancel-btn {
    width: 100%;
    min-height: 46px;
    font-size: 13px;
  }

  .note-composer-actions {
    flex-direction: column;
    gap: 10px;
  }

  .note-checklist-builder {
    grid-template-columns: 1fr 40px;
  }

  .note-checklist-btn {
    width: 40px;
    height: 40px;
  }

  .note-card-head strong {
    font-size: 14px;
  }

  .note-card p {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .page-panel#notesPanel .page-title h1 {
    font-size: 22px;
  }

  .page-panel#notesPanel .page-title p {
    font-size: 12px;
  }

  .notes-shell {
    padding: 0 14px 20px;
  }

  .note-composer,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .note-composer {
    padding: 12px;
  }

  .note-composer-toolbar {
    padding: 10px;
  }

  .note-toolbar-group {
    gap: 6px;
  }

  .note-toolbar-divider {
    display: none;
  }

  .note-toolbar-hint {
    display: none;
  }

  .note-toolbar-btn {
    width: 38px;
    height: 36px;
  }

  .note-toolbar-select {
    min-height: 36px;
    font-size: 12px;
  }

  .note-editor-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .note-composer-main input {
    font-size: 14px;
  }

  .note-editor-content {
    min-height: 200px;
  }

  .note-card {
    min-height: 0;
  }
}

#accountPanel {
  padding: 0 32px 32px;
}

#accountPanel .page-title {
  padding-left: 0;
  padding-right: 0;
}

#accountPanel .page-title p {
  max-width: 720px;
  color: #667689;
  line-height: 1.9;
}

.account-v2-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.account-v2-main,
.account-v2-sidebar {
  display: grid;
  gap: 16px;
}

.account-v2-card,
.account-v2-tabs {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(12px);
}

.account-v2-sidebar {
  position: sticky;
  top: 24px;
}

.account-v2-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px;
  gap: 8px;
}

.account-v2-tab {
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: #516173;
  font-size: 13px;
  font-weight: 900;
  transition: 0.2s ease;
}

.account-v2-tab.active {
  color: #4f46e5;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.03));
  border-color: rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 -2px 0 #6d5efc;
}

.account-v2-pane {
  display: none;
}

.account-v2-pane.active {
  display: block;
}

.account-v2-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.account-v2-subcard {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: none;
}

.account-v2-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-v2-card-head.centered {
  justify-content: center;
  text-align: center;
}

.account-v2-card-head.compact h2 {
  margin-bottom: 0;
}

.account-v2-card-head h2 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 24px;
}

.account-v2-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.9;
}

.account-v2-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-plan-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(109, 94, 252, 0.18), transparent 34%),
    linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
  border: 1px solid rgba(109, 94, 252, 0.12);
}

.account-plan-hero-copy {
  display: grid;
  gap: 4px;
}

.account-plan-hero-copy h3 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.account-plan-hero-copy p {
  margin: 0;
  color: #5b6b80;
  font-size: 13px;
  line-height: 1.8;
}

.account-plan-hero-badge {
  min-width: 124px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6d5efc, #4f46e5);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.18);
}

.account-plan-hero-badge strong,
.account-plan-hero-badge small {
  display: block;
}

.account-plan-hero-badge strong {
  font-size: 19px;
  font-weight: 900;
}

.account-plan-hero-badge small {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.account-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.subscription-page-shell {
  grid-template-columns: minmax(0, 1fr);
}

.subscription-page-shell .account-v2-sidebar {
  position: static;
}

.subscription-plan-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.account-plan-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.account-plan-card.is-current {
  background:
    radial-gradient(circle at top right, rgba(109, 94, 252, 0.14), transparent 36%),
    linear-gradient(180deg, #f8f9ff, #eef2ff);
  border-color: rgba(109, 94, 252, 0.18);
}

.account-plan-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.account-plan-card strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.account-plan-card p {
  margin: 0;
  color: #5b6b80;
  font-size: 13px;
  line-height: 1.8;
}

.account-plan-card-contact .submit-btn {
  margin-top: 8px;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 1500px) {
  .subscription-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .subscription-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#subscriptionPanel {
  background:
    radial-gradient(circle at top left, rgba(96, 125, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 191, 0, 0.18), transparent 24%),
    linear-gradient(180deg, #eef3ff 0%, #f7f9ff 50%, #eef2ff 100%);
}

#subscriptionPanel .subscription-page {
  display: grid;
  gap: 22px;
  padding: 0 32px 32px;
  min-width: 0;
  overflow-x: hidden;
}

#subscriptionPanel .subscription-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

#subscriptionPanel .subscription-hero-copy h1 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1.35;
}

#subscriptionPanel .subscription-hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #5d6f88;
  line-height: 1.9;
  font-size: 14px;
}

#subscriptionPanel .subscription-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

#subscriptionPanel .subscription-hero-note {
  min-width: 196px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 8px;
  text-align: center;
}

#subscriptionPanel .subscription-hero-note strong {
  font-size: 28px;
  font-weight: 900;
  color: #111827;
}

#subscriptionPanel .subscription-hero-note span {
  color: #64748b;
  line-height: 1.8;
  font-size: 13px;
}

#subscriptionPanel .subscription-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

#subscriptionPanel .subscription-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 380px;
  padding: 22px 20px 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  min-width: 0;
}

#subscriptionPanel .subscription-card.is-featured {
  border-color: rgba(17, 24, 39, 0.36);
  box-shadow: 0 20px 55px rgba(17, 24, 39, 0.12);
  transform: translateY(-2px);
}

#subscriptionPanel .subscription-card.is-current {
  outline: 2px solid rgba(37, 99, 235, 0.42);
}

#subscriptionPanel .subscription-card-badge {
  align-self: flex-end;
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

#subscriptionPanel .subscription-card-badge-active {
  background: #1663ff;
  color: #ffffff;
  border-color: #1663ff;
}

#subscriptionPanel .subscription-card h2 {
  margin: 6px 0 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 900;
}

#subscriptionPanel .subscription-card-price {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

#subscriptionPanel .subscription-card-features {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

#subscriptionPanel .subscription-card-features li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #172033;
  font-size: 13px;
  line-height: 1.8;
}

#subscriptionPanel .subscription-card-features strong {
  color: #111827;
}

#subscriptionPanel .subscription-card-secondary-btn,
#subscriptionPanel .subscription-card-primary-btn,
#subscriptionPanel .subscription-compare-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#subscriptionPanel .subscription-card-secondary-btn {
  margin-top: auto;
  padding: 14px 16px;
  background: #dfe4ed;
  color: #111827;
}

#subscriptionPanel .subscription-card-primary-btn {
  padding: 14px 16px;
  background: linear-gradient(135deg, #ffbf00, #ffd65c);
  color: #111827;
  box-shadow: 0 14px 32px rgba(255, 191, 0, 0.24);
}

#subscriptionPanel .subscription-card-contact .subscription-card-primary-btn {
  background: linear-gradient(135deg, #1f6fff, #3c84ff);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(31, 111, 255, 0.24);
}

#subscriptionPanel .subscription-compare-card {
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

#subscriptionPanel .subscription-mobile-features {
  display: none;
  gap: 12px;
}

#subscriptionPanel .subscription-mobile-plan {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

#subscriptionPanel .subscription-mobile-plan summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

#subscriptionPanel .subscription-mobile-plan summary::-webkit-details-marker {
  display: none;
}

#subscriptionPanel .subscription-mobile-plan-name {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

#subscriptionPanel .subscription-mobile-plan-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff6dc;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

#subscriptionPanel .subscription-mobile-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

#subscriptionPanel .subscription-mobile-plan-grid div {
  padding: 10px 14px;
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
  line-height: 1.8;
}

#subscriptionPanel .subscription-mobile-plan-grid div:nth-child(odd) {
  background: #fff7e5;
  font-weight: 900;
  color: #111827;
}

#subscriptionPanel .subscription-mobile-plan-grid div:nth-child(even) {
  color: #1f2937;
}

#subscriptionPanel .subscription-mobile-plan-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: #fffdf7;
}

#subscriptionPanel .subscription-mobile-plan-price {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

#subscriptionPanel .subscription-mobile-plan-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffbf00, #ffd65c);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(255, 191, 0, 0.16);
}

#subscriptionPanel .subscription-mobile-plan-action-contact {
  background: linear-gradient(135deg, #1f6fff, #3c84ff);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 111, 255, 0.18);
}

#subscriptionPanel .subscription-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 16px;
}

#subscriptionPanel .subscription-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
  padding: 0;
  text-align: right;
  cursor: pointer;
}

#subscriptionPanel .subscription-collapse-btn strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff6dc;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}

#subscriptionPanel .subscription-compare-card.is-open .subscription-collapse-btn strong {
  transform: rotate(180deg);
}

#subscriptionPanel .subscription-compare-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  max-width: 100%;
  min-width: 0;
}

#subscriptionPanel .subscription-compare-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  direction: rtl;
}

#subscriptionPanel .subscription-compare-table thead th {
  padding: 14px 16px;
  background: #f8fbff;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

#subscriptionPanel .subscription-compare-table tbody th,
#subscriptionPanel .subscription-compare-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  color: #1f2937;
  font-size: 14px;
}

#subscriptionPanel .subscription-compare-table tbody th {
  text-align: right;
  font-weight: 900;
  background: #fff7e5;
  color: #111827;
}

#subscriptionPanel .subscription-compare-table tbody tr:nth-child(even) td,
#subscriptionPanel .subscription-compare-table tbody tr:nth-child(even) th {
  background: #f8fbff;
}

#subscriptionPanel .subscription-compare-table tbody tr:nth-child(odd) td {
  background: #fffdf6;
}

#subscriptionPanel .subscription-compare-table tbody tr:last-child td,
#subscriptionPanel .subscription-compare-table tbody tr:last-child th {
  background: #ffe08f;
}

#subscriptionPanel .subscription-compare-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  width: 100%;
  border-radius: 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffbf00, #ffd65c);
  color: #111827;
  box-shadow: 0 14px 32px rgba(255, 191, 0, 0.18);
}

#subscriptionPanel .subscription-compare-table tfoot th,
#subscriptionPanel .subscription-compare-table tfoot td {
  padding: 14px 16px;
  background: #fff6dc;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 1px solid rgba(148, 163, 184, 0.16);
}

#subscriptionPanel .subscription-compare-table tfoot th {
  text-align: right;
  font-weight: 900;
  color: #111827;
}

#subscriptionPanel .subscription-compare-table tfoot td {
  padding: 12px 12px;
}

@media (max-width: 1600px) {
  #subscriptionPanel .subscription-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  #subscriptionPanel .subscription-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  #subscriptionPanel .subscription-page {
    padding: 0 12px 18px;
  }

  #subscriptionPanel .subscription-hero {
    flex-direction: column;
    align-items: stretch;
  }

  #subscriptionPanel .subscription-hero-copy h1 {
    font-size: 24px;
  }

  #subscriptionPanel .subscription-hero-note {
    min-width: 0;
  }

  #subscriptionPanel .subscription-cards {
    grid-template-columns: 1fr;
  }

  #subscriptionPanel .subscription-card {
    min-height: 0;
  }

  #subscriptionPanel .subscription-mobile-features {
    display: grid;
  }

  #subscriptionPanel .subscription-compare-card {
    display: none;
  }
}

.account-v2-profile-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.14), transparent 40%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.account-v2-profile-main {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.account-avatar-preview {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #6d5efc, #4f46e5);
  background-size: cover;
  background-position: center;
  border: 6px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  box-shadow: 0 18px 44px rgba(79, 70, 229, 0.2);
  font-size: 36px;
  font-weight: 900;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ede9fe, #eef2ff);
  color: #5b48f3;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.account-v2-profile-main > strong {
  color: var(--night);
  font-size: 24px;
  line-height: 1.4;
}

.account-v2-profile-main > span,
.account-v2-profile-main > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.account-v2-profile-main > p {
  max-width: 240px;
}

.account-summary-list {
  display: grid;
  gap: 10px;
}

.account-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
}

.account-summary-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.account-summary-row strong {
  color: #0f172a;
  font-size: 13px;
  text-align: left;
}

.account-v2-card .field {
  display: grid;
  gap: 6px;
}

.account-v2-card .field label {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.account-v2-card .field input,
.account-v2-card .field textarea,
.account-v2-card .field select,
.account-birthdate-field {
  border-radius: 16px;
}

.account-v2-card .field input,
.account-v2-card .field textarea,
#accountAvatarFileInput {
  border: 1px solid #dde6f1;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  min-height: 52px;
  padding: 0 16px;
}

.account-v2-card .field input:focus,
.account-v2-card .field textarea:focus,
#accountAvatarFileInput:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.account-v2-card textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.8;
  padding: 14px 16px;
}

.account-upload-field {
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed rgba(99, 102, 241, 0.28);
  border-radius: 18px;
}

#accountAvatarFileInput {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12px;
}

.account-actions {
  justify-content: flex-end;
}

.account-message {
  margin: 0;
}

.account-v2-settings-list,
.account-devices-list {
  display: grid;
  gap: 12px;
}

.account-v2-setting-row,
.account-device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.account-v2-setting-row strong,
.account-device-item strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
}

.account-v2-setting-row p,
.account-device-item p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.8;
}

.account-v2-state-chip,
.account-device-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.account-v2-state-chip.is-active,
.account-device-badge.is-current {
  background: #e0f2fe;
  color: #0369a1;
}

.account-device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.account-device-meta span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.account-device-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.account-device-remove-btn {
  min-width: 110px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 12px;
  background: #fff5f5;
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
}

.account-device-remove-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.account-device-empty,
.account-v2-empty-card {
  text-align: center;
}

.account-v2-empty-card h2 {
  margin: 6px 0;
  color: #0f172a;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 0 32px 32px;
}

.admin-menu,
.admin-content {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(42, 62, 82, 0.08);
}

.admin-menu {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.admin-menu-item {
  min-height: 40px;
  padding: 0 12px;
  text-align: right;
  color: #465464;
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.admin-menu-item.active {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.admin-content {
  min-height: 360px;
  padding: 16px;
}

.admin-pane {
  display: none;
  min-height: 320px;
  border: 1px dashed rgba(36, 49, 61, 0.2);
  border-radius: 10px;
}

.admin-pane.active {
  display: block;
}

.admin-settings-form {
  display: grid;
  gap: 12px;
  max-width: 760px;
  padding: 10px;
}

.admin-settings-form h3 {
  margin: 0;
  color: #1f2f46;
  font-size: 18px;
}

.admin-settings-form p {
  margin: 0;
  color: #5f748d;
  font-size: 13px;
}

.admin-theme-options {
  display: grid;
  gap: 10px;
}

.admin-theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

.admin-theme-option b {
  display: block;
  color: #1f2f46;
  font-size: 14px;
}

.admin-theme-option small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.admin-font-field {
  display: grid;
  gap: 10px;
}

.admin-font-field > label {
  color: #1f2f46;
  font-size: 14px;
  font-weight: 800;
}

.admin-font-options {
  display: grid;
  gap: 10px;
}

.admin-font-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

.admin-font-option b {
  display: block;
  color: #1f2f46;
  font-size: 14px;
}

.admin-font-option small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.admin-deadline-card-field {
  display: grid;
  gap: 10px;
}

.admin-deadline-card-field > label {
  color: #1f2f46;
  font-size: 14px;
  font-weight: 800;
}

.admin-deadline-card-options {
  display: grid;
  gap: 10px;
}

.admin-deadline-card-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

.admin-deadline-card-option b {
  display: block;
  color: #1f2f46;
  font-size: 14px;
}

.admin-deadline-card-option small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.admin-settings-actions button {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary-dark);
  font-weight: 800;
}

.admin-settings-danger {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 1px solid rgba(225, 29, 72, 0.18);
}

.admin-errors-panel {
  max-width: none;
}

.admin-errors-summary {
  display: grid;
  gap: 10px;
}

.admin-errors-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-errors-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #dbe4ef;
  background: #f8fbff;
  color: #1f2f46;
  font-size: 12px;
  font-weight: 800;
}

.admin-errors-file-pill small {
  color: #64748b;
  font-weight: 700;
}

.admin-errors-toolbar {
  display: flex;
  justify-content: flex-end;
}

.admin-errors-toolbar button {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 800;
}

.admin-errors-view {
  margin: 0;
  min-height: 320px;
  max-height: 620px;
  overflow: auto;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-errors-loading {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.admin-logo-settings {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.admin-logo-preview-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.admin-logo-preview,
.admin-logo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 24px;
}

.admin-logo-preview {
  object-fit: cover;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.14);
}

.admin-logo-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #6366f1;
  font-size: 20px;
  font-weight: 900;
  border: 1px dashed rgba(99, 102, 241, 0.26);
}

.admin-users-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-users-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-users-summary span {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.08);
  color: #3b4654;
  font-size: 13px;
  font-weight: 700;
}

.admin-users-summary b {
  color: #1f2e43;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.admin-users-table th,
.admin-users-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(36, 49, 61, 0.1);
  font-size: 13px;
}

.admin-users-table th {
  color: #24313d;
  background: #f8fbfc;
  font-weight: 900;
}

.admin-users-table td {
  color: #3b4654;
  font-weight: 700;
}

.admin-users-table td button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #dbe4ef;
  background: #fff;
  color: #1f2f46;
  font-size: 12px;
}

.admin-user-plan-select {
  min-width: 110px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #0f172a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.media-shell {
  gap: 16px;
  padding: 22px 16px 16px;
}

.media-hero-card,
.media-upload-card,
.media-list-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.media-hero-card {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 202, 58, 0.16), transparent 32%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.98));
}

.media-hero-copy h2 {
  margin: 4px 0 8px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.4;
}

.media-hero-copy p {
  margin: 0;
  color: #52617a;
  font-size: 13px;
  line-height: 1.9;
}

.media-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 202, 58, 0.18);
  color: #9a6b00;
  font-size: 12px;
  font-weight: 800;
}

.media-hero-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.media-stat span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.media-stat strong {
  color: #0f172a;
  font-size: 18px;
}

.media-quota-track {
  margin-top: 14px;
  height: 14px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.media-quota-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #38bdf8 45%, #22c55e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.media-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.media-upload-card,
.media-list-card {
  padding: 18px;
}

.media-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.media-card-head strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.media-card-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.8;
}

.media-card-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 202, 58, 0.16);
  color: #9a6b00;
  font-size: 12px;
  font-weight: 800;
}

.media-upload-card form {
  display: grid;
  gap: 10px;
}

.media-upload-card input[type="file"] {
  min-height: 58px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 14px;
  background: #f8fbff;
  color: #334155;
}

.media-upload-card input[type="file"]::file-selector-button {
  margin-left: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.media-upload-card button {
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.media-upload-card small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}

.media-list-head {
  margin-bottom: 14px;
}

.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.media-item {
  display: grid;
  grid-template-rows: 160px auto auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.media-thumb {
  width: 100%;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  display: grid;
  place-items: center;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.media-thumb-fallback {
  color: #1e293b;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #eef4fb, #dfeaf6);
}

.media-item-info {
  min-width: 0;
}

.media-item b {
  color: #0f172a;
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-item small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
}

.media-item-actions {
  display: flex;
  justify-content: flex-start;
}

.media-item a,
.media-item button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  font-size: 12px;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

@media (max-width: 900px) {
  .media-hero-stats,
  .media-top-row {
    grid-template-columns: 1fr;
  }

  .media-card-head {
    flex-direction: column;
  }
}

.media-preview-modal-card {
  width: min(960px, 96vw);
}

.media-preview-body {
  margin-top: 8px;
  min-height: 320px;
  max-height: 72vh;
  display: grid;
  place-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.media-preview-body img,
.media-preview-body video,
.media-preview-body iframe {
  width: 100%;
  height: 72vh;
  max-height: 72vh;
  border: 0;
  object-fit: contain;
  background: #fff;
}

.media-preview-body audio {
  width: min(640px, 92%);
}

#dashboardPanel.modern-dashboard {
  padding: 14px 20px 24px;
  background: #f1f5f9;
}

#dashboardPanel .dashboard-modern-head h1 {
  margin: 0;
  font-size: 30px;
  color: #0f172a;
}

#dashboardPanel .dashboard-modern-head p {
  margin: 6px 0 0;
  color: #4a5d74;
  font-size: 14px;
  font-weight: 500;
}

#dashboardPanel .dashboard-modern-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

#dashboardPanel .modern-kpi {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #dbe2ea;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#dashboardPanel .modern-kpi span {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 700;
}

#dashboardPanel .modern-kpi strong {
  display: block;
  margin-top: 10px;
  color: #1b2738;
  font-size: 28px;
  font-weight: 700;
}

#dashboardPanel .modern-kpi small {
  color: #506177;
  font-size: 13px;
  font-weight: 600;
}

#dashboardPanel .kpi-done { background: #fff; }
#dashboardPanel .kpi-today { background: #fff; }
#dashboardPanel .kpi-left { background: #fff; }
#dashboardPanel .kpi-time { background: #fff; }

#dashboardPanel .dashboard-modern-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

#dashboardPanel .dashboard-card {
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#dashboardPanel .modern-card-title {
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
}

#dashboardPanel .modern-card-subtitle {
  margin: 2px 0 0;
  color: #60748a;
  font-size: 14px;
  font-weight: 500;
}

#dashboardPanel .modern-timer-card {
  padding: 18px;
  background: linear-gradient(135deg, #5b5fe5, #8b77f2);
  color: #fff;
  border-color: transparent;
}

#dashboardPanel .modern-timer-display {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

#dashboardPanel .modern-timer-status {
  margin-top: 8px;
}

#dashboardPanel .modern-timer-fields {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 8px;
  margin-top: 10px;
}

#dashboardPanel .modern-timer-fields input,
#dashboardPanel .modern-timer-fields select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.94);
}

#dashboardPanel .modern-entries h3 {
  margin: 14px 0 8px;
  color: #26344a;
  font-size: 18px;
}

#dashboardPanel .modern-entries table {
  width: 100%;
  border-collapse: collapse;
}

#dashboardPanel .modern-entries td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(24, 38, 61, 0.08);
  font-size: 12px;
}

#dashboardPanel .modern-status-card {
  padding: 18px;
}

#dashboardPanel .modern-status-item {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

#dashboardPanel .modern-status-item span,
#dashboardPanel .modern-status-item b {
  font-size: 14px;
  font-weight: 600;
  color: #2b3a52;
}

#dashboardPanel .modern-status-item i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: #e5ebf2;
  overflow: hidden;
}

#dashboardPanel .modern-status-item em {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #6767ec;
}

#dashboardPanel .modern-status-item:nth-child(4) em { background: #f09a21; }
#dashboardPanel .modern-status-item:nth-child(5) em { background: #9aa9bc; }
#dashboardPanel .modern-status-item:nth-child(6) em { background: #5f7fa8; }

#dashboardPanel .modern-weekly-card,
#dashboardPanel .modern-tasks-card,
#dashboardPanel .modern-notes-card {
  margin-top: 16px;
  padding: 18px;
}

#dashboardPanel .modern-table-wrap {
  overflow-x: auto;
}

#dashboardPanel .modern-table {
  width: 100%;
  border-collapse: collapse;
}

#dashboardPanel .modern-table th,
#dashboardPanel .modern-table td {
  text-align: right;
  padding: 12px 8px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

#dashboardPanel .modern-table th {
  color: #7a8da2;
  font-size: 12px;
  font-weight: 700;
}

#dashboardPanel .modern-notes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#dashboardPanel .modern-add-note {
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  background: #0ea66e;
  font-weight: 700;
}

#dashboardPanel .modern-notes-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#dashboardPanel .modern-note-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d6e2ef;
  background: #fff;
}

#dashboardPanel .modern-note-card strong {
  color: #1f2e43;
  font-size: 20px;
  font-weight: 700;
}

#dashboardPanel .modern-note-card p {
  margin: 8px 0;
  font-size: 14px;
}

#dashboardPanel .modern-note-card time {
  color: #7b8ba1;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 1200px) {
  #dashboardPanel .dashboard-modern-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #dashboardPanel .dashboard-modern-row {
    grid-template-columns: 1fr;
  }
  #dashboardPanel .modern-notes-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.task-panel-header span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.task-panel-header h2 {
  margin-top: 4px;
  font-size: 20px;
}

.task-form {
  padding: 16px;
  background: linear-gradient(180deg, #f8fbfc, #fff);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 14px;
  display: grid;
  gap: 12px;
}

.task-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 10px;
}

.task-item {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 11px 14px;
  background: #fff;
  border-bottom: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.task-item:last-child {
  border-bottom: 0;
}

.task-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.task-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-check span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(36, 49, 61, 0.38);
  border-radius: 2px;
  background: #fff;
}

.task-check span::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(-45deg);
}

.task-check input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
}

.task-check input:checked + span::after {
  opacity: 1;
}

.task-status-select {
  width: 136px;
  min-width: 0;
  height: 32px;
  padding: 0 10px 0 24px;
  color: #24313d;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 999px;
  background-color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 18px rgba(36, 49, 61, 0.06);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.task-status-select.status-open {
  color: #475569;
  background-color: #f1f5f9;
  height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 18px;
  padding-right: 8px;
}

.task-status-select.status-in_progress {
  color: #b45309;
  background-color: #fff7ed;
}

.task-status-select.status-review {
  color: #92400e;
  background-color: #fef3c7;
}

.task-status-select.status-done {
  color: #047857;
  background-color: #d1fae5;
}

.task-body {
  display: grid;
  gap: 2px;
}

.task-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.task-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-summary-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.task-summary-row span {
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 400;
}

.task-item strong,
.task-item small {
  display: block;
}

.task-item strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
}

.task-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.task-form textarea {
  min-height: 76px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.task-create-row {
  display: grid;
  grid-template-columns: minmax(0, 260px) auto auto;
  gap: 10px;
  align-items: center;
}

.task-assignee-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.task-assignee-toggle {
  min-width: 112px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f4f69;
  background: linear-gradient(135deg, #d7f3ff, #c3ecff);
  border: 1px solid #9fd9f6;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(56, 189, 248, 0.2);
  font-size: 13px;
  font-weight: 900;
}

.task-assignee-select {
  min-width: 180px;
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.task-assignee-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-assignee-select select {
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.task-assignee-quick {
  display: flex;
  gap: 6px;
}

.task-assignee-quick button {
  padding: 6px 10px;
  border-radius: 9px;
  background: #eef4fb;
  color: #31506b;
  font-size: 11px;
  font-weight: 800;
}

.task-date-field {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.task-date-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-date-field input {
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.task-create-btn {
  height: 64px;
  padding: 0 14px;
  color: #17242f;
  background: rgba(246, 183, 60, 0.28);
  border-radius: 12px;
  font-size: 13px;
}

.task-create-btn:hover {
  background: rgba(246, 183, 60, 0.4);
}

.task-assignee-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.task-assignee-meta span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 12px;
}

.task-item.done {
  background: #f8fafb;
  opacity: 0.72;
}

.task-item.done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-item.done .task-summary-row {
  opacity: 0.78;
}

.my-tasks-hero {
  display: contents;
}

.my-tasks-hero-main {
  margin: 0 32px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 0;
  flex-direction: row-reverse;
  background: transparent;
  border: 0;
}

.my-tasks-hero-copy {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
  justify-content: flex-start;
}

.my-tasks-hero-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #2c61ff;
  background: linear-gradient(135deg, #edf1ff, #dfe7ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
  font-size: 24px;
  font-weight: 900;
}

.my-tasks-hero-copy span {
  display: block;
  margin-bottom: 4px;
  color: #6b7a94;
  font-size: 13px;
  font-weight: 700;
}

.my-tasks-hero-copy h1 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
}

.my-tasks-hero-copy p {
  margin: 6px 0 0;
  color: #7b8799;
  font-size: 14px;
  font-weight: 600;
}

.my-tasks-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}

.my-tasks-add-btn {
  min-width: 134px;
  height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #3b6cff, #2b56f3);
  box-shadow: 0 18px 34px rgba(43, 86, 243, 0.22);
  font-size: 15px;
  font-weight: 700;
}

.my-tasks-add-btn span {
  font-size: 24px;
  line-height: 1;
}

.my-tasks-search-wrap {
  position: relative;
  min-width: 220px;
  flex: 1 1 320px;
}

.my-tasks-search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 48px;
  border: 1px solid #dde5f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f3654;
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 32px rgba(67, 89, 129, 0.05);
}

.my-tasks-search-wrap input::placeholder {
  color: #8a97ab;
}

.my-tasks-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #66748a;
  font-size: 24px;
  pointer-events: none;
}

.my-tasks-toolbar {
  margin: 0 32px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(218, 225, 238, 0.92);
}

.my-tasks-toolbar .my-tasks-tabs {
  width: 100%;
  gap: 4px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 229, 241, 0.96);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 34px rgba(67, 89, 129, 0.06);
  flex-wrap: nowrap;
}

.my-tasks-toolbar .my-tasks-tabs::-webkit-scrollbar {
  display: none;
}

.my-tasks-deadline-nav {
  margin: 14px 32px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 229, 241, 0.96);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 34px rgba(67, 89, 129, 0.06);
}

.my-tasks-deadline-nav-item {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #526176;
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
  background: transparent;
  border: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.my-tasks-deadline-nav-item:hover {
  background: rgba(241, 245, 249, 0.9);
  color: #22344f;
}

.my-tasks-deadline-nav-item.active {
  color: #fff;
  background: #1e3a5f;
  box-shadow: 0 10px 24px rgba(43, 86, 243, 0.18);
}

.my-tasks-deadline-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.my-tasks-deadline-nav-icon svg {
  width: 16px;
  height: 16px;
}

.my-tasks-deadline-strip {
  margin: 14px 32px 0;
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.my-tasks-deadline-strip .my-tasks-tab {
  flex: 0 0 auto;
}

.my-tasks-quick-add {
  margin: 0 32px 16px;
  padding: 12px;
  border: 1px solid #d5e1ec;
  border-radius: 12px;
  background: #fff;
}

.my-tasks-quick-add form {
  display: grid;
  grid-template-columns: 1.8fr 1fr 0.8fr auto;
  gap: 10px;
}

.my-tasks-quick-add input,
.my-tasks-quick-add select {
  height: 40px;
  border: 1px solid #d0dbe8;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
  color-scheme: light;
}

.my-tasks-quick-add select option,
.my-tasks-quick-add-card select option {
  color: #1f2937;
  background: #fff;
}

.my-tasks-quick-add-card {
  overflow: visible;
}

.my-tasks-quick-add-card input,
.my-tasks-quick-add-card select {
  color: #1f2937;
  background: #fff;
  color-scheme: light;
}

.my-tasks-quick-add button {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: #6767ec;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.my-tasks-quick-add small {
  margin-top: 8px;
  display: block;
  font-size: 12px;
  color: #5f748d;
}

.my-tasks-mobile-add-btn {
  display: none;
}

.my-tasks-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  padding: 6px;
  border: 1px solid #dce5f1;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 251, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 14px 34px rgba(67, 89, 129, 0.06);
}

.my-tasks-project-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 150px;
  height: 46px;
  padding: 0 12px 0 16px;
  border: 1px solid #dde5f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 32px rgba(67, 89, 129, 0.05);
}

.my-tasks-project-filter-wrap::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-left: 2px solid #5f748d;
  border-bottom: 2px solid #5f748d;
  transform: translateY(-55%) rotate(-45deg);
  pointer-events: none;
}

.my-tasks-project-filter-pill {
  gap: 10px;
}

.my-tasks-project-filter-label {
  color: #27364d;
  font-size: 14px;
  font-weight: 700;
}

.my-tasks-project-filter {
  min-width: 0;
  height: 100%;
  padding: 0 28px 0 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #66748a;
  font-size: 13px;
  font-weight: 700;
  appearance: none;
}

.my-tasks-tab {
  min-height: 38px;
  padding: 0 14px;
  color: #526176;
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
  background: transparent;
  border: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: none;
  white-space: nowrap;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.my-tasks-tab[data-my-tasks-tab="open"] {
  color: #475569;
}

.my-tasks-tab[data-my-tasks-tab="in_progress"] {
  color: #b45309;
}

.my-tasks-tab[data-my-tasks-tab="deadline"] {
  color: #5b3cc4;
}

.my-tasks-tab[data-my-tasks-tab="kanban"] {
  color: #5b3cc4;
}

.my-tasks-tab[data-my-tasks-tab="review"] {
  color: #92400e;
  background: #fef3c7;
}

.my-tasks-tab[data-my-tasks-tab="done"] {
  color: #334155;
}

.my-tasks-tab.active {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(43, 86, 243, 0.18);
}

.my-tasks-tab[data-my-tasks-tab="open"].active {
  background: #64748b;
}

.my-tasks-tab[data-my-tasks-tab="all"].active {
  background: #1e3a5f;
}

.my-tasks-tab[data-my-tasks-tab="in_progress"].active {
  background: #f59e0b;
}

.my-tasks-tab[data-my-tasks-tab="deadline"].active {
  background: #5b3cc4;
}

.my-tasks-tab:hover:not(.active) {
  background: rgba(241, 245, 249, 0.9);
  color: #22344f;
}

.my-tasks-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.my-tasks-tab-icon svg {
  width: 16px;
  height: 16px;
}

.my-tasks-tab[data-my-tasks-tab="kanban"].active {
  background: #4f46e5;
}

.my-tasks-tab[data-my-tasks-tab="review"].active {
  background: #d97706;
}

.my-tasks-tab[data-my-tasks-tab="done"].active {
  background: #64748b;
}

.my-tasks-list {
  background: #fff;
}

.my-tasks-shell {
  padding-top: 0;
}

.my-tasks-page-hint {
  margin: 0 32px 14px;
  color: #5f748d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.my-tasks-table-wrap {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 14px 14px;
}

.my-tasks-deadline-board {
  position: relative;
  margin: 0 32px 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.my-tasks-deadline-board,
.my-tasks-deadline-board button,
.my-tasks-deadline-board input,
.my-tasks-deadline-board select,
.my-tasks-deadline-board textarea {
  font-family: "Shabnam", Tahoma, Arial, sans-serif;
  color: #111111;
}

.my-tasks-deadline-board::before,
.my-tasks-deadline-board::after {
  content: none;
}

.my-tasks-deadline-frame {
  display: grid;
  gap: 14px;
}

.my-tasks-deadline-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.my-tasks-deadline-summary-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 229, 241, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 14px 34px rgba(67, 89, 129, 0.06);
}

.my-tasks-deadline-summary-card small {
  color: #111111;
  font-size: 12px;
  font-weight: 800;
}

.my-tasks-deadline-summary-card b {
  color: #111111;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.my-tasks-deadline-summary-card span {
  color: #111111;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.my-tasks-deadline-summary-card--gray { border-top: 4px solid rgba(148, 163, 184, 0.85); }
.my-tasks-deadline-summary-card--neutral { border-top: 4px solid rgba(100, 116, 139, 0.72); }
.my-tasks-deadline-summary-card--blue { border-top: 4px solid rgba(59, 130, 246, 0.78); }
.my-tasks-deadline-summary-card--cyan { border-top: 4px solid rgba(6, 182, 212, 0.78); }
.my-tasks-deadline-summary-card--teal { border-top: 4px solid rgba(20, 184, 166, 0.78); }
.my-tasks-deadline-summary-card--lime { border-top: 4px solid rgba(132, 204, 22, 0.82); }
.my-tasks-deadline-summary-card--red { border-top: 4px solid rgba(248, 113, 113, 0.82); }

.my-tasks-deadline-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.my-tasks-deadline-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.my-tasks-deadline-stat strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.my-tasks-deadline-stat span {
  font-size: 13px;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

.my-tasks-deadline-stat--gray { background: rgba(148, 163, 184, 0.22); }
.my-tasks-deadline-stat--neutral { background: rgba(255, 255, 255, 0.16); }
.my-tasks-deadline-stat--blue { background: rgba(96, 165, 250, 0.25); }
.my-tasks-deadline-stat--cyan { background: rgba(34, 211, 238, 0.23); }
.my-tasks-deadline-stat--teal { background: rgba(20, 184, 166, 0.24); }
.my-tasks-deadline-stat--lime { background: rgba(132, 204, 22, 0.28); }
.my-tasks-deadline-stat--red { background: rgba(248, 113, 113, 0.28); }

.my-tasks-deadline-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  min-width: 0;
  direction: rtl;
}

.my-tasks-deadline-column {
  min-height: 420px;
  padding: 14px 12px 12px;
  border-radius: 24px;
  border: 1px solid rgba(220, 229, 241, 0.95);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 40px rgba(67, 89, 129, 0.07);
  display: flex;
  flex-direction: column;
}

.my-tasks-deadline-column[data-deadline-bucket="overdue"] {
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(255, 238, 238, 0.94));
  border-color: rgba(255, 188, 188, 0.85);
}

.my-tasks-deadline-column[data-deadline-bucket="no_deadline"] {
  background: linear-gradient(180deg, rgba(248, 249, 252, 0.98), rgba(244, 246, 250, 0.95));
  border-color: rgba(226, 232, 240, 0.95);
}

.my-tasks-deadline-column[data-deadline-bucket="today"] {
  background: linear-gradient(180deg, rgba(242, 255, 245, 0.98), rgba(229, 252, 235, 0.94));
  border-color: rgba(183, 230, 194, 0.9);
}

.my-tasks-deadline-column[data-deadline-bucket="this_week"] {
  background: linear-gradient(180deg, rgba(242, 252, 255, 0.98), rgba(233, 248, 255, 0.94));
  border-color: rgba(176, 228, 243, 0.92);
}

.my-tasks-deadline-column[data-deadline-bucket="next_week"] {
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.98), rgba(236, 241, 255, 0.94));
  border-color: rgba(189, 204, 247, 0.92);
}

.my-tasks-deadline-column-head {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #1f2f46;
  text-align: right;
}

.my-tasks-deadline-column-head-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.my-tasks-deadline-column-head strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.my-tasks-deadline-column[data-deadline-bucket="overdue"] .my-tasks-deadline-column-head strong {
  color: #d93025;
}

.my-tasks-deadline-column[data-deadline-bucket="no_deadline"] .my-tasks-deadline-column-head strong {
  color: #475569;
}

.my-tasks-deadline-column[data-deadline-bucket="today"] .my-tasks-deadline-column-head strong {
  color: #18a957;
}

.my-tasks-deadline-column[data-deadline-bucket="this_week"] .my-tasks-deadline-column-head strong {
  color: #1d8fc8;
}

.my-tasks-deadline-column[data-deadline-bucket="next_week"] .my-tasks-deadline-column-head strong {
  color: #5a7de6;
}

.my-tasks-deadline-column-head span {
  display: block;
  margin-top: 4px;
  color: #111111;
  font-size: 11px;
}

.my-tasks-deadline-column-head b {
  min-width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #111111;
  font-size: 13px;
  font-weight: 800;
}

.my-tasks-deadline-column[data-deadline-bucket="overdue"] .my-tasks-deadline-column-head b {
  color: #d93025;
  background: rgba(255, 235, 235, 0.95);
}

.my-tasks-deadline-column[data-deadline-bucket="no_deadline"] .my-tasks-deadline-column-head b {
  color: #475569;
  background: rgba(255, 255, 255, 0.85);
}

.my-tasks-deadline-column[data-deadline-bucket="today"] .my-tasks-deadline-column-head b {
  color: #18a957;
  background: rgba(234, 255, 239, 0.95);
}

.my-tasks-deadline-column[data-deadline-bucket="this_week"] .my-tasks-deadline-column-head b {
  color: #1d8fc8;
  background: rgba(235, 250, 255, 0.95);
}

.my-tasks-deadline-column[data-deadline-bucket="next_week"] .my-tasks-deadline-column-head b {
  color: #5a7de6;
  background: rgba(240, 244, 255, 0.95);
}

.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-column-head strong,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-column-head span,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-column-head b,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-column-chevron,
.my-tasks-deadline-column[data-deadline-bucket] .task-info-trigger,
.my-tasks-deadline-column[data-deadline-bucket] .my-task-project-name,
.my-tasks-deadline-column[data-deadline-bucket] .my-task-project-name span,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-progress-label,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-progress-value,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-assignee,
.my-tasks-deadline-column[data-deadline-bucket] .my-tasks-deadline-metrics {
  color: #111111;
}

.my-tasks-deadline-column-chevron {
  display: none;
  color: #111111;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.my-tasks-deadline-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-content: flex-start;
  flex: 1 1 auto;
}

.my-tasks-deadline-card + .my-tasks-deadline-card {
  margin-top: 0;
}

.my-tasks-deadline-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 11px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;
  color: #111111;
}

.my-tasks-deadline-card--compact {
  gap: 10px;
  padding: 12px;
}

.my-tasks-deadline-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: var(--project-color, #64748b);
  opacity: 0.95;
}

.my-tasks-deadline-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.my-tasks-deadline-card--compact .my-tasks-deadline-top {
  align-items: center;
  justify-content: flex-start;
}

.my-tasks-deadline-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: calc(100% - 86px);
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.my-tasks-deadline-project-pill i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--project-color, #64748b);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14);
}

.my-tasks-deadline-project-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-tasks-deadline-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.my-tasks-deadline-priority.priority-high {
  background: rgba(254, 226, 226, 0.95);
  color: #b91c1c;
}

.my-tasks-deadline-priority.priority-medium {
  background: rgba(254, 243, 199, 0.95);
  color: #b45309;
}

.my-tasks-deadline-priority.priority-low {
  background: rgba(241, 245, 249, 0.98);
  color: #475569;
}

.my-tasks-deadline-card .task-info-trigger {
  width: 100%;
  min-width: 0;
  text-align: right;
  padding: 0;
  background: transparent;
  border: 0;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.15em;
}

.my-tasks-deadline-card--compact .task-info-trigger {
  -webkit-line-clamp: 2;
  min-height: 1.15em;
  font-size: 13.5px;
  line-height: 1.75;
  font-weight: 700;
}

.my-tasks-deadline-card:focus-visible {
  outline: 2px solid rgba(91, 70, 232, 0.35);
  outline-offset: 2px;
}

.my-tasks-deadline-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 28px;
}

.my-tasks-deadline-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: #2558dc;
  font-size: 11px;
  font-weight: 800;
  background: #f7fbff;
  border: 1px solid rgba(59, 130, 246, 0.24);
  white-space: nowrap;
}

.my-tasks-deadline-date.is-muted {
  color: #64748b;
  background: #f6f7fb;
  border-color: rgba(148, 163, 184, 0.28);
}

.my-tasks-deadline-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}

.my-tasks-deadline-title {
  position: relative;
  z-index: 1;
  text-align: right;
}

.my-tasks-deadline-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.my-tasks-deadline-progress-label {
  color: #111111;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.my-tasks-deadline-progress-value {
  color: #111111;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.my-tasks-deadline-progressbar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2ff;
}

.my-tasks-deadline-progressbar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6767ec, #22c55e);
}

.my-tasks-deadline-assignee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #111111;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.my-tasks-deadline-avatar {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.my-tasks-deadline-metrics {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111111;
  font-size: 11px;
  font-weight: 700;
}

.my-tasks-deadline-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.my-tasks-deadline-metrics i {
  font-style: normal;
  opacity: 0.75;
}

.my-tasks-deadline-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.my-tasks-deadline-card .my-task-project-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
}

.my-tasks-deadline-card .my-task-project-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 7px;
  background: var(--project-color, #64748b);
  font-weight: 400;
}

.my-tasks-deadline-card .my-task-project-color-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.my-tasks-deadline-card .my-task-priority-dot-compact {
  flex: 0 0 auto;
  min-height: 28px;
  padding-inline: 10px;
}

.my-tasks-deadline-column--red { border-color: rgba(255, 125, 125, 0.28); }
.my-tasks-deadline-column--lime { border-color: rgba(178, 255, 97, 0.28); }
.my-tasks-deadline-column--teal { border-color: rgba(110, 239, 255, 0.28); }
.my-tasks-deadline-column--cyan { border-color: rgba(103, 227, 255, 0.28); }
.my-tasks-deadline-column--blue { border-color: rgba(124, 179, 255, 0.28); }
.my-tasks-deadline-column--gray { border-color: rgba(255, 255, 255, 0.24); }
.my-tasks-deadline-column--neutral { border-color: rgba(255, 255, 255, 0.2); }

.my-tasks-mobile-list {
  display: none;
  gap: 12px;
}

.my-tasks-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}


.my-tasks-table th,
.my-tasks-table td {
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
  background: #ffffff;
}

.my-tasks-table th:first-child,
.my-tasks-table td:first-child {
  padding-left: 6px;
  padding-right: 8px;
}

.my-tasks-table th:nth-child(2),
.my-tasks-table td:nth-child(2) {
  padding-right: 8px;
}

.my-tasks-table th {
  color: #101828;
  font-size: 13px;
  font-weight: 800;
  background: #e9eefc;
  border-bottom: 0;
  padding-top: 11px;
  padding-bottom: 11px;
}

.my-tasks-table thead th:first-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.my-tasks-table thead th:last-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.my-tasks-table tbody tr td {
  background: #ffffff;
}

.my-tasks-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.my-tasks-table tbody tr td:first-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.my-tasks-table tbody tr td:last-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.my-tasks-table tbody tr:hover td {
  background: #fcfdff;
}

.my-tasks-table td strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: auto;
}

.my-tasks-table td small {
  display: block;
  margin-top: 2px;
  color: #8093aa;
  font-size: 11px;
}

.my-task-project-inline {
  display: inline-block !important;
  margin-right: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #7b8fa6 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.my-task-project-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
}

.my-task-project-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.my-task-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 18px rgba(36, 49, 61, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.my-task-project-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(36, 49, 61, 0.12);
  filter: saturate(1.04);
}

.my-task-project-pill:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

.my-task-project-pill-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.my-task-project-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-task-progress-inline {
  display: inline-grid;
  grid-template-columns: minmax(78px, 120px) auto;
  align-items: center;
  gap: 6px;
}

.my-task-progress-range {
  width: 100%;
  height: 4px;
  accent-color: #4f8ef7;
  cursor: pointer;
}

.my-task-progress-value {
  color: #2e62d0;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 36px;
}

.my-task-priority-select {
  min-width: 92px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d6e0eb;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
}

.my-task-priority-select.priority-high {
  color: #ffffff;
  background: #fff2f0;
}

.my-task-priority-select.priority-medium {
  color: #b26b00;
  background: #fff8e8;
}

.my-task-priority-select.priority-low {
  color: #0f6a46;
  background: #ebfff4;
}

.my-task-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.my-task-status-badge.status-open {
  color: #475569;
  background: #e2e8f0;
}

.my-task-status-badge.status-in_progress {
  color: #b45309;
  background: #fff7ed;
}

.my-task-status-badge.status-done {
  color: #047857;
  background: #d1fae5;
}

.my-task-cycle-btn {
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f6a46;
  background: #e9f8f2;
  transition: all 0.5s ease;
}

.my-task-cycle-btn.is-pending,
.task-status-select.is-pending {
  opacity: 0.7;
  transform: scale(0.98);
}

.my-task-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.my-task-delete-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0;
  color: #1f2937;
  background: transparent;
  border: 0;
}

.my-task-due-edit-btn {
  border: 1px dashed #cfe0f7;
  background: #f8fbff;
  color: #2f4f76;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}

.my-task-list-select {
  min-width: 118px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d0dbe8;
  border-radius: 10px;
  background: #fff;
  color: #28405a;
  font-size: 11px;
  font-weight: 700;
}

.my-task-mobile-list-picker {
  margin-top: 10px;
}

.my-task-mobile-list-picker .my-task-list-select {
  width: 100%;
  min-width: 0;
  height: 32px;
}

.my-task-priority-dot-compact {
  width: 72px;
  height: 22px;
  min-width: 72px;
  border-radius: 999px;
  border: 1px solid rgba(36, 49, 61, 0.16);
  color: #1f2937;
  font-size: 10px;
  font-weight: 500;
  padding: 0 7px;
  text-align: center;
}

.my-task-priority-dot-compact.priority-low {
  background: #b7ddff;
}

.my-task-priority-dot-compact.priority-medium {
  background: #ffe38c;
}

.my-task-priority-dot-compact.priority-high {
  background: #ef4444;
  color: #ffffff;
}

.my-task-state-compact {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 1px solid rgba(36, 49, 61, 0.2);
  background: #fff;
  color: transparent;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

.my-task-state-compact.status-in_progress {
  background: #ffe38c;
  border-color: #ffd54d;
}

.my-task-state-compact.status-done {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.my-task-state-compact.status-open,
.my-task-state-compact.status-review {
  background: #ffffff;
  border-color: rgba(36, 49, 61, 0.2);
}

.my-task-state-compact.is-pending {
  transform: scale(1.08);
}

.my-tasks-table .my-task-state-compact {
  margin-inline: auto;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.my-tasks-table .my-task-actions {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.my-tasks-table .task-list-item-btn.danger {
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 11px;
}

.my-task-mobile-state-picker {
  position: relative;
  width: 18px;
  min-width: 18px;
  display: inline-block;
  vertical-align: middle;
}

.my-task-mobile-state-toggle {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  background: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.my-task-mobile-state-toggle::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: auto;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.48);
  background: transparent;
}

.my-task-mobile-state-toggle.status-in_progress {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.98);
  box-shadow: 0 8px 14px rgba(245, 158, 11, 0.16);
}

.my-task-mobile-state-toggle.status-in_progress::after {
  border-color: rgba(217, 119, 6, 0.72);
  background: #f59e0b;
}

.my-task-mobile-state-toggle.status-done {
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(239, 246, 255, 0.98);
  box-shadow: 0 8px 14px rgba(59, 130, 246, 0.14);
}

.my-task-mobile-state-toggle.status-done::after {
  border-color: rgba(37, 99, 235, 0.72);
  background: #3b82f6;
}

.my-task-mobile-state-toggle.is-pending {
  transform: scale(1.08);
}

.my-task-mobile-status-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  min-width: 98px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #dbe4f2;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.my-task-mobile-status-option {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.my-task-mobile-status-option:hover {
  transform: translateY(-1px);
}

.my-task-mobile-status-option.status-open {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
  min-height: 24px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.my-task-mobile-status-option.status-in_progress {
  color: #b45309;
  background: #fff7ed;
  border-color: #fcd34d;
}

.my-task-mobile-status-option.status-done {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.my-task-mobile-status-option.is-active {
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.task-info-trigger {
  cursor: pointer;
}

strong.task-info-trigger {
  text-decoration: underline dotted transparent;
  transition: text-decoration-color 0.2s ease;
}

strong.task-info-trigger:hover {
  text-decoration-color: rgba(31, 54, 84, 0.35);
}

.my-tasks-table tr.done td strong {
  text-decoration: none;
  color: var(--ink);
}

.my-tasks-table tr,
.task-item {
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.my-tasks-table tr.task-leaving,
.task-item.task-leaving {
  opacity: 0;
  transform: translateY(-6px);
  filter: blur(1px);
}

.my-task-mobile-card {
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease, background-color 0.8s ease;
}

.my-task-mobile-card.task-leaving,
.my-task-mobile-row.task-leaving {
  opacity: 0;
  transform: translateY(-10px);
  filter: blur(1px);
}

.my-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 11px 14px;
  background: #fff;
  border-bottom: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 0;
  box-shadow: none;
}

.my-task-card:last-child {
  border-bottom: 0;
}

.my-task-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.my-task-card a {
  display: inline-block;
  margin-bottom: 2px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.my-task-card strong,
.my-task-card p {
  display: block;
}

.my-task-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.my-task-card strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.my-task-card .task-title-row {
  justify-content: flex-start;
  gap: 8px;
}

.my-task-card .task-status-select {
  flex: 0 0 auto;
}

.my-task-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.my-task-card.done {
  opacity: 1;
  background: #fff;
}

.my-task-card.done strong {
  color: var(--ink);
  text-decoration: none;
}

.my-task-mobile-row {
  display: table-row;
}

.my-task-mobile-card {
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.my-task-mobile-card.is-done {
  opacity: 1;
  background: #fff;
}

.my-task-mobile-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  flex-wrap: wrap;
}

.my-task-mobile-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-task-mobile-title-wrap {
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(100% - 140px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.my-task-mobile-project {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 1 auto;
}

.my-task-mobile-controls {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  gap: 8px;
}

.my-task-mobile-meta {
  order: 4;
  flex: 0 0 100%;
  width: 100%;
  margin-top: 2px;
}

.my-task-mobile-meta .my-task-due-edit-btn {
  width: 100%;
  text-align: right;
}

.my-task-mobile-progress-editor {
  flex: 0 0 100%;
}

.my-task-mobile-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #b9cdf8;
  background: #f7faff;
  color: #275fd5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.my-task-mobile-progress-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #c7d8ff;
  border-radius: 12px;
  background: #edf3ff;
}

.my-task-mobile-progress-editor .my-task-progress-range {
  width: 100%;
  min-width: 0;
  accent-color: #2f6ef2;
}

.my-task-mobile-progress-editor .my-task-progress-value {
  min-width: 34px;
  color: #285fdd;
  font-size: 13px;
  font-weight: 800;
}

.my-task-mobile-priority-dot {
  width: 84px;
  height: 32px;
  min-width: 84px;
  border-radius: 999px;
  border: 1px solid #e0c267;
  color: #4b3f1f;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
  text-align: center;
  appearance: auto;
}

.my-task-mobile-priority-dot.priority-low {
  background: #c7e5ff;
}

.my-task-mobile-priority-dot.priority-medium {
  background: #f8db7b;
}

.my-task-mobile-priority-dot.priority-high {
  background: #ef4444;
  color: #ffffff;
}

.my-task-mobile-state {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  border: 1px solid rgba(36, 49, 61, 0.2);
  background: #fff;
  color: transparent;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

.my-task-mobile-state.status-in_progress {
  background: #ffe38c;
  border-color: #ffd54d;
}

.my-task-mobile-state.status-done {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.my-task-mobile-state.status-open,
.my-task-mobile-state.status-review {
  background: #ffffff;
  border-color: rgba(36, 49, 61, 0.2);
}

.my-task-mobile-state.is-pending {
  transform: scale(1.08);
}

.task-info-modal-card {
  max-width: 760px;
}

.task-info-content {
  display: grid;
  gap: 12px;
}

.task-info-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.8;
  margin: 0;
}

.task-info-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
}

.task-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-info-item {
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbfc;
}

.task-info-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.task-info-item b {
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
}

.task-info-edit-form {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.task-info-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-info-edit-grid .field {
  margin: 0;
}

.task-info-span-2 {
  grid-column: 1 / -1;
}

.task-info-date-field input[type="text"] {
  cursor: pointer;
}

.task-info-edit-pickers {
  display: grid;
  gap: 12px;
}

.task-info-edit-pickers .task-jalali-picker {
  margin-top: 0;
}

.task-info-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.task-status-toast {
  position: fixed;
  right: 50%;
  bottom: 18px;
  transform: translateX(50%);
  z-index: 120;
  background: #1f2937;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
  animation: toast-in 0.22s ease-out;
}

.task-status-toast.is-hiding {
  opacity: 0;
  transform: translateX(50%) translateY(8px);
  transition: all 0.25s ease;
}

.calendar-title {
  align-items: center;
  gap: 16px;
  margin: 0 20px 18px;
  padding-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
}

.calendar-toolbar-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-toolbar-side-left {
  justify-content: flex-start;
}

.calendar-toolbar-side-right {
  justify-content: flex-end;
}

.calendar-toolbar-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.calendar-toolbar-center h1 {
  margin: 0;
  color: #1f2b44;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.calendar-filter-btn,
.calendar-nav-icon-btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: #65758c;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.calendar-filter-btn svg {
  width: 22px;
  height: 22px;
}

.calendar-nav-icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  box-shadow: none;
  font-size: 26px;
  line-height: 1;
}

.calendar-view-tab {
  min-width: 56px;
  height: 40px;
  padding: 0 14px;
  color: #6b7280;
  background: #fff;
  border: 1px solid #dbe3ef;
  font-size: 12px;
  font-weight: 800;
}

.calendar-view-tab:first-child {
  border-radius: 10px 0 0 10px;
}

.calendar-view-tab:last-child {
  border-radius: 0 10px 10px 0;
}

.calendar-view-tab + .calendar-view-tab {
  margin-inline-start: -1px;
}

.calendar-view-tab.is-active {
  color: #2563eb;
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.calendar-today-btn {
  min-width: 82px;
  height: 40px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.calendar-today-btn {
  color: #24344f;
  background: #fff;
  border-color: #dbe3ef;
}

.calendar-shell {
  margin: 0 20px 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.04);
}

.calendar-today-summary {
  display: none;
}

.calendar-today-summary > strong {
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
}

.calendar-today-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 8px;
}

.calendar-today-summary > div:nth-of-type(1) {
  background: #e6fffb;
  border-color: #8ee8d8;
}

.calendar-today-summary > div:nth-of-type(2) {
  background: #e9f7ff;
  border-color: #9bd4ff;
}

.calendar-today-summary > div:nth-of-type(3) {
  background: #fff4dd;
  border-color: #ffd48a;
}

.calendar-today-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-today-summary b {
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 44px;
  background: #fff;
  border-bottom: 1px solid #e8edf4;
}

.calendar-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8599;
  border-left: 1px solid #edf2f7;
  font-size: 12px;
  font-weight: 800;
}

.calendar-weekdays span:last-child {
  border-left: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 720px;
  background: #fff;
}

.calendar-grid > .empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day {
  position: relative;
  min-height: 164px;
  padding: 12px 10px 10px;
  background: #fff;
  border-left: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
}

.calendar-day.has-activity {
  background: linear-gradient(180deg, #ffffff, #fcfdff);
}

.calendar-day:nth-child(7n) {
  border-left: 0;
}

.calendar-day.is-outside {
  background: linear-gradient(135deg, #f7f9fc, #eef3f8);
  color: rgba(71, 85, 105, 0.45);
}

.calendar-day.is-today {
  background: linear-gradient(180deg, #f6f9ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(103, 103, 236, 0.16);
}

.calendar-day.is-today::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
  border-radius: 16px 0 0 16px;
}

.calendar-day.is-today::after {
  content: "امروز";
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.calendar-day-head {
  min-height: 20px;
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-end;
}

.calendar-day-head strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.8;
}

.calendar-day.is-today .calendar-day-head strong {
  color: var(--primary-dark);
}

.calendar-day-body {
  display: grid;
  position: relative;
}

.calendar-day-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day-empty {
  min-height: 112px;
  display: grid;
  place-items: center;
  color: #c1cad7;
  font-size: 26px;
  font-weight: 700;
}

.calendar-day-metric {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 8px 5px;
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  border: 1px solid #edf2f7;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.calendar-day-metric-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.calendar-day-metric-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
  color: #64748b;
}

.calendar-day-metric.deadline-stat .calendar-day-metric-icon {
  color: #f59e0b;
}

.calendar-day-metric.done-stat .calendar-day-metric-icon {
  color: #22c55e;
}

.calendar-day-metric.work-stat .calendar-day-metric-icon {
  color: #64748b;
}

.calendar-day-metric-head em {
  font-style: normal;
  white-space: nowrap;
}

.calendar-day-metric strong {
  color: #24344f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.calendar-day-metric.work-stat strong {
  font-size: 12px;
}

.calendar-day-metric.deadline-stat i {
  color: #f59e0b;
}

.calendar-day-metric.done-stat i {
  color: #22c55e;
}

.calendar-day-metric.work-stat i {
  color: #64748b;
}

.calendar-day.is-outside .calendar-day-body {
  opacity: 0.7;
}

@media (max-width: 1280px) {
  .calendar-title {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .calendar-toolbar-side-left,
  .calendar-toolbar-side-right,
  .calendar-toolbar-center {
    justify-content: center;
  }

  .calendar-toolbar-side {
    flex-wrap: wrap;
  }

  .calendar-shell,
  .calendar-today-summary {
    margin-inline: 12px;
  }

  .calendar-day-metrics {
    gap: 4px;
  }
}

.calendar-title {
  align-items: center;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-nav-btn,
.calendar-today-btn {
  min-width: 82px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-today-btn {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.calendar-shell {
  margin: 0 32px 32px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #c8d6df;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(36, 49, 61, 0.08);
}

.calendar-today-summary {
  margin: 0 32px 14px;
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d8e4ee;
  border-radius: 10px;
}

.calendar-today-summary > strong {
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
}

.calendar-today-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  background: #f8fbfc;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 8px;
}

.calendar-today-summary > div:nth-of-type(1) {
  background: #e6fffb;
  border-color: #8ee8d8;
}

.calendar-today-summary > div:nth-of-type(2) {
  background: #e9f7ff;
  border-color: #9bd4ff;
}

.calendar-today-summary > div:nth-of-type(3) {
  background: #fff4dd;
  border-color: #ffd48a;
}

.calendar-today-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-today-summary b {
  color: var(--night);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 36px;
  background: linear-gradient(180deg, #fff, #f5f8fa);
  border-bottom: 1px solid #b9cad5;
}

.calendar-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #45506c;
  border-left: 1px solid #c8d6df;
  font-size: 12px;
  font-weight: 900;
}

.calendar-weekdays span:last-child {
  border-left: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  min-height: 620px;
  overflow-x: auto;
}

.calendar-grid > .empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day {
  position: relative;
  min-height: 136px;
  padding: 9px 10px;
  background-color: #fbfff7;
  background-image: radial-gradient(rgba(142, 182, 125, 0.2) 0.8px, transparent 0.8px);
  background-size: 5px 5px;
  border-left: 1px solid #c8d6df;
  border-bottom: 1px solid #c8d6df;
  color: var(--ink);
}

.calendar-day.has-activity {
  background-color: #fffef7;
  background-image:
    linear-gradient(180deg, rgba(246, 183, 60, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(rgba(142, 182, 125, 0.18) 0.8px, transparent 0.8px);
}

.calendar-day:nth-child(7n) {
  border-left: 0;
}

.calendar-day.is-outside {
  background: linear-gradient(135deg, #eef3f6, #dbe4ea);
  color: rgba(69, 80, 108, 0.46);
}

.calendar-day.is-today {
  background-color: #fff;
  background-image: none;
  box-shadow:
    inset 0 0 0 3px var(--primary),
    inset 0 0 0 7px rgba(0, 168, 150, 0.12);
}

.calendar-day.is-today::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--primary);
  border-radius: 8px 0 0 8px;
}

.calendar-day.is-today::after {
  content: "امروز";
  position: absolute;
  top: 8px;
  left: 10px;
  padding: 3px 8px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.calendar-day-head {
  min-height: 24px;
  margin-bottom: 12px;
}

.calendar-day-head strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.8;
}

.calendar-day.is-today .calendar-day-head strong {
  color: var(--primary-dark);
}

.calendar-day-body {
  display: grid;
  gap: 6px;
}

.calendar-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  color: #4d5a66;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(36, 49, 61, 0.06);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}

.calendar-stat.work-stat {
  background: #e9fbf7;
  border-color: rgba(0, 168, 150, 0.28);
}

.calendar-stat.created-stat {
  background: #fff5db;
  border-color: rgba(246, 183, 60, 0.36);
}

.calendar-stat.done-stat {
  background: #edf5ff;
  border-color: rgba(61, 112, 178, 0.28);
}

.calendar-day-body b {
  color: var(--night);
  direction: ltr;
  white-space: nowrap;
}

.calendar-day.is-outside .calendar-day-body {
  opacity: 0.52;
}

#calendarPanel .calendar-today-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#calendarPanel .calendar-shell {
  margin: 0 32px 32px;
  border: 1px solid #dfe7f0;
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

#calendarPanel .calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

#calendarPanel .calendar-day {
  min-height: 142px;
  padding: 12px 10px 10px;
  background: #ffffff;
  background-image: none;
  border-left: 1px solid #e8edf4;
  border-bottom: 1px solid #e8edf4;
}

#calendarPanel .calendar-day.has-activity {
  background: linear-gradient(180deg, #ffffff 0%, #fffcf3 100%);
}

#calendarPanel .calendar-day.has-activity:not(.is-today) .calendar-day-head strong {
  color: #939393;
}

#calendarPanel .calendar-day.is-outside {
  background: linear-gradient(180deg, #fafcff 0%, #f2f6fb 100%);
  color: rgba(69, 80, 108, 0.44);
}

#calendarPanel .calendar-day.is-past {
  background: linear-gradient(180deg, #fff8de 0%, #fffdf4 100%);
  box-shadow: inset 0 0 0 1px rgba(246, 183, 60, 0.12);
}

#calendarPanel .calendar-day.is-today {
  background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
}

#calendarPanel .calendar-day.is-today::before,
#calendarPanel .calendar-day.is-today::after {
  display: none;
}

#calendarPanel .calendar-day.is-today .calendar-day-head strong {
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
  color: #2563eb;
}

#calendarPanel .calendar-day.is-today .calendar-day-head strong::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 2px;
  background: #2563eb;
  border-radius: 999px;
  transform: translateX(-50%);
}

#calendarPanel .calendar-day-head {
  margin-bottom: 10px;
  justify-content: center;
}

#calendarPanel .calendar-day-head strong {
  font-size: 20px;
  font-weight: 600;
}

#calendarPanel .calendar-day-body {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

#calendarPanel .calendar-stat {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

#calendarPanel .calendar-stat em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  color: #64748b;
}

#calendarPanel .calendar-stat b {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
  color: #0f172a;
}

#calendarPanel .calendar-stat--work em {
  color: var(--primary-dark);
}

#calendarPanel .calendar-stat--created em {
  color: #2563eb;
}

#calendarPanel .calendar-stat--deadline em {
  color: #9a6700;
}

@media (max-width: 900px) {
  .calendar-title {
    gap: 10px;
  }

  .calendar-toolbar-center h1 {
    font-size: 16px;
  }

  .calendar-view-tab,
  .calendar-today-btn,
  .calendar-filter-btn {
    height: 38px;
  }

  .calendar-grid {
    min-height: 640px;
  }

  .calendar-day {
    min-height: 150px;
  }

  .calendar-day-metric {
    min-height: 96px;
    padding: 7px 4px;
  }
}

.info-card {
  min-height: 160px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.card-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.info-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.info-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.form-shell {
  width: 100%;
  max-width: 900px;
  margin: 32px;
  background: var(--surface);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 24px 54px rgba(36, 49, 61, 0.1);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.form-header {
  padding: 24px 28px 20px;
  background:
    linear-gradient(90deg, rgba(246, 183, 60, 0.25), transparent 42%),
    linear-gradient(135deg, var(--night), var(--primary-dark));
  color: #fff;
  border-bottom: 0;
}

.form-header h1 {
  font-size: 26px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.form-header p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.9;
}

form {
  padding: 26px;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(245, 248, 251, 0.86), #fff 44%);
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 700;
  color: #243341;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
  outline: none;
  box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #9aa6b2;
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(103, 103, 236, 0.13);
  transform: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.75fr;
  gap: 14px;
}

.error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(211, 63, 73, 0.1);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
}

.submit-btn {
  flex: 1;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(103, 103, 236, 0.22);
}

.submit-btn.secondary {
  background: #eef3fb;
  color: #294564;
  box-shadow: none;
}

.auth-actions {
  display: grid;
  gap: 10px;
}

.auth-resend-countdown {
  margin-top: -2px;
  color: #6a7d94;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.submit-btn.secondary:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  filter: saturate(0.8);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #02b7a4, var(--primary-dark));
}

.google-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d5dee8;
  background: #fff;
  color: #2d3d52;
  font-size: 13px;
  font-weight: 800;
}

.google-auth-btn:hover {
  background: #f8fbff;
}

.clear-btn {
  padding: 14px 18px;
  background: #fff;
  color: #344454;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.clear-btn:hover {
  background: var(--soft);
  color: var(--primary-dark);
}

.project-archive-btn {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.project-archive-btn:hover {
  background: #c53f4c;
  color: #fff;
}

.message {
  display: none;
  padding: 14px 15px;
  border-radius: 8px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 14px;
  line-height: 1.8;
  border: 1px solid rgba(23, 99, 58, 0.16);
}

.message.show {
  display: block;
}

@media (max-width: 1380px) {
  .dashboard-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-middle-grid,
  .dashboard-bottom-card {
    grid-template-columns: 1fr;
  }

  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-week-breakdown {
    grid-template-columns: 1fr;
  }

  .work-distribution {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .projects-list {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }
}

@media (max-width: 1120px) {
  .dashboard-middle-grid {
    grid-template-columns: 1fr;
  }

  .projects-list {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    column-gap: 3px;
  }
}

@media (max-width: 900px) {
  .my-tasks-hero {
    display: contents;
  }

  .my-tasks-hero-main {
    margin: 0 18px 12px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  .my-tasks-hero-copy {
    justify-content: flex-start;
    gap: 10px;
  }

  .my-tasks-hero-copy h1 {
    font-size: 20px;
  }

  .my-tasks-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
  }

  .my-tasks-toolbar {
    margin: 0 18px 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(218, 225, 238, 0.95);
  }

  .my-tasks-add-btn,
  .my-tasks-search-wrap,
  .my-tasks-project-filter-wrap {
    width: 100%;
  }

  .my-tasks-hero-badge {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 20px;
  }

  .my-tasks-add-btn {
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 13px;
  }

  .my-tasks-add-btn span {
    font-size: 20px;
  }

  .my-tasks-search-wrap input {
    height: 40px;
    padding: 0 14px 0 40px;
    border-radius: 14px;
    font-size: 11px;
  }

  .my-tasks-search-icon {
    left: 14px;
    font-size: 20px;
  }

  .my-tasks-toolbar {
    align-items: stretch;
    padding-top: 10px;
  }

  .my-tasks-deadline-nav {
    margin: 10px 18px 0;
    padding: 10px 12px;
  }

  .my-tasks-deadline-strip {
    margin: 10px 18px 0;
    padding: 10px 0 8px;
  }

  .my-tasks-project-filter-wrap,
  .my-tasks-project-filter {
    width: 100%;
  }

  .my-tasks-project-filter-wrap {
    min-width: 0;
    height: 40px;
    padding: 0 10px 0 14px;
    border-radius: 14px;
  }

  .my-tasks-project-filter-label,
  .my-tasks-project-filter {
    font-size: 12px;
  }

  .my-tasks-tabs {
    display: flex;
    width: 100%;
    gap: 6px;
    padding: 5px;
    border-radius: 18px;
  }

  .my-tasks-page-hint {
    margin: 0 18px 12px;
  }

  .my-tasks-deadline-board {
    margin: 0 18px 14px;
    padding: 12px;
    border-radius: 22px;
  }

  .my-tasks-deadline-stats {
    grid-template-columns: 1fr 1fr;
  }

  .my-tasks-deadline-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .my-tasks-deadline-column {
    min-height: 0;
  }

  .my-tasks-deadline-column-head {
    align-items: center;
    cursor: pointer;
  }

  .my-tasks-deadline-column-chevron {
    display: inline-block;
  }

  .my-tasks-deadline-column:not(.is-open) .my-tasks-deadline-cards {
    display: none;
  }

  .my-tasks-deadline-column.is-open .my-tasks-deadline-cards {
    display: flex;
  }

  .my-tasks-deadline-column.is-open .my-tasks-deadline-column-chevron {
    transform: rotate(180deg);
  }

  .my-tasks-deadline-column:not(.is-open) {
    min-height: 0;
  }

  .my-tasks-deadline-column-head strong {
    font-size: 13px;
  }

  .my-tasks-deadline-card {
    padding: 8px;
  }

  .my-tasks-tab {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 12px;
    flex: 1 1 auto;
    text-align: center;
  }

  .dashboard-overview {
    grid-template-columns: 1fr;
  }

  .task-status-grid {
    grid-template-columns: 1fr;
  }

  .my-tasks-mobile-add-btn {
    display: none;
  }

  #myTasksQuickAddForm {
    display: none;
  }

  #myTasksPanel .my-tasks-table-wrap {
    display: none;
  }

  #myTasksPanel .my-tasks-mobile-list {
    display: grid;
  }

  .stats-kpi-grid {
    grid-template-columns: 1fr;
  }

  .stats-shell {
    padding: 0 18px 18px;
  }

  .stats-week-shell {
    margin: 18px;
  }

  .stats-week-summary {
    grid-template-columns: 1fr;
  }

  .stats-week-chart {
    overflow-x: hidden;
  }

  .stats-day-bars {
    min-width: 0;
    grid-template-columns: repeat(var(--stats-day-count, 7), minmax(0, 1fr));
    gap: 4px;
  }

  .stats-day-column {
    min-width: 0;
  }

  .stats-day-column small {
    font-size: 9px;
  }

  .stats-stack-bar {
    max-width: 100%;
    min-width: 0;
  }

  .stats-month-dual-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats-week-chart-head,
  .stats-range-controls {
    display: grid;
    justify-content: stretch;
  }

  .stats-range-controls input,
  .stats-range-controls > button[type="submit"] {
    width: 100%;
  }

  .stats-project-share-row {
    grid-template-columns: 12px 1fr 70px;
  }

  .stats-project-share-row div,
  .stats-project-share-row em {
    grid-column: 2 / -1;
  }

  .stats-month-mini-card {
    padding: 12px 12px 10px;
    border-radius: 14px;
  }

  .stats-month-mini-head {
    grid-template-columns: 1fr;
    display: grid;
    gap: 8px;
  }

  .stats-month-mini-head h2 {
    font-size: 16px;
    line-height: 1.35;
  }

  .stats-month-mini-head p {
    font-size: 11px;
  }

  .stats-month-mini-head > strong {
    font-size: 18px;
  }

  #statsPanel .weekly-line-chart {
    height: 214px;
    padding-bottom: 26px;
  }

  #statsPanel .weekly-line-chart svg {
    inset: 8px 8px 26px 40px;
    width: calc(100% - 48px);
    height: calc(100% - 34px);
  }

  #statsPanel .weekly-y-axis {
    top: 8px;
    bottom: 26px;
    width: 34px;
    font-size: 10px;
  }

  #statsPanel .weekly-x-axis {
    right: 8px;
    left: 40px;
  }

  #statsPanel .weekly-x-axis span b {
    font-size: 8px;
  }

  #statsPanel .weekly-chart-tooltip {
    max-width: min(220px, calc(100vw - 24px));
    padding: 6px 8px;
  }

  #statsPanel .weekly-chart-tooltip strong {
    font-size: 12px;
  }

  #statsPanel .weekly-chart-tooltip span {
    font-size: 10px;
  }

  .stats-day-tooltip {
    min-width: 210px;
    max-width: min(260px, calc(100vw - 18px));
    max-height: min(300px, calc(100vh - 18px));
    padding: 10px;
  }

  .stats-day-tooltip strong {
    font-size: 12px;
  }

  .stats-day-tooltip-project {
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 7px;
  }

  .stats-day-tooltip b {
    font-size: 11px;
  }

  .stats-day-tooltip em {
    font-size: 10px;
  }

  .dashboard-project-row,
  .dashboard-task-row,
  .work-distribution {
    grid-template-columns: 1fr;
  }

  .dashboard-project-icon {
    justify-self: start;
  }

  .weekly-chart,
  .chart-days {
    gap: 10px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .projects-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    min-height: 0;
    gap: 10px;
    padding: 12px 14px 12px 12px;
  }

  .project-card-main {
    gap: 8px;
  }

  .project-meter {
    gap: 5px;
  }

  .project-card-footer {
    gap: 8px;
    padding-top: 8px;
  }

  .project-card-actions {
    gap: 6px;
  }

  .project-card-metrics {
    gap: 8px;
  }

  .project-metric-card {
    min-height: 168px;
    padding: 12px 8px 10px;
  }

  .project-metric-ring {
    width: 92px;
    height: 92px;
  }

  .project-view-tasks-btn,
  .project-add-task-btn,
  .project-edit-btn,
  .project-manage-btn,
  .project-quick-task-btn {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .projects-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-inline: 0;
  }

  .topbar {
    height: auto;
    min-height: 55px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .topbar-right,
  .topbar-left {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .search-box {
    width: 100%;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 12px 8px;
    border-left: 0;
  }

  .side-menu {
    grid-template-columns: 1fr;
  }

  .sidebar-section,
  .team-box,
  .storage-box {
    display: none;
  }

  .content {
    grid-column: 1;
    min-height: auto;
    border-right: 0;
    border-top-width: 4px;
  }

  .dashboard-panel {
    padding: 12px;
  }

  .dashboard-hero {
    display: grid;
    min-height: auto;
    padding: 24px;
  }

  .dashboard-hero h1 {
    font-size: 23px;
  }

  .hero-action {
    width: 100%;
  }

  .timer-panel,
  .timer-stop-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .timer-panel {
    padding: 22px;
  }

  .timer-panel strong {
    font-size: 36px;
  }

  .timer-actions,
  .timer-start-btn,
  .timer-stop-btn,
  .timer-cancel-btn,
  .timer-stop-box select {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card {
    border-radius: 10px;
  }

  .task-count-split {
    grid-template-columns: 1fr;
  }

  .task-count-split > div + div {
    border-right: 0;
    padding-right: 0;
    border-top: 1px solid #dfe8f0;
    padding-top: 14px;
  }

  .timer-overview-card,
  .task-count-card,
  .active-project-card,
  .progress-card,
  .dashboard-bottom-card {
    padding: 18px;
  }

  .activity-title,
  .activity-item {
    display: grid;
  }

  .page-panel {
    min-height: 70vh;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .page-title-row,
  .project-card {
    display: grid;
  }

  .project-card {
    gap: 12px;
    padding: 14px 12px;
    border-radius: 16px;
  }

  .project-card-display {
    gap: 10px;
    margin-top: 8px;
  }

  .project-card-hero {
    gap: 8px;
  }

  .project-card-status {
    font-size: 16px;
    line-height: 1.5;
  }

  .project-card-status-name {
    overflow-wrap: anywhere;
  }

  .project-progress-group {
    gap: 10px;
  }

  .project-time-row,
  .project-stats,
  .project-task-box,
  .project-quick-task-form,
  .project-normal-task-form,
  .manual-time-form,
  .project-member-form,
  .workspace-panel,
  .workspace-member-form,
  .project-room-layout,
  .project-chat-form,
  .direct-chat-shell,
  .direct-chat-form,
  .direct-chat-start-mini,
  .note-composer,
  .notes-grid,
  .admin-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-errors-view {
    min-height: 240px;
    max-height: 360px;
  }

  #accountPanel {
    padding: 0 18px 24px;
  }

  .account-v2-shell,
  .account-v2-form-grid,
  .account-plan-grid,
  .account-v2-tabs {
    grid-template-columns: 1fr;
  }

  .account-v2-sidebar {
    position: static;
  }

  .account-v2-tab {
    min-height: 48px;
  }

  .account-v2-card {
    padding: 18px;
  }

  .account-plan-hero {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .account-plan-hero-badge {
    min-width: 0;
  }

  .account-v2-card-head,
  .account-device-item,
  .account-v2-setting-row,
  .account-summary-row {
    display: grid;
    justify-content: stretch;
  }

  .account-summary-row strong {
    text-align: right;
  }

  .project-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-right: 0;
    border-right: 0;
    align-items: stretch;
  }

  .project-edit-btn--footer,
  .project-add-task-btn--footer {
    min-width: 0;
    padding: 9px 10px;
    font-size: 13px;
    white-space: normal;
  }

  .project-card-metrics,
  .project-card-actions--two {
    grid-template-columns: 1fr;
  }

  .project-progress-row {
    align-items: flex-start;
    gap: 8px;
  }

  .project-progress-row b {
    flex-wrap: wrap;
    justify-content: flex-end;
    white-space: normal;
    text-align: right;
  }

  .project-percent-badge {
    min-width: 0;
  }

  .project-detail-category-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .task-title-row,
  .task-summary-row,
  .task-create-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-title-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-assignee-field {
    display: grid;
  }

  .task-assignee-toggle,
  .task-assignee-select,
  .task-create-btn {
    width: 100%;
  }

  .my-task-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .my-tasks-table thead {
    display: none;
  }

  .my-task-mobile-row {
    display: table-row;
  }

  .my-tasks-table tr:not(.my-task-mobile-row):not(.my-task-empty-row) {
    display: none;
  }

  #projectDetailPanel .my-tasks-table-wrap {
    display: block !important;
    overflow: visible;
  }

  #projectDetailPanel .my-tasks-table {
    width: 100%;
    min-width: 0;
  }

  #projectDetailPanel .my-tasks-table thead {
    display: none !important;
  }

  #projectDetailPanel .my-tasks-table tbody {
    display: grid !important;
    gap: 10px;
  }

  #projectDetailPanel #taskList tr:not(.my-task-empty-row) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(36, 49, 61, 0.08);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }

  #projectDetailPanel #taskList td,
  #projectDetailPanel #taskList th {
    display: block !important;
    padding: 0;
    vertical-align: top;
    min-width: 0;
  }

  #projectDetailPanel #taskList tr.my-task-empty-row {
    display: block !important;
  }

  #projectDetailPanel #taskList tr.my-task-empty-row td {
    display: block !important;
    padding: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
  }

  #projectDetailPanel #taskList .task-info-trigger {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #projectDetailPanel #taskList td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  #projectDetailPanel #taskList td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  #projectDetailPanel #taskList td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }

  #projectDetailPanel #taskList td:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
  }

  #projectDetailPanel #taskList td:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  #projectDetailPanel #taskList td:nth-child(6) {
    grid-column: 4;
    grid-row: 2;
    justify-self: start;
  }

  #projectDetailPanel #taskList td:nth-child(7) {
    display: none !important;
  }

  #projectDetailPanel #taskList td:nth-child(8) {
    grid-column: 4;
    grid-row: 1;
    align-self: center;
  }

  #projectDetailPanel #taskList td:nth-child(5)::before,
  #projectDetailPanel #taskList td:nth-child(6)::before {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
  }

  #projectDetailPanel #taskList td:nth-child(5)::before {
    content: "تاریخ";
  }

  #projectDetailPanel #taskList td:nth-child(6)::before {
    content: "مسئول";
  }

  #projectDetailPanel #taskList .my-task-progress-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
  }

  #projectDetailPanel #taskList .my-task-due-edit-btn {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    text-align: right;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 11px;
    line-height: 1.5;
  }

  #projectDetailPanel #taskList td:nth-child(6) {
    color: #334155;
    font-size: 11px;
    white-space: nowrap;
  }

  #projectDetailPanel #taskList .my-task-actions {
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  #projectDetailPanel #taskList .my-task-edit-btn,
  #projectDetailPanel #taskList .my-task-delete-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }


  #projectDetailPanel .my-task-priority-dot-compact {
    width: auto;
    height: 28px;
    min-width: 72px;
    border-radius: 999px;
    padding: 0 10px;
    border: 1px solid rgba(36, 49, 61, 0.2);
    font-size: 11px;
    color: #1f2937;
    text-indent: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }

  .my-task-mobile-row td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(36, 49, 61, 0.08);
  }

  .my-task-card > span {
    grid-column: auto;
    justify-self: start;
  }

  .task-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .task-status-select {
    width: 100%;
  }

  .project-add-btn {
    width: 100%;
  }

  #directChatPanel .direct-chat-shell {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 12px;
  }

  #directChatPanel .direct-chat-members,
  #directChatPanel .direct-chat-room {
    height: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  #directChatPanel .direct-chat-members {
    min-height: 220px;
    max-height: 320px;
  }

  #directChatPanel .direct-chat-room {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: calc(100dvh - 520px);
    overflow: hidden;
  }

  #directChatPanel .direct-chat-messages {
    max-height: none;
    overflow-y: auto;
  }

  #directChatPanel .direct-chat-back-btn {
    display: inline-grid;
    place-items: center;
  }

  #directChatPanel .direct-chat-room {
    min-height: max(340px, calc(100dvh - 520px));
  }

  #directChatPanel .direct-chat-form {
    margin-top: 0;
    padding-top: 8px;
    background: #fff;
  }

  .direct-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "input send"
      "task emoji";
    gap: 8px;
    align-items: stretch;
  }

  .direct-chat-composer textarea {
    grid-area: input;
    min-height: 72px;
    height: auto;
    max-height: 140px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .direct-chat-composer .direct-chat-actions {
    display: contents;
  }

  .direct-chat-composer .direct-chat-actions button {
    height: 42px;
    border-radius: 14px;
    font-size: 14px;
  }

  .direct-chat-composer #directChatTaskBtn,
  .direct-chat-composer #projectChatTaskBtn {
    grid-area: task;
    width: 100%;
    min-width: 0;
    height: 42px;
    justify-self: stretch;
    justify-content: center;
  }

  .direct-chat-composer #directChatEmojiBtn,
  .direct-chat-composer #projectChatEmojiBtn,
  .direct-chat-composer #directChatSendBtn,
  .direct-chat-composer #projectChatSendBtn {
    min-width: 0;
  }

  .direct-chat-composer #directChatEmojiBtn,
  .direct-chat-composer #projectChatEmojiBtn {
    grid-area: emoji;
    width: 100%;
  }

  .direct-chat-composer #directChatSendBtn,
  .direct-chat-composer #projectChatSendBtn {
    grid-area: send;
    width: 48px;
    min-height: 72px;
    height: 100%;
    align-self: stretch;
    justify-self: end;
  }

  .projects-shell {
    padding: 0 18px 18px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    padding: 0 18px 18px;
  }

  .form-shell {
    margin: 18px;
  }

  .form-header,
  form {
    padding-right: 20px;
    padding-left: 20px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .submit-btn,
  .clear-btn {
    width: 100%;
  }
}
.project-detail-modern-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 32px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6767ec, #13b37e);
  border-radius: 18px;
  color: #fff;
}

.project-detail-back {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
  font-weight: 800;
}

.project-detail-modern-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.project-detail-modern-head p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.project-detail-hero-progress {
  text-align: center;
}

.project-detail-hero-progress b {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.project-detail-modern-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 32px 14px;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: #f1f4f8;
  box-shadow: none;
}

.project-detail-modern-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.project-detail-modern-tabs button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(30, 64, 110, 0.1);
}

.project-detail-modern-tabs button.active {
  color: #0f2a45;
  border-color: #d8e4f3;
  background: #dfeaf8;
  box-shadow: none;
}

.project-detail-modern-tabs button span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.project-detail-modern-tabs button.active span {
  background: #ffffff;
  color: #0f2a45;
}

.project-detail-overview-shell {
  display: grid;
  gap: 14px;
  padding: 0 32px 28px;
}

.project-detail-task-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#projectDetailPanel #projectDetailTaskFilters {
  display: none !important;
}

.project-detail-task-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: #e7edf2;
  border-radius: 12px;
}

.project-detail-task-filters button {
  padding: 8px 14px;
  border-radius: 10px;
  color: #5d7088;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.project-detail-task-filters button.active {
  color: #1f2f46;
  background: #fff;
  box-shadow: 0 8px 18px rgba(36, 49, 61, 0.1);
}

.contacts-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contacts-composer {
  margin: 0 32px 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
}

.contacts-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contacts-form .field {
  display: grid;
  gap: 6px;
}

.contacts-form .field-wide {
  grid-column: 1 / -1;
}

.contacts-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contacts-form input,
.contacts-form select,
.contacts-form textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.contacts-form input,
.contacts-form select {
  height: 44px;
}

.contacts-form textarea {
  min-height: 94px;
  resize: vertical;
  padding-top: 10px;
}

.contacts-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn {
  height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: #eef2f7;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.contacts-form small {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.contacts-role-tabs {
  margin: 0 32px 16px;
}

.contacts-table-wrap {
  margin: 0 32px 32px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 49, 61, 0.08);
  overflow: hidden;
}

.contacts-table {
  width: 100%;
  border-collapse: collapse;
}

.contacts-table th,
.contacts-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(36, 49, 61, 0.08);
  text-align: right;
  vertical-align: top;
  font-size: 13px;
}

.contacts-table th {
  color: var(--muted);
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

.contacts-table tbody tr:hover {
  background: #fbfdff;
}

.contacts-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: var(--primary-dark);
  background: rgba(103, 103, 236, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.contacts-name-cell {
  display: grid;
  gap: 4px;
}

.contacts-name-cell strong {
  color: var(--night);
  font-size: 13px;
}

.contacts-name-cell small {
  color: var(--muted);
  font-size: 11px;
}

.contacts-table-row {
  cursor: pointer;
}

.contact-detail-shell {
  display: grid;
  gap: 18px;
  margin: 0 32px 32px;
}

.contact-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(36, 49, 61, 0.08);
}

.contact-detail-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  background: #eef4fb;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.contact-detail-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contact-detail-head-copy span,
.contact-detail-notes-card small,
.contact-detail-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-detail-head-copy h1 {
  margin: 0;
  color: var(--night);
  font-size: 24px;
  line-height: 1.35;
}

.contact-detail-head-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: var(--primary-dark);
  background: rgba(103, 103, 236, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.contact-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contact-detail-card,
.contact-detail-notes-card {
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(36, 49, 61, 0.08);
}

.contact-detail-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
}

.contact-detail-card strong {
  color: var(--night);
  font-size: 16px;
  line-height: 1.6;
  word-break: break-word;
}

.contact-detail-notes-card {
  display: grid;
  gap: 12px;
}

.contact-detail-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-detail-notes-head h2 {
  margin: 4px 0 0;
  color: var(--night);
  font-size: 18px;
}

.contact-detail-notes-card p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
}

.contact-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 2px;
}

.contact-detail-tabs button {
  height: 42px;
  padding: 0 14px;
  color: #5d7088;
  background: #eef3fb;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.contact-detail-tabs button.active {
  color: #1f2f46;
  background: #fff;
  box-shadow: 0 8px 18px rgba(36, 49, 61, 0.1);
}

.contact-detail-pane {
  display: grid;
  gap: 14px;
}

.contact-detail-pane-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.contact-detail-pane-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-detail-pane-head h2 {
  margin: 4px 0 0;
  color: var(--night);
  font-size: 18px;
}

.contact-detail-pane-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.contact-detail-form,
.contact-detail-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(36, 49, 61, 0.08);
}

.contact-detail-form .field,
.contact-detail-entry-form .field {
  display: grid;
  gap: 6px;
}

.contact-detail-form .field-wide,
.contact-detail-entry-form .field-wide {
  grid-column: 1 / -1;
}

.contact-detail-form label,
.contact-detail-entry-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-detail-form input,
.contact-detail-form textarea,
.contact-detail-form select,
.contact-detail-entry-form input,
.contact-detail-entry-form textarea,
.contact-detail-entry-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.contact-detail-form textarea,
.contact-detail-entry-form textarea {
  min-height: 96px;
  resize: vertical;
}

.contact-detail-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-detail-form-actions small {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.contact-detail-project-actions {
  justify-content: space-between;
}

.contact-detail-list {
  display: grid;
  gap: 12px;
}

#contactDetailProjectsList {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.contact-detail-project-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px 14px 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(206, 216, 233, 0.95);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(23, 38, 66, 0.1);
}

.contact-detail-project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 56px;
  background: linear-gradient(180deg, rgba(103, 103, 236, 0.05), transparent);
  pointer-events: none;
}

.contact-detail-project-badge {
  position: relative;
  z-index: 1;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(206, 216, 233, 0.95);
  background: #fff;
  color: #5b6677;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(23, 38, 66, 0.06);
}

.contact-detail-project-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1px solid rgba(206, 216, 233, 0.95);
  background: #fff;
  color: #19b0c8;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(23, 38, 66, 0.08);
}

.contact-detail-project-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.contact-detail-project-title-row h3 {
  margin: 0;
  color: #182033;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.contact-detail-project-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1fc16b;
  box-shadow: 0 0 0 4px rgba(31, 193, 107, 0.15);
}

.contact-detail-project-subtitle {
  position: relative;
  z-index: 1;
  color: #6a7487;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.contact-detail-project-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.contact-detail-project-meta-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 193, 107, 0.18);
  background: rgba(31, 193, 107, 0.08);
  color: #15874a;
  font-size: 11px;
  font-weight: 900;
}

.contact-detail-project-meta-pill--soft {
  border-color: rgba(90, 105, 128, 0.16);
  background: rgba(90, 105, 128, 0.08);
  color: #516175;
}

.contact-detail-project-meta-pill--accent {
  border-color: rgba(103, 103, 236, 0.2);
  background: rgba(103, 103, 236, 0.1);
  color: #5656d6;
}

.contact-detail-project-progress {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 6px;
}

.contact-detail-project-progress-bar {
  width: 100%;
  height: 12px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf2f8, #e6ecf4);
  box-shadow: inset 0 1px 2px rgba(23, 38, 66, 0.08);
}

.contact-detail-project-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ec56f 0%, #19b0c8 100%);
  box-shadow: 0 5px 14px rgba(31, 193, 107, 0.22);
}

.contact-detail-project-actions-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.contact-detail-project-btn {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.contact-detail-project-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #6f62f7, #5647e6);
  border: 1px solid rgba(86, 71, 230, 0.18);
  box-shadow: 0 12px 24px rgba(86, 71, 230, 0.18);
}

.contact-detail-project-btn--ghost {
  color: #273245;
  background: #fff;
  border: 1px solid rgba(206, 216, 233, 0.95);
  box-shadow: 0 10px 20px rgba(23, 38, 66, 0.06);
}

.contact-detail-project-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.contact-project-add-modal-card {
  width: min(820px, calc(100vw - 24px));
}

.contact-project-add-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.contact-project-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  background: #fff;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
  font: inherit;
}

.contact-project-pick strong {
  display: block;
  color: var(--night);
  font-size: 14px;
}

.contact-project-pick small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.contact-project-pick span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(103, 103, 236, 0.1);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
}

.contact-project-pick.is-selected {
  opacity: 0.72;
  cursor: default;
  border-style: dashed;
}

.contact-detail-item-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(32, 55, 76, 0.08);
}

.contact-detail-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.contact-detail-item-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.contact-detail-item-head h3 {
  margin: 4px 0 0;
  color: var(--night);
  font-size: 15px;
}

.contact-detail-item-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.contact-detail-item-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.contact-detail-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-detail-item-actions button,
.ghost-btn {
  height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #eef2f7;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.contact-detail-item-actions button {
  height: 34px;
  background: #f6f8fc;
}

.contact-detail-item-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 1200px) {
  #contactDetailProjectsList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .contact-detail-shell,
  .contacts-composer,
  .contacts-role-tabs,
  .contacts-table-wrap {
    margin-inline: 16px;
  }

  .contact-detail-grid,
  .contacts-form {
    grid-template-columns: 1fr;
  }

  .contact-detail-head {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .contact-detail-form,
  .contact-detail-entry-form {
    grid-template-columns: 1fr;
  }

  .contact-detail-pane-head {
    flex-direction: column;
    align-items: flex-start;
  }

  #contactDetailProjectsList {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .contact-detail-shell {
    gap: 14px;
    margin-bottom: 20px;
  }

  .contact-detail-head {
    padding: 16px;
    gap: 12px;
  }

  .contact-detail-head-copy h1 {
    font-size: 20px;
  }

  .contact-detail-card,
  .contact-detail-notes-card {
    padding: 14px;
  }

  .contact-detail-form,
  .contact-detail-entry-form {
    padding: 14px;
  }
}

.project-detail-add-task-btn {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, #6767ec, #12b37e);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(14, 163, 113, 0.28);
}

.project-detail-summary-card,
.project-detail-stats-grid article,
.project-detail-progress-card,
.project-detail-recent-card,
.project-detail-tools {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(32, 55, 76, 0.08);
}

.project-detail-board-pane {
  display: grid;
}

.project-detail-gantt-pane {
  display: grid;
  gap: 8px;
  background: #f7f9fc;
  border: 1px solid #e5ebf2;
  border-radius: 16px;
  box-shadow: none;
  padding: 10px;
}

.project-gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-gantt-toolbar-right,
.project-gantt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-gantt-toolbar button,
.project-gantt-toolbar strong {
  height: 34px;
  border-radius: 10px;
  border: 1px solid #dfe6ef;
  background: #fff;
  padding: 0 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.project-gantt-toolbar strong {
  background: #f8fafd;
}

.project-gantt-toolbar .project-gantt-add-btn {
  background: linear-gradient(135deg, #7c4dff, #6d28d9);
  border-color: #7c4dff;
  color: #fff;
}

.project-gantt-toolbar .is-muted {
  background: #fff;
  color: #64748b;
}

.project-gantt-body {
  overflow: auto;
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  background: #fff;
}

.project-gantt-grid {
  min-width: 100%;
  width: max-content;
  direction: rtl;
}

.project-gantt-grid-head,
.project-gantt-grid-row {
  display: grid;
  grid-template-columns: 120px 82px 140px minmax(0, 1fr);
  align-items: center;
  direction: rtl;
}

.project-gantt-grid-head > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid #edf1f6;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  background: #f7f9fc;
  direction: rtl;
}

.project-gantt-head-time {
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: 22px 42px;
}

.project-gantt-head-weeks {
  display: grid;
  grid-template-columns: repeat(31, minmax(22px, 1fr));
  border-bottom: 1px solid #edf1f6;
}

.project-gantt-head-weeks span {
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #334155;
  font-weight: 800;
  border-left: 1px solid #edf1f6;
}

.project-gantt-head-days {
  display: grid !important;
  grid-template-columns: repeat(31, minmax(22px, 1fr));
  gap: 0;
  padding: 0 !important;
}

.project-gantt-head-days span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-left: 1px solid #edf1f6;
  font-size: 11px;
  color: #475569;
  font-weight: 700;
}

.project-gantt-grid-body {
  position: relative;
}

.project-gantt-grid-row > div {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-top: 1px solid #edf1f6;
  border-left: 1px solid #edf1f6;
  direction: rtl;
}

.project-gantt-cell-status .project-gantt-status-badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.project-gantt-status-badge.done {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.project-gantt-status-badge.in_progress {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.project-gantt-status-badge.review {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}

.project-gantt-status-badge.open {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

.project-gantt-cell-owner,
.project-gantt-cell-task {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.project-gantt-cell-task {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-gantt-cell-owner {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.project-gantt-owner-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.project-gantt-cell-timeline {
  position: relative;
  overflow: hidden;
  direction: rtl;
  unicode-bidi: plaintext;
  padding: 0 !important;
  background-color: #fff;
  background-image: repeating-linear-gradient(
    to left,
    transparent 0,
    transparent calc(var(--gantt-day-col, 32px) - 1px),
    #eff3f8 calc(var(--gantt-day-col, 32px) - 1px),
    #eff3f8 var(--gantt-day-col, 32px)
  );
}

.project-gantt-cell-timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--today-pos, 0%);
  width: 2px;
  background: #8b5cf6;
  opacity: 0.85;
  z-index: 2;
}

.project-gantt-timeline-grid {
  display: grid;
  height: 56px;
  align-items: center;
}

.project-gantt-task-bar {
  position: relative;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  margin: 0 2px;
  overflow: visible;
}

.project-gantt-task-bar.color-0 { background: linear-gradient(135deg, #9b8af9, #7c6cf0); }
.project-gantt-task-bar.color-1 { background: linear-gradient(135deg, #7ca8f7, #5c8ef0); }
.project-gantt-task-bar.color-2 { background: linear-gradient(135deg, #60c9ef, #41b3e4); }
.project-gantt-task-bar.color-3 { background: linear-gradient(135deg, #f8ca74, #f1b44a); }
.project-gantt-task-bar.color-4 { background: linear-gradient(135deg, #78d38f, #57c477); }
.project-gantt-task-bar.is-overdue { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }

.project-gantt-task-bar b {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-gantt-task-bar i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 6px;
}

.project-gantt-today-line {
  display: none;
}

.project-gantt-cell-timeline .project-gantt-task-bar {
  z-index: 3;
}

.gantt-hover-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
  transform: translate(-50%, -100%);
}


.project-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-board-column {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.1);
  border-radius: 14px;
  min-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.project-board-column[data-board-status="open"] {
  background: linear-gradient(180deg, #ffedd5, #fff7ed 34%, #ffffff 78%);
  border-color: rgba(249, 115, 22, 0.5);
}

.project-board-column[data-board-status="in_progress"] {
  background: linear-gradient(180deg, #dbeafe, #eff6ff 34%, #ffffff 78%);
  border-color: rgba(59, 130, 246, 0.52);
}

.project-board-column[data-board-status="done"] {
  background: linear-gradient(180deg, #d1fae5, #ecfdf5 34%, #ffffff 78%);
  border-color: rgba(16, 185, 129, 0.5);
}

.project-board-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(36, 49, 61, 0.08);
}

.project-board-column > header h4 {
  margin: 0;
  color: #1f2f46;
  font-size: 14px;
  font-weight: 900;
}

.project-board-column > header span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.project-board-column[data-board-status="open"] > header {
  border-bottom-color: rgba(249, 115, 22, 0.2);
}

.project-board-column[data-board-status="open"] > header h4 {
  color: #9a3412;
}

.project-board-column[data-board-status="open"] > header span {
  background: #fdba74;
  color: #9a3412;
}

.project-board-column[data-board-status="in_progress"] > header {
  border-bottom-color: rgba(59, 130, 246, 0.2);
}

.project-board-column[data-board-status="in_progress"] > header h4 {
  color: #1d4ed8;
}

.project-board-column[data-board-status="in_progress"] > header span {
  background: #93c5fd;
  color: #1e40af;
}

.project-board-column[data-board-status="done"] > header {
  border-bottom-color: rgba(16, 185, 129, 0.22);
}

.project-board-column[data-board-status="done"] > header h4 {
  color: #047857;
}

.project-board-column[data-board-status="done"] > header span {
  background: #86efac;
  color: #065f46;
}

.project-board-dropzone {
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.project-board-dropzone.is-over {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
  border-radius: 10px;
}

.project-board-column[data-board-status="open"] .project-board-dropzone.is-over {
  background: #fed7aa;
  box-shadow: inset 0 0 0 2px rgba(249, 115, 22, 0.55);
}

.project-board-column[data-board-status="in_progress"] .project-board-dropzone.is-over {
  background: #bfdbfe;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.58);
}

.project-board-column[data-board-status="done"] .project-board-dropzone.is-over {
  background: #bbf7d0;
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.56);
}

.project-board-card {
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.14);
  border-radius: 12px;
  padding: 10px 11px;
  display: grid;
  gap: 6px;
  box-shadow: 0 8px 18px rgba(33, 55, 78, 0.08);
}

.project-board-card strong {
  color: #1f2f46;
  font-size: 13px;
  line-height: 1.8;
}

.project-board-card small {
  color: #5f748d;
  font-size: 11px;
  font-weight: 700;
}

.project-board-card.is-draggable {
  cursor: grab;
}

.project-board-card.is-draggable:active {
  cursor: grabbing;
}

.project-board-card.is-dragging {
  opacity: 0.58;
}

.project-board-card.is-locked {
  border-style: dashed;
  opacity: 0.88;
}

.project-detail-summary-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.project-detail-summary-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e6f6ef;
  color: #0f9a67;
  font-size: 30px;
  font-weight: 900;
}

.project-detail-summary-card h2 {
  margin: 0;
  color: #1f2f46;
  font-size: 16px;
  font-weight: 900;
}

.project-detail-summary-card p {
  margin: 6px 0 0;
  color: #4f637d;
  font-size: 13px;
  line-height: 1.8;
}

.project-detail-summary-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-detail-summary-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #eef4f8;
  color: #3f546d;
}

.project-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.project-detail-stats-grid article {
  padding: 14px;
}

.project-detail-stats-grid small {
  color: #647a94;
  font-size: 12px;
  font-weight: 800;
}

.project-detail-stats-grid b {
  display: block;
  margin-top: 8px;
  color: #1f2f46;
  font-size: 18px;
  font-weight: 900;
}

.project-detail-progress-card {
  padding: 16px;
}

.project-detail-progress-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1f2f46;
}

.project-detail-progress-card strong,
.project-detail-progress-card b {
  font-size: 14px;
  font-weight: 900;
}

.project-detail-progress-track {
  margin-top: 10px;
  height: 16px;
  border-radius: 999px;
  background: #dde5ed;
  overflow: hidden;
}

.project-detail-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0fa371, #18b881);
}

.project-detail-progress-card p {
  margin: 10px 0 0;
  color: #647a94;
  font-size: 12px;
  font-weight: 700;
}

.project-overview-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-overview-card {
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(32, 55, 76, 0.08);
}

.project-overview-card small {
  color: #6b8099;
  font-size: 11px;
  font-weight: 800;
}

.project-overview-card h4 {
  margin: 8px 0 0;
  color: #1f2f46;
  font-size: 18px;
  font-weight: 900;
}

.project-overview-meta,
.project-overview-kpis {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-overview-meta span,
.project-overview-kpis span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4f8;
  color: #3f546d;
  font-size: 11px;
  font-weight: 800;
}

.project-overview-time-track {
  margin-top: 10px;
  height: 12px;
  border-radius: 999px;
  background: #dde5ed;
  overflow: hidden;
}

.project-overview-time-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6767ec, #8a8af5);
}

.project-overview-card p {
  margin: 10px 0 0;
  color: #647a94;
  font-size: 12px;
  font-weight: 700;
}

.project-detail-recent-card {
  padding: 16px;
}

.project-detail-recent-card h3 {
  margin: 0 0 10px;
  color: #1f2f46;
  font-size: 16px;
  font-weight: 900;
}

/* Project detail overview v2 (RTL, inspired by provided design) */
.project-detail-overview-v2 {
  display: grid;
  gap: 12px;
}

.pdv2-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid #dfe7f1;
  border-radius: 16px;
}

.pdv2-hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: linear-gradient(135deg, #ececff, #dfe2ff);
  font-size: 42px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.pdv2-hero-content h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

.pdv2-hero-content p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.pdv2-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pdv2-stat-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dfe7f1;
  background: linear-gradient(135deg, #ffffff, #f4f8ff);
  display: grid;
  gap: 4px;
}

.pdv2-stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f8f5ff, #f1efff);
}

.pdv2-stat-card:nth-child(3) {
  background: linear-gradient(135deg, #edfdf8, #e7f8f3);
}

.pdv2-stat-card:nth-child(4) {
  background: linear-gradient(135deg, #fff7ef, #fff2e5);
}

.pdv2-stat-card small {
  color: #1f2f46;
  font-size: 13px;
  font-weight: 800;
}

.pdv2-stat-card b {
  color: #0f172a;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
}

.pdv2-stat-card span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.pdv2-progress-wrap {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  background: #fff;
}

.pdv2-progress-ring {
  width: 150px;
  height: 150px;
  margin: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) 0deg, var(--primary) 0deg, #dce5ee 0deg);
  position: relative;
}

.pdv2-progress-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
}

.pdv2-progress-ring b {
  position: relative;
  z-index: 1;
  color: #0f172a;
  font-size: 34px;
  font-weight: 800;
}

.pdv2-progress-main {
  display: grid;
  gap: 10px;
}

.pdv2-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdv2-progress-top strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
}

.pdv2-progress-top b {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.pdv2-progress-main .project-detail-progress-track {
  margin-top: 0;
  height: 18px;
}

.pdv2-progress-main .project-detail-progress-track span {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

@media (max-width: 1200px) {
  .pdv2-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdv2-progress-wrap {
    grid-template-columns: 1fr;
  }
}

/* Project Detail Refresh */
#projectDetailPanel {
  background: #fff;
}

.project-detail-modern-head {
  margin: 0 24px 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--night), var(--primary-dark));
  box-shadow: 0 16px 34px rgba(23, 36, 47, 0.24);
}

.project-detail-modern-head h1 {
  font-size: 22px;
  font-weight: 800;
}

.project-detail-modern-tabs {
  margin: 0 24px 14px;
  padding: 6px;
  border-radius: 14px;
  background: #eaf0f7;
  overflow-x: auto;
}

.project-detail-modern-tabs button {
  white-space: nowrap;
  background: transparent;
  border-color: transparent;
  border-radius: 10px;
}

.project-detail-modern-tabs button.active {
  background: #ffffff;
  border-color: #d8e1ee;
}

.project-detail-overview-shell {
  gap: 12px;
  padding: 0 24px 24px;
}

.project-detail-summary-card,
.project-detail-stats-grid article,
.project-detail-progress-card,
.project-detail-report-card,
.project-overview-card,
.project-detail-recent-card,
.project-detail-tools,
.project-detail-task-toolbar,
.project-detail-board-pane,
.project-detail-gantt-pane,
.project-detail-calendar-pane,
.project-detail-time-pane,
.project-detail-chat-pane,
.project-detail-members-pane {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(32, 55, 76, 0.08);
}

.project-detail-task-toolbar {
  padding: 10px 12px;
}

.project-detail-summary-card {
  padding: 16px;
}

.project-detail-stats-grid {
  gap: 10px;
}

.project-detail-stats-grid article {
  padding: 12px;
}

.project-detail-progress-card {
  padding: 14px;
}

.project-detail-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-detail-report-card {
  padding: 12px;
  display: grid;
  gap: 7px;
}

.project-detail-report-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.project-detail-report-card b {
  color: #1e293b;
  font-size: 20px;
  font-weight: 800;
}

.project-overview-insights {
  gap: 10px;
}

.project-overview-card {
  padding: 14px;
}

.project-detail-recent-card {
  padding: 14px;
}

.project-detail-time-pane {
  padding: 16px;
}

.project-time-entries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-time-entries-head h3 {
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
}

.project-time-entries-settings-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
}

.project-time-entries-settings-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #fee2e2;
  border-radius: 14px;
  background: #fff8f8;
}

.project-time-entries-settings-card strong {
  color: #991b1b;
  font-size: 15px;
  font-weight: 900;
}

.project-time-entries-settings-card p {
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.7;
}

.project-time-entries-restore-deadline {
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.project-time-entries-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.project-time-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.project-time-entry-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-time-entry-summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-time-entry-summary span {
  color: #64748b;
  font-size: 12px;
}

.project-time-entry-duration {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.project-time-entry-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-time-entry-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.project-time-entry-btn.danger {
  color: #b91c1c;
  background: #fff5f5;
  border-color: #fecaca;
}

@media (max-width: 760px) {
  .project-time-entry-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-time-entry-actions {
    justify-content: flex-start;
  }
}

.project-detail-recent-list {
  background: transparent;
  border: 0;
  padding: 0;
}

.project-task-modal-card {
  max-width: 780px;
  width: min(92vw, 780px);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.task-create-row-modal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-create-row-modal .task-assignee-field,
.task-create-row-modal .task-create-btn {
  grid-column: 1 / -1;
}

.task-date-field-jalali {
  position: relative;
}

#taskDueDisplayInput,
#projectTaskNormalDueDisplayInput,
#projectTaskEditDueDisplayInput {
  cursor: pointer;
  background: #fff;
  min-width: 220px;
}

.task-date-field-jalali {
  width: 100%;
}

.task-date-field-jalali input[type="text"] {
  width: 100%;
}

#projectTaskEditProgressValue {
  color: #1d4ed8;
  font-weight: 700;
  margin-right: 6px;
}

.task-progress-slider {
  width: 100%;
  height: 6px;
  accent-color: #2563eb;
  cursor: pointer;
}

#projectTaskEditForm .project-time-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
  width: 100%;
}

#projectTaskEditForm .project-time-row-meta {
  margin-bottom: 4px;
}

#projectTaskEditForm .project-time-row-dates {
  margin-bottom: 6px;
}

#projectTaskEditForm .project-time-row .field {
  min-width: 0;
}

#projectTaskEditForm #projectTaskEditDueDisplayInput,
#projectTaskEditForm #projectTaskEditStartDisplayInput {
  min-width: 0;
  width: 100%;
}

.task-jalali-picker {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #cfe0f8;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.09), transparent 48%),
    linear-gradient(165deg, #f8fbff, #f2f8ff 58%, #edf6ff);
  box-shadow:
    0 10px 24px rgba(37, 99, 235, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.task-jalali-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.task-jalali-head button {
  padding: 7px 12px;
  border-radius: 9px;
  color: #1e40af;
  background: #e6efff;
  border: 1px solid #c7d9fb;
  font-weight: 800;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.task-jalali-head button:hover {
  background: #d7e7ff;
  transform: translateY(-1px);
}

.task-jalali-head strong {
  color: #1f2f46;
  font-size: 14px;
}

.task-jalali-head select {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  padding: 6px 4px;
  border-radius: 9px;
  border: 1px solid #c7d9fb;
  background: #f4f8ff;
  color: #1e3a8a;
  font-weight: 800;
  text-align: center;
}

#accountBirthJalaliMonthSelect {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.stats-jalali-picker {
  position: fixed;
  width: min(340px, calc(100vw - 48px));
  margin-top: 0;
  margin-inline-start: 0;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
  z-index: 1200;
}

.stats-jalali-picker .task-jalali-head {
  margin-bottom: 8px;
  gap: 6px;
}

.stats-jalali-picker .task-jalali-head button {
  padding: 6px 9px;
  font-size: 11px;
}

.stats-jalali-picker .task-jalali-head strong {
  font-size: 12px;
}

.stats-jalali-picker .task-jalali-head select {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  font-size: 11px;
}

.stats-jalali-picker .task-jalali-days {
  gap: 4px;
}

.stats-jalali-picker .task-jalali-weekdays span,
.stats-jalali-picker .task-jalali-days button {
  font-size: 11px;
}

.stats-jalali-picker .task-jalali-time {
  margin-top: 8px;
}

.stats-jalali-picker .task-jalali-time button {
  padding: 8px 10px;
  font-size: 11px;
}

.task-jalali-weekdays,
.task-jalali-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.task-jalali-weekdays span {
  text-align: center;
  color: #5d748e;
  font-size: 12px;
  font-weight: 800;
}

.task-jalali-days button {
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7e4f1;
  color: #1f2f46;
  font-size: 12px;
  font-weight: 800;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.task-jalali-days button:not(.is-empty):hover {
  background: #eff6ff;
  border-color: #b7cff5;
  transform: translateY(-1px);
}

.task-jalali-days button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.32);
}

.task-jalali-days button.active:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.task-jalali-days button.is-empty {
  background: transparent;
  border-color: transparent;
}

.task-jalali-time {
  margin-top: 10px;
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.task-jalali-time label {
  display: grid;
  gap: 6px;
  color: #5d748e;
  font-size: 12px;
  font-weight: 800;
}

.task-jalali-time select {
  min-width: 76px;
}

.task-jalali-time button {
  border-radius: 10px;
  padding: 8px 12px;
}

.task-status-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(36, 49, 61, 0.12);
  background: #f8fbfc;
  font-size: 12px;
  font-weight: 800;
}

.task-action-readonly {
  color: #7a8794;
  font-size: 12px;
  font-weight: 700;
}

.my-task-edit-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-size: 0;
  font-weight: 800;
}

.my-task-delete-btn::before,
.my-task-edit-btn::before {
  content: "";
  width: 17px;
  height: 17px;
  display: block;
  background-color: currentColor;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.icon-delete::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 14h10l1-14'/%3E%3Cpath d='M10 10v7'/%3E%3Cpath d='M14 10v7'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 14h10l1-14'/%3E%3Cpath d='M10 10v7'/%3E%3Cpath d='M14 10v7'/%3E%3C/svg%3E");
}

.icon-edit::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
}

.icon-board::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M8 9v11'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M8 9v11'/%3E%3C/svg%3E");
}

.task-whiteboard-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}

.task-whiteboard-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.task-whiteboard-toolbar button {
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid #dbe4ef;
  background: #fff;
  color: #1f2f46;
  font-size: 12px;
  font-weight: 800;
}

.task-whiteboard-toolbar button.active {
  background: #e8f1ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.task-whiteboard-stage {
  height: min(60vh, 520px);
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

#taskWhiteboardCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  background: #fff;
}

#taskJalaliApplyBtn,
#myTaskDueSaveBtn,
#projectTaskNormalJalaliApplyBtn {
  color: #fff;
  font-weight: 900;
  border: 1px solid #1d4ed8;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

#taskJalaliApplyBtn:hover,
#myTaskDueSaveBtn:hover,
#projectTaskNormalJalaliApplyBtn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

#taskJalaliClearBtn,
#myTaskDueClearBtn,
#projectTaskNormalJalaliClearBtn {
  color: #7f1d1d;
  border: 1px solid #fecaca;
  background: #fff5f5;
}

.project-detail-tools {
  padding: 14px;
}

.project-detail-tools > summary {
  cursor: pointer;
  color: #1f2f46;
  font-size: 14px;
  font-weight: 900;
}

.project-detail-tools > summary::-webkit-details-marker {
  display: none;
}

.project-detail-chat-pane {
  display: grid;
  gap: 12px;
}

.project-detail-members-pane {
  display: grid;
  gap: 12px;
}

.project-detail-calendar-pane {
  display: grid;
  gap: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.14), transparent 35%),
    radial-gradient(circle at 90% 100%, rgba(103, 103, 236, 0.1), transparent 32%),
    #fbfdff;
  border: 1px solid #d6e4f5;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(30, 64, 110, 0.08);
}

.project-calendar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(191, 219, 254, 0.8);
}

.project-calendar-head h3 {
  margin: 0;
  color: #0f2942;
  font-size: 17px;
  font-weight: 900;
  margin-left: auto;
  margin-right: 4px;
}

.project-calendar-month-picker {
  position: relative;
  margin-left: auto;
}

.project-calendar-month-trigger {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid #c8dcf5;
  color: #0f2942;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(15, 58, 104, 0.08);
}

.project-calendar-month-trigger::after {
  content: "▾";
  margin-right: 8px;
  font-size: 11px;
  color: #335b84;
}

.project-calendar-month-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 82vw);
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #cfe0f2;
  box-shadow: 0 18px 34px rgba(30, 64, 110, 0.16);
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-calendar-month-option {
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid #d7e4f3;
  background: #f5f9ff;
  color: #1f3d5a;
  font-size: 12px;
  font-weight: 800;
}

.project-calendar-month-option.active {
  background: linear-gradient(140deg, #0ea5e9, #2563eb);
  color: #fff;
  border-color: #1d4ed8;
}

.project-calendar-head button {
  padding: 9px 12px;
  border-radius: 11px;
  background: #eef5ff;
  border: 1px solid #d2e4ff;
  color: #15437a;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(15, 58, 104, 0.09);
}

.project-calendar-head button:hover {
  background: #dcecff;
}

.project-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f1f8ff, #f7fbff);
  border: 1px solid #dbe9f8;
}

.project-calendar-weekday {
  text-align: center;
  color: #4f6782;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 0;
}

.project-calendar-day {
  min-height: 118px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
  padding: 7px 7px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.9), transparent 40%),
    #ffffff;
  border: 1px solid #cddff2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-calendar-day-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.project-calendar-day:not(.is-empty):not(.is-active):nth-of-type(4n + 1) {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, #f7fbff, #ffffff);
}

.project-calendar-day:not(.is-empty):not(.is-active):nth-of-type(4n + 2) {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, #f4fff7, #ffffff);
}

.project-calendar-day:not(.is-empty):not(.is-active):nth-of-type(4n + 3) {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, #fffaf1, #ffffff);
}

.project-calendar-day:not(.is-empty):not(.is-active):nth-of-type(4n + 4) {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, #f6f7ff, #ffffff);
}

.project-calendar-day:hover:not(.is-empty) {
  transform: translateY(-2px);
  border-color: #bdd6f4;
  box-shadow: 0 10px 20px rgba(30, 78, 132, 0.12);
}

.project-calendar-day b {
  color: #19324d;
  font-size: 13px;
  font-weight: 900;
}

.project-calendar-day span {
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
  margin-top: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dff7ee;
}

.project-calendar-day .project-calendar-day-count {
  color: #085f46;
  background: #bff3df;
  border: 1px solid #7ad8b4;
}

.project-calendar-day-tasks {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  display: grid;
  gap: 4px;
}

.project-calendar-day-tasks li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  border-radius: 7px;
  background: #e8f2ff;
  color: #1d3f66;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.project-calendar-day-tasks li:nth-child(2n) {
  background: #e8fff4;
  color: #155e4a;
}

.project-calendar-day-tasks li:nth-child(3n) {
  background: #fff2df;
  color: #7a3e10;
}

.project-calendar-day-tasks li.more {
  background: #f1f5f9;
  color: #64748b;
}

.project-calendar-day .is-muted {
  color: #95a5ba;
  background: #eef3f8;
}

.project-calendar-day.has-items {
  border-color: #8ec5ff;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.14);
}

.project-calendar-day.has-items .project-calendar-day-top b {
  color: #0f3f70;
}

.project-calendar-day.is-today {
  border-color: #7dd3fc;
  box-shadow: inset 0 0 0 1px #bfe8ff, 0 6px 14px rgba(14, 116, 144, 0.14);
}

.project-calendar-day.is-active {
  background:
    radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.35), transparent 42%),
    linear-gradient(145deg, #0ea5e9, #2563eb);
  border-color: #1d4ed8;
  box-shadow: 0 16px 30px rgba(29, 78, 216, 0.28);
}

.project-calendar-day.is-active b,
.project-calendar-day.is-active span {
  color: #fff;
}

.project-calendar-day.is-active span {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.project-calendar-day.is-active .project-calendar-day-tasks li {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.project-calendar-day.is-empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.project-calendar-agenda {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dce8f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.project-calendar-agenda h4 {
  margin: 0;
  color: #17324d;
  font-size: 15px;
  font-weight: 900;
}

.project-calendar-agenda-list {
  display: grid;
  gap: 10px;
}

.project-calendar-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #d8e7f6;
}

.project-calendar-task strong {
  color: #10263d;
  font-size: 13px;
  font-weight: 800;
}

.project-calendar-task span {
  color: #33506e;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7eef7;
}

@media (max-width: 900px) {
  .project-calendar-grid {
    gap: 4px;
    padding: 6px;
  }
  .project-calendar-day {
    min-height: 88px;
    padding: 6px 5px;
  }
  .project-calendar-day span {
    font-size: 9px;
    padding: 1px 5px;
  }
  .project-calendar-day-tasks li {
    font-size: 9px;
    padding: 2px 4px;
  }
}

.project-detail-members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-detail-sample-pane {
  display: grid;
  gap: 12px;
}

.project-detail-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.project-detail-sample-column {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.9));
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(32, 55, 76, 0.08);
  min-height: 0;
}

.project-detail-sample-column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-detail-sample-column-head span {
  display: inline-block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.project-detail-sample-column-head h3 {
  margin: 2px 0 0;
  color: #102038;
  font-size: 18px;
  font-weight: 900;
}

.project-detail-sample-column-head b {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, #6767ec, #12b37e);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.project-detail-sample-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-sample-card,
.project-sample-empty {
  padding: 12px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(32, 55, 76, 0.05);
}

.project-sample-card {
  display: grid;
  gap: 8px;
}

button.project-sample-card {
  width: 100%;
  text-align: right;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
  border: 1px solid rgba(36, 49, 61, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button.project-sample-card:hover,
button.project-sample-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(103, 103, 236, 0.24);
  box-shadow: 0 14px 26px rgba(32, 55, 76, 0.1);
}

button.project-sample-card:focus-visible {
  outline: 2px solid rgba(103, 103, 236, 0.42);
  outline-offset: 2px;
}

.project-sample-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-sample-card-head span {
  display: inline-block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.project-sample-card-head strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.project-sample-card-head small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.project-sample-card p {
  margin: 0;
  color: #415166;
  font-size: 12px;
  line-height: 1.85;
}

.project-sample-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-sample-card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3e546d;
  font-size: 11px;
  font-weight: 800;
}

.project-sample-card--note {
  border-color: rgba(103, 103, 236, 0.12);
}

.project-sample-card--table {
  border-color: rgba(18, 179, 126, 0.12);
}

.project-sample-card--customer {
  border-color: rgba(245, 158, 11, 0.12);
}

.project-sample-empty {
  color: #64748b;
  font-size: 12px;
  line-height: 1.8;
}

.project-sample-preview-modal-card {
  width: min(720px, calc(100vw - 24px));
}

.project-sample-preview-modal--table .project-sample-preview-modal-card {
  width: min(1180px, calc(100vw - 24px));
}

.project-sample-preview-content {
  display: grid;
  gap: 12px;
}

.project-sample-preview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
  border: 1px solid rgba(36, 49, 61, 0.08);
}

.project-sample-preview-eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.project-sample-preview-card h4 {
  margin: 0;
  color: #102038;
  font-size: 18px;
  font-weight: 900;
}

.project-sample-preview-card p {
  margin: 0;
  color: #415166;
  font-size: 13px;
  line-height: 1.9;
}

.project-sample-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-sample-preview-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3e546d;
  font-size: 11px;
  font-weight: 800;
}

.project-sample-preview-actions {
  margin-top: 4px;
}

.project-sample-preview-loading {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(36, 49, 61, 0.08);
  color: #526478;
  font-size: 13px;
  font-weight: 700;
}

.project-sample-table-preview {
  display: grid;
  gap: 14px;
}

.project-sample-table-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(103, 103, 236, 0.09), rgba(18, 179, 126, 0.08));
  border: 1px solid rgba(36, 49, 61, 0.08);
}

.project-sample-table-preview-head h4 {
  margin: 4px 0 4px;
  color: #102038;
  font-size: 20px;
  font-weight: 900;
}

.project-sample-table-preview-head p {
  margin: 0;
  color: #526478;
  font-size: 13px;
  font-weight: 700;
}

.project-sample-table-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.project-sample-table-preview-badges span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #364555;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(36, 49, 61, 0.08);
}

.project-sample-table-preview-wrap {
  overflow: auto;
  max-height: min(64vh, 640px);
  border-radius: 18px;
  border: 1px solid rgba(36, 49, 61, 0.08);
  background: #fff;
}

.project-sample-table-preview-sheet {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.project-sample-table-preview-sheet th,
.project-sample-table-preview-sheet td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(36, 49, 61, 0.08);
  border-left: 1px solid rgba(36, 49, 61, 0.08);
  color: #223244;
  font-size: 12px;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.project-sample-table-preview-sheet thead th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 1;
  font-weight: 900;
}

.project-sample-table-preview-sheet th:first-child,
.project-sample-table-preview-sheet td:first-child {
  background: #fbfdff;
  font-weight: 900;
}

.project-sample-table-preview-sheet tbody tr:hover td,
.project-sample-table-preview-sheet tbody tr:hover th {
  background: rgba(103, 103, 236, 0.04);
}

.project-sample-table-preview-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.project-member-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #d8e1e9;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(32, 55, 76, 0.06);
}

.project-member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.project-member-card h4 {
  margin: 0;
  color: #22344d;
  font-size: 15px;
  font-weight: 900;
}

.project-member-card p {
  margin: 2px 0 0;
  color: #66809c;
  font-size: 12px;
}

.project-member-card-meta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-member-card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #3f566f;
  font-size: 11px;
  font-weight: 800;
}

.project-chat-list {
  height: 520px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 12px;
  background: #eff7f6;
  border: 1px solid #d8e5e8;
  border-radius: 14px;
}

.project-chat-day-sep {
  justify-self: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e9eff3;
  color: #6f8298;
  font-size: 11px;
  font-weight: 900;
}

.project-chat-item {
  max-width: 72%;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #d8e1e9;
  background: #fff;
  justify-self: start;
}

.project-chat-item.is-own {
  justify-self: end;
  background: #f8fffc;
  border-color: #c8eedd;
}

.project-chat-item.is-event {
  justify-self: center;
  max-width: 80%;
  background: #f4f7fb;
  border-color: #dbe5ef;
}

.project-chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-chat-meta b {
  color: #24364f;
  font-size: 12px;
  font-weight: 900;
}

.project-chat-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f7f1;
  color: #0f9a67;
  font-size: 10px;
  font-weight: 900;
}

.project-chat-meta time {
  color: #7b8ea6;
  font-size: 11px;
  font-weight: 700;
}

.project-chat-item p {
  margin: 0;
  color: #334a63;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.project-chat-task-card {
  width: min(100%, 280px);
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #0f172a;
}

.project-chat-task-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.project-chat-task-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.9;
}

.project-chat-task-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-chat-task-card-badges span,
.project-chat-task-card-meta,
.project-chat-task-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.project-chat-task-card-link {
  text-decoration: none;
}

.project-chat-task-card-link strong,
.project-chat-task-card-meta strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.project-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.project-chat-form textarea {
  min-height: 56px;
  max-height: 160px;
  border-radius: 14px;
  border: 1px solid #cfdbe6;
  padding: 14px;
  font-size: 14px;
  line-height: 1.8;
  resize: vertical;
}

.project-chat-form > button,
#projectChatSendBtn {
  height: 56px;
  min-width: 68px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #5ac8b0, #34b89c);
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 1200px) {
  .project-detail-modern-head,
  .project-detail-modern-tabs,
  .project-detail-overview-shell {
    margin-right: 18px;
    margin-left: 18px;
    padding-right: 0;
    padding-left: 0;
  }

  .project-detail-overview-shell {
    padding-bottom: 18px;
  }

  .project-detail-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-overview-insights {
    grid-template-columns: 1fr;
  }
  .project-detail-members-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-detail-modern-head h1,
  .project-detail-summary-card h2 {
    font-size: 28px;
  }

  .project-detail-summary-card p,
  .project-detail-progress-card strong,
  .project-detail-progress-card b,
  .project-detail-recent-card h3 {
    font-size: 20px;
  }

  .project-detail-stats-grid small,
  .project-detail-summary-meta span,
  .project-detail-progress-card p,
  .project-detail-modern-tabs button {
    font-size: 14px;
  }

  .project-detail-stats-grid b,
  .project-detail-hero-progress b {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .project-detail-sample-grid {
    grid-template-columns: 1fr;
  }

  .workspace-top-module-main {
    display: none;
  }

  .page-title-row {
    padding-top: 0;
  }

  .workspace-switcher {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
    padding: 0;
    border-radius: 0;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .workspace-switcher select {
    min-width: 130px;
    width: 130px;
    flex: 0 0 auto;
    height: 34px;
    font-size: 12px;
    padding: 0 8px;
  }

  .workspace-switcher #createWorkspaceBtn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    font-size: 16px;
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.18);
  }

  .workspace-create-inline {
    min-width: 0;
    flex: 1 1 auto;
  }

  .workspace-create-inline input {
    width: 100%;
    min-width: 0;
    height: 34px;
  }

  .workspace-create-inline button {
    height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .project-title-actions {
    margin-top: -4px;
    width: 100%;
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 100%;
  }

  .project-title-actions .project-add-btn {
    width: 100%;
    margin-top: 0;
    padding: 10px 12px;
    font-size: 12px;
  }

  .page-title > div > p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .workspace-panel {
    padding: 12px;
  }

  .workspace-member-form {
    grid-template-columns: 1fr;
  }

  .project-detail-modern-tabs {
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .project-detail-modern-tabs button {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 12px;
  }

  .project-detail-task-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-board-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-task-filters {
    overflow: hidden;
    white-space: normal;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .project-detail-task-filters button {
    min-width: 0;
    width: 100%;
  }

  .project-detail-add-task-btn {
    width: 100%;
    justify-self: stretch;
  }

  .project-chat-list {
    height: 360px;
    padding: 10px;
  }

  .project-chat-item,
  .project-chat-item.is-event {
    max-width: 100%;
  }

  .project-chat-form {
    grid-template-columns: 1fr;
  }

  .project-chat-form > button,
  #projectChatSendBtn {
    width: 100%;
    height: 44px;
  }

  .project-detail-gantt-pane {
    padding: 8px;
  }

  .project-gantt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .project-gantt-toolbar-right,
  .project-gantt-toolbar-left {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  #dashboardPanel.modern-dashboard {
    padding: 0 12px 16px;
  }

  #dashboardPanel .dashboard-modern-kpis {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #dashboardPanel .modern-kpi {
    padding: 12px;
  }

  #dashboardPanel .dashboard-modern-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #dashboardPanel .modern-timer-fields {
    grid-template-columns: 1fr;
  }

  #dashboardPanel .modern-table {
    min-width: 560px;
  }

  #dashboardPanel .modern-table-wrap {
    overflow-x: auto;
  }

  .page-title {
    padding: 16px 12px 0;
    margin-bottom: 12px;
  }

  .projects-shell {
    padding: 0 12px 16px;
    gap: 12px;
  }

  .project-form {
    padding: 0;
  }

  .project-modal {
    padding: 10px;
  }

  .project-modal-card {
    width: min(760px, calc(100vw - 12px));
    max-height: calc(100vh - 16px);
    padding: 14px 12px 12px;
    border-radius: 14px;
  }

  .project-modal-card-wide {
    width: min(980px, calc(100vw - 12px));
  }

  .project-task-quick-modal-card {
    width: min(980px, calc(100vw - 12px));
  }

  .project-modal-head {
    padding-left: 34px;
  }

  .project-modal-head h3 {
    font-size: 18px;
  }

  .project-modal-head p {
    font-size: 12px;
  }

  .project-modal-close {
    width: 32px;
    height: 32px;
    top: 8px;
    left: 8px;
  }

  .project-icon-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .project-member-picker {
    grid-template-columns: 1fr;
  }

  .project-time-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .project-detail-modern-head {
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    gap: 8px;
    margin: 0 10px 4px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .project-detail-hero-progress {
    grid-column: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .project-detail-add-task-btn.in-head-mobile {
    width: auto;
    min-width: 86px;
    height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    justify-self: center;
    align-self: center;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .project-detail-modern-head h1 {
    font-size: 14px;
  }

  .project-detail-modern-head p {
    margin-top: 2px;
    font-size: 10px;
  }

  .project-detail-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .project-detail-hero-progress b {
    font-size: 14px;
    line-height: 1;
  }

  .project-detail-hero-progress small {
    font-size: 10px;
    opacity: 0.92;
  }

  .project-detail-overview-shell {
    margin: 0 12px;
    padding: 0 0 14px;
    gap: 10px;
  }

  .project-detail-summary-card {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 12px;
  }

  .project-detail-summary-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 10px;
  }

  .project-detail-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .project-detail-stats-grid article {
    padding: 10px;
  }

  .project-detail-recent-card,
  .project-detail-progress-card,
  .project-detail-tools {
    padding: 12px;
  }

  .project-member-form {
    grid-template-columns: 1fr;
  }

  #projectDetailPanel .project-chat-layout {
    gap: 10px;
  }

  #projectDetailPanel .project-chat-main {
    padding: 10px;
  }

  #projectDetailPanel .project-chat-room {
    min-height: calc(100dvh - 220px);
  }

  #projectDetailPanel .project-chat-room .direct-chat-messages {
    max-height: min(42dvh, 320px);
  }

  #projectDetailPanel .project-chat-room .direct-chat-form {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 18px, #ffffff);
  }
}

body[data-ui-theme="sunset"] .topbar {
  background: linear-gradient(90deg, #7c2d12, #c2410c 45%, #ea580c);
  color: #fff7ed;
}

body[data-ui-theme="sunset"] .mobile-menu-btn {
  background: rgba(255, 247, 237, 0.14);
  color: #fff7ed;
}

body[data-ui-theme="sunset"] .sidebar {
  background:
    radial-gradient(circle at 15% 0, rgba(251, 146, 60, 0.24), transparent 30%),
    linear-gradient(180deg, #7c2d12, #9a3412 40%, #b45309);
  color: #ffedd5;
  border-left-color: rgba(255, 237, 213, 0.24);
}

body[data-ui-theme="sunset"] .menu-item {
  color: #fed7aa;
}

body[data-ui-theme="sunset"] .menu-item:hover,
body[data-ui-theme="sunset"] .menu-item.active {
  background: linear-gradient(90deg, rgba(254, 215, 170, 0.26), rgba(251, 191, 36, 0.12));
  color: #fff7ed;
  box-shadow: 0 8px 20px rgba(124, 45, 18, 0.24);
}

body[data-ui-theme="sunset"] .menu-item.active {
  box-shadow: inset 3px 0 0 #fff7ed, 0 8px 20px rgba(194, 65, 12, 0.3);
}

body[data-ui-theme="mono"] .topbar {
  background: linear-gradient(90deg, #111827, #1f2937);
  color: #f3f4f6;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.25);
}

body[data-ui-theme="mono"] .mobile-menu-btn {
  background: #374151;
  color: #f3f4f6;
}

body[data-ui-theme="mono"] .sidebar {
  background: linear-gradient(180deg, #111827, #1f2937 55%, #374151);
  color: #e5e7eb;
  border-left-color: rgba(229, 231, 235, 0.18);
}

body[data-ui-theme="mono"] .menu-item {
  color: #d1d5db;
}

body[data-ui-theme="mono"] .menu-icon {
  color: #d1d5db;
  background: rgba(209, 213, 219, 0.14);
}

body[data-ui-theme="mono"] .menu-item:hover,
body[data-ui-theme="mono"] .menu-item.active {
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.16), rgba(148, 163, 184, 0.1));
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.25);
}

body[data-ui-theme="mono"] .menu-item.active {
  box-shadow: inset 3px 0 0 #f3f4f6, 0 8px 18px rgba(17, 24, 39, 0.3);
}

body[data-ui-theme="light"] {
  background: #edf4fb;
}

body[data-ui-theme="light"] .content {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 24%),
    linear-gradient(180deg, #f3f9ff, #ffffff 260px);
}

body[data-ui-theme="light"] .workspace-top-module {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
  border-color: #cfe0ee;
  box-shadow: 0 20px 40px rgba(125, 152, 179, 0.16);
}

body[data-ui-theme="light"] .workspace-top-module-main h2 {
  color: #0f2742;
}

body[data-ui-theme="light"] .workspace-top-module-main p {
  color: #58718d;
}

body[data-ui-theme="light"] .workspace-top-search {
  background: #fdfefe;
  border-color: #cfe0ee;
  color: #5d7188;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-ui-theme="light"] .workspace-top-search input {
  color: #16304c;
}

body[data-ui-theme="light"] .workspace-top-create-btn {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.18);
}

body[data-ui-theme="light"] .workspace-top-notify-btn {
  background: linear-gradient(180deg, #ffffff, #f3f8fd);
  border-color: #d3e1ec;
  color: #23415f;
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.16);
}

body[data-ui-theme="light"] .workspace-top-profile-dropdown {
  border-color: #d7e4ef;
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.16);
}

body[data-ui-theme="light"] .mobile-menu-btn {
  background: linear-gradient(180deg, #ffffff, #f2f7fc);
  color: #284566;
  border: 1px solid #d8e4ee;
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.14);
}

body[data-ui-theme="light"] .sidebar {
  background:
    radial-gradient(circle at 8% 0, rgba(14, 165, 233, 0.12), transparent 26%),
    radial-gradient(circle at 100% 24%, rgba(59, 130, 246, 0.08), transparent 22%),
    linear-gradient(180deg, #ffffff, #f6fbff 52%, #eef6fc);
  color: #1e3651;
  border-left-color: rgba(148, 163, 184, 0.18);
  box-shadow: 20px 0 36px rgba(148, 163, 184, 0.16);
}

body[data-ui-theme="light"] .sidebar-brand {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

body[data-ui-theme="light"] .sidebar-brand-icon {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  box-shadow: 0 12px 22px rgba(59, 130, 246, 0.22);
}

body[data-ui-theme="light"] .sidebar-brand strong {
  color: #18324d;
}

body[data-ui-theme="light"] .sidebar-brand small,
body[data-ui-theme="light"] .sidebar-version {
  color: #6b7d95;
}

body[data-ui-theme="light"] .menu-item {
  color: #53687f;
}

body[data-ui-theme="light"] .menu-icon {
  color: #4470b8;
  background: rgba(59, 130, 246, 0.1);
}

body[data-ui-theme="light"] .menu-item:hover,
body[data-ui-theme="light"] .menu-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(14, 165, 233, 0.08));
  color: #16324d;
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.18);
}

body[data-ui-theme="light"] .menu-item.active {
  box-shadow: inset 3px 0 0 #0ea5e9, 0 12px 24px rgba(148, 163, 184, 0.18);
}

body[data-ui-theme="light"] .menu-badge {
  background: #f97316;
}

body[data-ui-theme="white"] .topbar {
  background: linear-gradient(180deg, #ffffff, #f7f8fb);
  border-bottom-color: #e5e7eb;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

body[data-ui-theme="white"] .mobile-menu-btn {
  background: #ffffff;
  color: #334155;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

body[data-ui-theme="white"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  color: #374151;
  border-left: 1px solid #ececec;
  box-shadow: 16px 0 28px rgba(15, 23, 42, 0.05);
}

body[data-ui-theme="white"] .sidebar-brand {
  border-bottom-color: #efefef;
}

body[data-ui-theme="white"] .sidebar-brand-icon {
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.18);
}

body[data-ui-theme="white"] .sidebar-brand strong {
  color: #111827;
}

body[data-ui-theme="white"] .sidebar-brand small,
body[data-ui-theme="white"] .sidebar-version {
  color: #9ca3af;
}

body[data-ui-theme="white"] .menu-item {
  min-height: 46px;
  color: #4b5563;
  border-radius: 12px;
}

body[data-ui-theme="white"] .menu-item:hover {
  background: #f7f7f8;
  color: #111827;
  box-shadow: none;
}

body[data-ui-theme="white"] .menu-item.active {
  background: #ededee;
  color: #111827;
  box-shadow: none;
  font-weight: 800;
}

body[data-ui-theme="white"] .menu-item.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 999px;
  background: #ef4444;
}

body[data-ui-theme="white"] .side-submenu .menu-item.sub-item {
  color: #6b7280;
}

body[data-ui-theme="white"] .menu-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: transparent;
  font-size: 18px;
}

body[data-ui-theme="white"] .menu-icon.red {
  color: #ea4335;
  background: transparent;
}

body[data-ui-theme="white"] .menu-icon.blue {
  color: #4f86f7;
  background: transparent;
}

body[data-ui-theme="white"] .menu-icon.green {
  color: #22c55e;
  background: transparent;
}

body[data-ui-theme="white"] .menu-icon.orange,
body[data-ui-theme="white"] .menu-icon.amber {
  color: #f4b400;
  background: transparent;
}

body[data-ui-theme="white"] .menu-icon.gray {
  color: #94a3b8;
  background: transparent;
}

body[data-ui-theme="white"] .menu-icon.cyan {
  color: #2563eb;
  background: transparent;
}

body[data-ui-theme="white"] .menu-badge {
  background: #ef4444;
  color: #ffffff;
}

body[data-ui-theme="navy"] .topbar {
  background:
    linear-gradient(180deg, rgba(41, 58, 96, 0.98), rgba(35, 49, 84, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  border-bottom-color: rgba(167, 184, 221, 0.14);
  box-shadow: 0 18px 36px rgba(12, 18, 39, 0.18);
}

body[data-ui-theme="navy"] .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

body[data-ui-theme="navy"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 16%),
    linear-gradient(180deg, #2d3d67 0%, #26365d 48%, #233157 100%);
  color: #f5f7ff;
  border-left: 1px solid rgba(186, 201, 233, 0.14);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04);
  padding: 10px 12px 14px;
}

body[data-ui-theme="navy"] .sidebar-brand {
  padding: 12px 12px 18px;
  border-bottom-color: rgba(220, 229, 255, 0.1);
  margin-bottom: 12px;
}

body[data-ui-theme="navy"] .sidebar-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #eef3ff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-ui-theme="navy"] .sidebar-brand strong {
  color: #ffffff;
  font-size: 15px;
}

body[data-ui-theme="navy"] .sidebar-brand small,
body[data-ui-theme="navy"] .sidebar-version {
  color: rgba(232, 238, 255, 0.72);
}

body[data-ui-theme="navy"] .side-menu {
  gap: 4px;
}

body[data-ui-theme="navy"] .menu-item {
  min-height: 50px;
  padding: 12px 10px 12px 12px;
  border-radius: 16px;
  color: #f5f7ff;
  font-size: 14px;
  font-weight: 500;
}

body[data-ui-theme="navy"] .menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  box-shadow: none;
}

body[data-ui-theme="navy"] .menu-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

body[data-ui-theme="navy"] .menu-item-has-submenu {
  padding-left: 10px;
}

body[data-ui-theme="navy"] .menu-item.sub-item {
  min-height: 38px;
  margin-right: 18px;
  padding-right: 12px;
  border-radius: 12px;
  color: rgba(232, 238, 255, 0.76);
  font-size: 12.5px;
}

body[data-ui-theme="navy"] .menu-item.sub-item:hover,
body[data-ui-theme="navy"] .menu-item.sub-item.active {
  background: rgba(255, 255, 255, 0.045);
}

body[data-ui-theme="navy"] .menu-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  color: #f8fbff;
}

body[data-ui-theme="navy"] .menu-icon.red,
body[data-ui-theme="navy"] .menu-icon.blue,
body[data-ui-theme="navy"] .menu-icon.green,
body[data-ui-theme="navy"] .menu-icon.orange,
body[data-ui-theme="navy"] .menu-icon.amber,
body[data-ui-theme="navy"] .menu-icon.gray,
body[data-ui-theme="navy"] .menu-icon.cyan,
body[data-ui-theme="navy"] .menu-icon.violet {
  background: transparent;
  color: #f8fbff;
}

body[data-ui-theme="navy"] .menu-chevron {
  color: rgba(240, 244, 255, 0.74);
}

body[data-ui-theme="navy"] .menu-badge {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body[data-ui-theme="navy"] .sidebar-upgrade-box {
  margin: 10px 8px 0;
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.98), rgba(233, 239, 255, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

body[data-ui-theme="navy"] .sidebar-upgrade-box p {
  text-align: right;
  font-size: 13px;
}

body[data-ui-theme="navy"] .sidebar-upgrade-box small {
  margin-top: 0;
  text-align: right;
  color: #6b7a98;
  font-size: 10px;
  line-height: 1.55;
}

body[data-ui-theme="navy"] .sidebar-upgrade-box a {
  display: inline-flex;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #edf3ff);
  color: #3551d6;
  text-align: center;
  font-size: 12px;
}

body[data-ui-theme="x1"] .topbar {
  background:
    radial-gradient(circle at 12% 0, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #5446c7 0%, #4136a9 42%, #352a91 100%);
  color: #f7f7ff;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 36px rgba(39, 28, 110, 0.22);
}

body[data-ui-theme="x1"] .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body[data-ui-theme="x1"] .sidebar {
  background:
    radial-gradient(circle at 18% 2%, rgba(255, 255, 255, 0.16), transparent 24%),
    radial-gradient(circle at 110% 18%, rgba(170, 183, 255, 0.24), transparent 26%),
    radial-gradient(circle at 75% 110%, rgba(24, 16, 92, 0.2), transparent 34%),
    linear-gradient(180deg, #5f4ed0 0%, #4c3fbe 41%, #3c2fa6 73%, #2f238f 100%);
  color: #eef1ff;
  border-left-color: rgba(255, 255, 255, 0.08);
  padding: 12px 10px 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 40px rgba(35, 23, 98, 0.18);
  overflow-x: hidden;
}

body[data-ui-theme="x1"] .sidebar-brand {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 16px;
  margin-bottom: 10px;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body[data-ui-theme="x1"] .sidebar-brand > div:last-child {
  text-align: right;
}

body[data-ui-theme="x1"] .sidebar-brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

body[data-ui-theme="x1"] .sidebar-brand-icon svg {
  display: none;
}

body[data-ui-theme="x1"] .sidebar-brand-icon::before {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 -5px 0 #ffffff,
    0 5px 0 #ffffff;
}

body[data-ui-theme="x1"] .sidebar-brand strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-ui-theme="x1"] .sidebar-brand small,
body[data-ui-theme="x1"] .sidebar-version {
  color: rgba(237, 241, 255, 0.72);
}

body[data-ui-theme="x1"] .sidebar-brand small,
body[data-ui-theme="x1"] .sidebar-workspace-switcher,
body[data-ui-theme="x1"] .sidebar-version {
  display: none;
}

body[data-ui-theme="x1"] .side-menu {
  gap: 4px;
  padding-top: 2px;
}

body[data-ui-theme="x1"] .menu-item {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

body[data-ui-theme="x1"] .menu-item:hover,
body[data-ui-theme="x1"] .menu-item.active {
  background: linear-gradient(90deg, rgba(206, 207, 255, 0.42), rgba(173, 182, 255, 0.28));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 13, 82, 0.22);
}

body[data-ui-theme="x1"] .menu-item.active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(22, 13, 82, 0.22);
}

body[data-ui-theme="x1"] .menu-item.active::before {
  display: none;
}

body[data-ui-theme="x1"] .menu-text {
  font-weight: 500;
}

body[data-ui-theme="x1"] .menu-item-label-with-badge {
  justify-content: flex-start;
}

body[data-ui-theme="x1"] .menu-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-ui-theme="x1"] .menu-icon {
  width: 21px;
  height: 21px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  opacity: 0.95;
}

body[data-ui-theme="x1"] .menu-icon.red,
body[data-ui-theme="x1"] .menu-icon.blue,
body[data-ui-theme="x1"] .menu-icon.green,
body[data-ui-theme="x1"] .menu-icon.orange,
body[data-ui-theme="x1"] .menu-icon.amber,
body[data-ui-theme="x1"] .menu-icon.gray,
body[data-ui-theme="x1"] .menu-icon.cyan,
body[data-ui-theme="x1"] .menu-icon.violet {
  background: transparent;
  color: #ffffff;
}

body[data-ui-theme="x1"] .side-submenu {
  margin-right: 10px;
  margin-left: 0;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-ui-theme="x1"] .side-submenu .menu-item.sub-item {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 450;
}

body[data-ui-theme="x1"] .side-submenu .menu-item.sub-item:hover,
body[data-ui-theme="x1"] .side-submenu .menu-item.sub-item.active {
  background: rgba(255, 255, 255, 0.12);
}

body[data-ui-theme="x1"] .menu-chevron {
  color: rgba(255, 255, 255, 0.7);
}

body[data-ui-theme="x1"] .sidebar-upgrade-box {
  margin: auto 6px 2px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-ui-theme="x1"] .sidebar-upgrade-kicker {
  display: none;
}

body[data-ui-theme="x1"] .sidebar-upgrade-title {
  display: none;
}

body[data-ui-theme="x1"] .sidebar-upgrade-box small {
  display: none;
}

body[data-ui-theme="x1"] .sidebar-upgrade-box a {
  display: flex;
  width: 100%;
  min-height: 38px;
  margin-top: 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, #ffb97d 0%, #ff7ba5 100%);
  color: #ffffff;
  border: 0;
  box-shadow: 0 14px 28px rgba(52, 28, 118, 0.26);
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
  align-items: center;
  text-align: center;
}

body[data-ui-theme="x1"].sidebar-collapsed .app-layout {
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-ui-theme="x1"].sidebar-collapsed .sidebar {
  width: var(--x1-sidebar-width, 74px);
  padding-inline: 8px;
}

body[data-ui-theme="x1"].sidebar-collapsed .sidebar-brand {
  position: relative;
  justify-content: center;
  min-height: 44px;
  padding-inline: 0;
}

body[data-ui-theme="x1"].sidebar-collapsed .sidebar-brand-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

body[data-ui-theme="x1"].sidebar-collapsed .sidebar-brand > div:last-child,
body[data-ui-theme="x1"].sidebar-collapsed .sidebar-brand small,
body[data-ui-theme="x1"].sidebar-collapsed .sidebar-workspace-switcher,
body[data-ui-theme="x1"].sidebar-collapsed .sidebar-upgrade-box,
body[data-ui-theme="x1"].sidebar-collapsed .sidebar-version,
body[data-ui-theme="x1"].sidebar-collapsed .menu-text,
body[data-ui-theme="x1"].sidebar-collapsed .menu-badge,
body[data-ui-theme="x1"].sidebar-collapsed .menu-chevron,
body[data-ui-theme="x1"].sidebar-collapsed .side-submenu {
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition-delay: 0.09s;
}

body[data-ui-theme="x1"].sidebar-collapsed .side-menu {
  gap: 4px;
}

body[data-ui-theme="x1"].sidebar-collapsed .menu-item {
  justify-content: center;
  padding-inline: 0;
  gap: 0;
  min-height: 34px;
}

body[data-ui-theme="x1"].sidebar-collapsed .menu-item-label-with-badge {
  display: none;
}

body[data-ui-theme="x1"].sidebar-collapsed .menu-text,
body[data-ui-theme="x1"].sidebar-collapsed .menu-badge,
body[data-ui-theme="x1"].sidebar-collapsed .menu-chevron {
  display: none;
}

body[data-ui-theme="x1"].sidebar-collapsed .menu-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

body[data-ui-theme="x1"] .sidebar,
body[data-ui-theme="x1"] .sidebar-brand,
body[data-ui-theme="x1"] .menu-item,
body[data-ui-theme="x1"] .menu-text,
body[data-ui-theme="x1"] .menu-badge,
body[data-ui-theme="x1"] .menu-chevron,
body[data-ui-theme="x1"] .sidebar-workspace-switcher,
body[data-ui-theme="x1"] .sidebar-upgrade-box,
body[data-ui-theme="x1"] .sidebar-version {
  transition:
    opacity 0.275s ease-in-out,
    transform 0.5s ease-in-out,
    width 0.5s ease-in-out,
    padding 0.5s ease-in-out,
    margin 0.5s ease-in-out,
    color 0.275s ease-in-out,
    background 0.275s ease-in-out,
    box-shadow 0.275s ease-in-out;
}

#dashboardPanel.modern-dashboard {
  padding: 14px 18px 24px;
  background: #f3f6fb;
}


#dashboardPanel .pulse-kpis {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#dashboardPanel .pulse-kpi {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #dbe4ee;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

#dashboardPanel .pulse-kpi span {
  color: #7b8ca3;
  font-size: 12px;
  font-weight: 800;
}

#dashboardPanel .pulse-kpi strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.1;
}

#dashboardPanel .pulse-kpi small {
  color: #64748b;
  font-size: 13px;
}

#dashboardPanel .pulse-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

#dashboardPanel .pulse-main,
#dashboardPanel .pulse-side {
  display: grid;
  gap: 16px;
}

#dashboardPanel .pulse-card {
  border-radius: 18px;
  border: 1px solid #dbe4ee;
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

#dashboardPanel .pulse-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#dashboardPanel .pulse-card-head h3 {
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

#dashboardPanel .pulse-card > p {
  margin-top: 4px;
  color: #71839a;
  font-size: 13px;
}

#dashboardPanel .pulse-timer-card {
  background: linear-gradient(135deg, #555cdf, #8f7cf3);
  color: #fff;
  border-color: transparent;
}

#dashboardPanel .pulse-timer-card .pulse-card-head h3,
#dashboardPanel .pulse-timer-card .modern-timer-status {
  color: #fff;
}

#dashboardPanel .pulse-timer-card .modern-timer-display {
  margin: 10px 0 6px;
  font-size: 52px;
  color: #fff;
  background: transparent;
}

#dashboardPanel .pulse-timer-card .timer-start-btn {
  background: #fff;
  color: #4f46e5;
  box-shadow: none;
}

#dashboardPanel .pulse-timer-card .timer-stop-btn {
  background: #1f2937;
  color: #fff;
  box-shadow: none;
}

#dashboardPanel .pulse-timer-card .timer-cancel-btn {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

#dashboardPanel .pulse-timer-card .modern-timer-fields input,
#dashboardPanel .pulse-timer-card .modern-timer-fields select,
#dashboardPanel .pulse-timer-card .timer-stop-box select {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.34);
}

#dashboardPanel .pulse-status-card .modern-status-item span,
#dashboardPanel .pulse-status-card .modern-status-item b {
  font-size: 13px;
  font-weight: 800;
}

#dashboardPanel .modern-notes-grid {
  grid-template-columns: 1fr;
}

#dashboardPanel .modern-note-card,
#dashboardPanel .dashboard-note-item {
  border-radius: 12px;
  border: 1px solid #dbe4ee;
  background: #f8fbff;
  padding: 12px;
}

#dashboardPanel .dashboard-note-item strong {
  color: #0f172a;
  font-size: 14px;
}

#dashboardPanel .dashboard-note-item p,
#dashboardPanel .dashboard-note-item time {
  color: #64748b;
  font-size: 12px;
}

#dashboardPanel #dashboardProjectPreviewList {
  display: grid;
  gap: 14px;
}

#dashboardPanel .dashboard-project-sort-wrap {
  position: relative;
  display: inline-block;
}

#dashboardPanel .dashboard-project-sort-wrap::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-60%) rotate(-45deg);
  pointer-events: none;
}

#dashboardPanel .dashboard-project-sort {
  height: 34px;
  min-width: 168px;
  padding: 0 12px 0 28px;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  background: #f8fbff !important;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  direction: rtl;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: none;
}

#dashboardPanel .dashboard-project-sort::-ms-expand {
  display: none;
}

#dashboardPanel .dashboard-project-progress-item {
  display: grid;
  gap: 8px;
}

#dashboardPanel .dashboard-project-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#dashboardPanel .dashboard-project-progress-top strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

#dashboardPanel .dashboard-project-progress-top b {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  direction: ltr;
}

#dashboardPanel .dashboard-project-progress-item p {
  color: #6b7d94;
  font-size: 12px;
  font-weight: 500;
}

#dashboardPanel .dashboard-project-progress-track {
  height: 8px;
  background: #e5ebf3;
  border-radius: 999px;
  overflow: hidden;
}

#dashboardPanel .dashboard-project-progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--project-color, #4f46e5);
}

@media (max-width: 1300px) {
  #dashboardPanel .pulse-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #dashboardPanel .pulse-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #dashboardPanel .pulse-kpis {
    grid-template-columns: 1fr;
  }
  #dashboardPanel .pulse-card-head h3 {
    font-size: 20px;
  }
  #dashboardPanel .pulse-timer-card .modern-timer-display {
    font-size: 42px;
  }
}

/* Exact dashboard look (reference-like) */
#dashboardPanel.modern-dashboard {
  padding: 0 18px 24px !important;
  background: #eef2f7 !important;
}

#dashboardPanel .pulse-kpis {
  margin-top: 14px;
  gap: 14px;
}

#dashboardPanel .pulse-kpi {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border-radius: 18px;
  border: 1px solid #d9e1eb;
  box-shadow: 0 4px 14px rgba(20, 30, 50, 0.05);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#dashboardPanel .pulse-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 30, 50, 0.08);
}

#dashboardPanel .pulse-kpi span {
  display: block !important;
  margin-top: 6px;
  color: #7587a0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

#dashboardPanel .pulse-kpi strong {
  margin-top: 44px;
  display: block;
  font-size: 26px;
  color: #101a2f;
  font-weight: 900;
  line-height: 1.08;
  max-width: calc(100% - 72px);
  white-space: nowrap;
}

#dashboardPanel .pulse-kpi small {
  position: absolute;
  top: 18px;
  left: 18px;
  margin-top: 6px;
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #2ba86f;
  font-size: 12px;
  font-weight: 800;
  z-index: 2;
}

#dashboardPanel .pulse-kpi:nth-child(3) small {
  background: #ffecee;
  color: #de4a5e;
}

#dashboardPanel .pulse-kpi .kpi-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-size: 18px;
  z-index: 2;
}

#dashboardPanel .pulse-kpi .kpi-glow {
  position: absolute;
  left: -22px;
  bottom: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(132, 138, 170, 0.12);
}

#dashboardPanel .pulse-kpi.kpi-purple .kpi-icon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

#dashboardPanel .pulse-kpi.kpi-green .kpi-icon {
  background: linear-gradient(135deg, #6767ec, #8a8af5);
}

#dashboardPanel .pulse-kpi.kpi-orange .kpi-icon {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
}

#dashboardPanel .pulse-kpi.kpi-blue .kpi-icon {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

#dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeTotal {
  font-size: 21px;
  font-weight: 800;
}

#dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeRemaining {
  font-size: 14px;
  font-weight: 900;
  color: #27384f;
}

@media (max-width: 640px) {
  #dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeTotal {
    font-size: 14px;
    white-space: normal;
    line-height: 1.35;
    max-width: 100%;
  }

  #dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeRemaining {
    font-size: 10px;
  }
}

#dashboardPanel .pulse-kpi.kpi-green .kpi-two-col {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#dashboardPanel .pulse-kpi.kpi-green .kpi-two-col-item {
  background: rgba(255, 255, 255, 0.72);
  border: 0;
  border-radius: 12px;
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#dashboardPanel .pulse-kpi.kpi-green .kpi-two-col-item strong {
  margin-top: -2px;
  max-width: 100%;
  font-size: 22px;
  line-height: 1.1;
}

#dashboardPanel .pulse-kpi.kpi-green .kpi-two-col-item span {
  margin-top: 2px;
}

#dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col-item {
  background: rgba(255, 255, 255, 0.72);
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
}

#dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col-item strong {
  margin-top: 0;
  max-width: 100%;
  font-size: 19px;
  line-height: 1.3;
  white-space: normal;
}

#dashboardPanel .pulse-kpi.kpi-blue #dashboardKpiTodayWorked {
  font-size: 10px;
  line-height: 1.2;
}

#dashboardPanel .pulse-kpi.kpi-blue #dashboardKpiTodayWorked small {
  font-size: 0.62em;
  font-weight: 700;
  opacity: 0.85;
}

@media (max-width: 900px) {
  #projectsPanel .projects-top-shell {
    padding: 0;
  }

  #projectsPanel .projects-hero {
    border-radius: 30px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "copy";
  }

  #projectsPanel .projects-hero-actions-wrap {
    padding: 10px 10px 0;
  }

  #projectsPanel .projects-hero-nav {
    left: 14px;
    right: 14px;
    bottom: 12px;
  }

  #projectsPanel .projects-hero-copy {
    padding: 0 16px 3px;
    justify-items: stretch;
    border-radius: 0 0 30px 30px;
  }

  #projectsPanel .projects-hero-visual {
    border-radius: 30px 30px 0 0;
  }

  #projectsPanel .projects-hero-controls,
  #projectsPanel .projects-title-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  #projectsPanel .projects-hero-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #projectsPanel .projects-title-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  #projectsPanel .projects-hero-controls .project-category-filter,
  #projectsPanel .project-workspace-switcher,
  #projectsPanel .projects-hero-copy .project-search-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  #projectsPanel .project-workspace-switcher {
    grid-column: 1 / -1;
  }

  #projectsPanel .projects-hero-controls .project-category-filter,
  #projectsPanel .projects-hero-copy .project-search-box {
    min-width: 0;
    flex: 1 1 auto;
  }

  #projectsPanel .projects-title-actions .project-add-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 calc(50% - 3px);
    min-height: 40px;
    padding: 8px 8px;
    font-size: 12px;
    font-weight: 450;
    text-align: center;
  }

  #projectsPanel .projects-title-actions .project-add-btn .project-btn-icon {
    width: 18px;
    height: 18px;
  }

  #projectsPanel .projects-title-actions .project-add-btn--category,
  #projectsPanel .projects-title-actions .project-add-btn--members,
  #projectsPanel .projects-title-actions .project-add-btn--archive {
    flex: 1 1 calc((100% - 12px) / 3);
    font-size: 0;
    padding: 8px 0;
    justify-content: center;
  }

  #projectsPanel .projects-title-actions .project-add-btn--category .project-btn-icon,
  #projectsPanel .projects-title-actions .project-add-btn--members .project-btn-icon,
  #projectsPanel .projects-title-actions .project-add-btn--archive .project-btn-icon {
    width: 20px;
    height: 20px;
  }

  #projectsPanel .project-workspace-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
  }

  #projectsPanel .project-workspace-switcher select {
    min-width: 0;
    width: 100%;
  }

  #projectsPanel .project-workspace-switcher #createWorkspaceBtn {
    width: 44px;
    min-width: 44px;
    justify-self: stretch;
  }
}

#dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col-item span {
  margin-top: 2px;
}

#dashboardPanel .pulse-layout {
  margin-top: 14px;
  grid-template-columns: minmax(0, 2.15fr) minmax(350px, 1fr);
  gap: 14px;
}

#dashboardPanel .pulse-main,
#dashboardPanel .pulse-side {
  gap: 14px;
}

#dashboardPanel .pulse-card {
  border-radius: 22px;
  border: 1px solid #d9e1eb;
  box-shadow: 0 4px 14px rgba(20, 30, 50, 0.05);
  padding: 15px 17px;
}

#dashboardPanel .pulse-card-head h3 {
  font-size: 22px;
  line-height: 1.2;
  color: #101a2f;
}

#dashboardPanel .pulse-card > p {
  color: #7b8aa1;
  font-size: 12px;
}

#dashboardPanel #dashboardWeeklyChart {
  height: 210px;
  margin-top: 8px;
}

#dashboardPanel .pulse-main .pulse-card:first-child {
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.08), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(103, 103, 236, 0.08), transparent 32%),
    #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#dashboardPanel .pulse-main .pulse-card:first-child .pulse-card-head h3 {
  color: #111c31;
  font-size: 24px;
  font-weight: 700;
}

#dashboardPanel .pulse-main .pulse-card:first-child .pulse-card-head b {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

#dashboardPanel #dashboardWeeklyTrend {
  display: none !important;
}

#dashboardPanel .pulse-main .pulse-card:first-child > p {
  color: #6f8098;
  font-size: 13px;
  font-weight: 600;
}

#dashboardPanel .pulse-main .pulse-card:first-child #dashboardWeeklyChart {
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  border: 1px solid #e3eaf3;
  padding: 0;
}

#dashboardPanel .pulse-main .pulse-card:first-child .dashboard-empty {
  color: #7a8ba1;
  font-size: 13px;
}

#dashboardPanel .weekly-mini-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#dashboardPanel .weekly-mini-stats article {
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  padding: 14px 14px;
  background: #f9fbff;
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 6px;
}


#dashboardPanel .weekly-mini-stats small {
  display: block;
  color: #63758f;
  font-size: 11px;
  font-weight: 600;
}

#dashboardPanel .weekly-mini-stats strong {
  display: inline-block;
  margin-top: 2px;
  color: #111d33;
  font-size: 28px;
  font-weight: 800;
}

#dashboardPanel #weeklyHoursValue {
  font-size: 20px;
  line-height: 1.35;
  white-space: normal;
}

#dashboardPanel #weeklyTasksValue,
#dashboardPanel #weeklyFocusValue,
#dashboardPanel #weeklyHoursValue {
  font-size: 21px;
  font-weight: 700;
}

#dashboardPanel .weekly-mini-stats b {
  margin-right: 0;
  color: #6767ec;
  font-size: 11px;
  font-weight: 800;
  display: none;
}

#dashboardPanel .weekly-mini-stats strong .unit-text,
#dashboardPanel .weekly-mini-stats b .unit-text {
  font-size: 0.62em;
  font-weight: 700;
}

#dashboardPanel .weekly-mini-stats article:nth-child(3) b {
  color: #e25563;
}

#dashboardPanel .weekly-line-chart {
  margin-top: 10px;
  height: 220px;
  border-top: 1px solid #e5ebf3;
  border-bottom: 1px solid #e5ebf3;
  position: relative;
  background: #f9fbff;
  border-radius: 14px;
  padding: 10px 10px 24px 34px;
  overflow: hidden;
}

#dashboardPanel .weekly-line-chart svg {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 34px;
  bottom: 24px;
  width: calc(100% - 44px);
  height: calc(100% - 34px);
  display: block;
  overflow: hidden;
}

#dashboardPanel .weekly-line-chart .dashboard-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

#dashboardPanel .weekly-line-chart.is-ready .dashboard-empty {
  display: none;
}

#dashboardPanel .weekly-y-axis {
  position: absolute;
  top: 10px;
  bottom: 24px;
  right: 6px;
  width: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

#dashboardPanel .weekly-y-axis span {
  color: #7c8ca2;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

#dashboardPanel .weekly-x-axis {
  position: absolute;
  left: 34px;
  right: 10px;
  bottom: 4px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  pointer-events: none;
  direction: rtl;
}

#dashboardPanel .weekly-x-axis span {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  color: #6c7f98;
  font-size: 11px;
  font-weight: 700;
}

#dashboardPanel .weekly-x-axis span b {
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

#dashboardPanel .weekly-x-axis span small {
  font-size: 10px;
  line-height: 1;
  color: #7f90a8;
  font-weight: 700;
}

#dashboardPanel .weekly-chart-tooltip {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, -100%);
  background: #132342;
  color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 7px 10px;
  display: grid;
  gap: 2px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(11, 23, 45, 0.24);
}

#dashboardPanel .weekly-chart-tooltip strong {
  font-size: 11px;
  font-weight: 900;
}

#dashboardPanel .weekly-chart-tooltip span {
  font-size: 11px;
  color: #d6e3ff;
  font-weight: 700;
}

#dashboardPanel .weekly-chart-tooltip.is-hidden {
  display: none;
}

@media (min-width: 1201px) {
  #dashboardPanel .weekly-line-chart {
    height: 246px;
    padding-bottom: 30px;
  }

  #dashboardPanel .weekly-line-chart svg {
    bottom: 30px;
    height: calc(100% - 40px);
  }
}

#dashboardPanel .weekly-legend {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-end;
}

#dashboardPanel .weekly-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4d607b;
  font-size: 13px;
  font-weight: 700;
}

#dashboardPanel .weekly-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

#dashboardPanel .weekly-legend .tasks-dot {
  background: #3f56e8;
}

#dashboardPanel .weekly-legend .hours-dot {
  background: #8f74f7;
}

#dashboardPanel .pulse-timer-card {
  border: 0;
  background: linear-gradient(135deg, #4b56e7, #9a86f4);
  color: #fff;
}

#dashboardPanel .pulse-timer-card .pulse-card-head h3 {
  color: #fff;
  font-size: 20px;
  letter-spacing: 0;
}

#dashboardPanel .pulse-timer-card .modern-timer-display {
  font-size: 44px;
  font-weight: 900;
  line-height: 1.05;
  margin: 6px 0 10px;
  direction: ltr;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

#dashboardPanel .pulse-timer-card .modern-timer-status {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

#dashboardPanel .pulse-timer-card .timer-overview-actions {
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#dashboardPanel .pulse-timer-card .timer-start-btn {
  min-width: 88px;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

#dashboardPanel .pulse-timer-card .timer-stop-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

#dashboardPanel .pulse-timer-card .timer-stop-box select {
  display: none;
}

#dashboardPanel .pulse-timer-card .timer-stop-btn {
  min-width: 78px;
  height: 42px;
  border-radius: 11px;
  background: #ffffff;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 900;
}

#dashboardPanel .pulse-timer-card .timer-cancel-btn {
  min-width: 78px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
  font-weight: 800;
}

#dashboardPanel .pulse-timer-card .timer-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 800;
}

#dashboardPanel .pulse-timer-card .timer-goal-box {
  margin-right: auto;
  text-align: left;
  color: rgba(255, 255, 255, 0.95);
}

#dashboardPanel .pulse-timer-card .timer-goal-box span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
}

#dashboardPanel .pulse-timer-card .timer-goal-box b {
  font-size: 16px;
  font-weight: 800;
}

#dashboardPanel .pulse-timer-card .modern-timer-display .timer-sec {
  font-size: 22px;
  opacity: 0.8;
  transform: translateY(-2px);
}

#dashboardPanel .pulse-timer-card .timer-progress-line {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#dashboardPanel .pulse-timer-card .timer-progress-line span {
  display: block;
  width: 37%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

#dashboardPanel .pulse-timer-card .manual-time-form {
  margin-top: 12px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  grid-template-columns: minmax(0, 1fr) 72px 72px 112px;
  align-items: end;
}

#dashboardPanel .pulse-timer-card .manual-time-form select,
#dashboardPanel .pulse-timer-card .manual-time-form input,
#dashboardPanel .pulse-timer-card .manual-time-form button {
  height: 38px;
  border-radius: 10px;
  font-size: 12px;
}

#dashboardPanel .pulse-timer-card .manual-time-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#dashboardPanel .pulse-timer-card .manual-time-field > span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

#dashboardPanel .pulse-timer-card #manualTimeProjectSelect,
#dashboardPanel .pulse-timer-card .manual-time-form > button[type="submit"] {
  margin-top: 13px;
}

#dashboardPanel .pulse-timer-card .manual-time-form select,
#dashboardPanel .pulse-timer-card .manual-time-form input {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #1f2f46;
}

#dashboardPanel .pulse-timer-card .manual-time-form button {
  background: #ffffff;
  color: #4338ca;
  font-weight: 900;
}

#dashboardPanel .pulse-timer-card #timerMessage {
  min-height: 18px;
  margin-top: 8px;
  color: #1f2f46;
  font-size: 12px;
  font-weight: 800;
}

#dashboardPanel .pulse-timer-card .modern-timer-fields,
#dashboardPanel .pulse-timer-card .modern-entries,
#dashboardPanel .pulse-timer-card #addTimeMessage {
  display: none !important;
}
#dashboardPanel .pulse-calendar-card .fake-calendar {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

#dashboardPanel .pulse-calendar-card .fake-calendar span {
  min-height: 34px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #55657d;
  border-radius: 10px;
}

#dashboardPanel .pulse-calendar-card .fake-calendar .is-day {
  background: #6f6ef4;
  color: #fff;
  font-weight: 800;
}

#dashboardPanel .modern-table th,
#dashboardPanel .modern-table td {
  font-size: 12px;
}

/* Final KPI spacing fix */
#dashboardPanel .pulse-kpis {
  gap: 18px !important;
}

#dashboardPanel .pulse-kpi {
  padding: 16px 18px !important;
  min-height: 124px !important;
}

#dashboardPanel .pulse-kpi .kpi-icon {
  top: 14px !important;
  right: 14px !important;
  width: 42px !important;
  height: 42px !important;
}

#dashboardPanel .pulse-kpi small {
  top: 14px !important;
  left: 14px !important;
  font-size: 12px !important;
  padding: 3px 9px !important;
}

#dashboardPanel .pulse-kpi strong {
  margin-top: 44px !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  max-width: calc(100% - 78px) !important;
}

#dashboardPanel .pulse-kpi.kpi-purple #dashboardTotalProjectsCount {
  margin-top: 48px !important;
}

#dashboardPanel .pulse-kpi span {
  margin-top: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* Final mobile fix for dashboard column stacking */
@media (max-width: 1300px) {
  #dashboardPanel .pulse-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .workspace-top-module {
    margin: 8px 12px 4px;
    padding: 8px 10px;
    border-radius: 14px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .workspace-top-module-main {
    display: none;
  }

  body.notes-library-active .workspace-top-module-main {
    display: none !important;
  }

  .workspace-top-module-actions {
    width: 100%;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .workspace-top-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    order: 2;
  }

  .workspace-top-search {
    width: 100%;
    height: 44px;
    order: 2;
    padding: 0 12px 0 10px;
    background: rgba(255, 255, 255, 0.96);
    border-color: #dfe6f3;
    box-shadow: 0 10px 24px rgba(45, 72, 122, 0.05);
  }

  .workspace-top-create-btn {
    display: none;
  }

  .workspace-top-notify-menu {
    position: relative;
    order: 3;
  }

  .workspace-top-notify-btn {
    width: 44px;
    height: 44px;
    font-size: 17px;
    border-color: #dfe6f3;
    box-shadow: 0 10px 24px rgba(45, 72, 122, 0.05);
  }

  .workspace-top-notify-dropdown {
    left: auto;
    right: 0;
  }

  .workspace-top-avatar,
  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    box-shadow: 0 10px 24px rgba(45, 72, 122, 0.05);
  }

  .workspace-top-profile-menu {
    order: 4;
  }

  .workspace-top-avatar {
    border: 2px solid rgba(255, 255, 255, 0.95);
  }

  .mobile-menu-btn {
    order: 1;
    font-size: 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dfe6f3;
    color: #000;
  }

  .workspace-top-search input {
    display: block;
    font-size: 13px;
    font-weight: 300;
    text-align: right;
  }

  .workspace-top-search-icon {
    font-size: 20px;
  }

  #dashboardPanel .pulse-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #dashboardPanel .pulse-kpi {
    padding: 14px 12px 12px;
    min-height: 148px;
  }

  #dashboardPanel .pulse-kpi small {
    top: 12px;
    left: 12px;
    font-size: 10px !important;
    padding: 3px 8px;
  }

  #dashboardPanel .pulse-kpi .kpi-icon {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 11px;
  }

  #dashboardPanel #dashboardProjectPreviewList {
    gap: 8px;
  }

  #dashboardPanel .dashboard-project-progress-item {
    gap: 4px;
  }

  #dashboardPanel.modern-dashboard,
  #dashboardPanel .pulse-layout,
  #dashboardPanel .pulse-main,
  #dashboardPanel .pulse-side,
  #dashboardPanel .pulse-card,
  #dashboardPanel .pulse-timer-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #dashboardPanel .pulse-main,
  #dashboardPanel .pulse-side {
    gap: 12px;
  }

  #dashboardPanel .pulse-card {
    padding: 16px;
  }

  #dashboardPanel .pulse-card .pulse-card-head h3 {
    font-size: 18px;
  }

  #dashboardPanel .pulse-card > p,
  #dashboardPanel .pulse-card .dashboard-empty,
  #dashboardPanel .pulse-card .weekly-legend span {
    font-size: 11px;
  }

  #dashboardPanel .pulse-kpi strong {
    font-size: 22px !important;
    line-height: 1.2;
  }

  #dashboardPanel .pulse-kpi span,
  #dashboardPanel .pulse-kpi small {
    font-size: 11px !important;
  }

  #dashboardPanel .pulse-kpi.kpi-green .kpi-two-col,
  #dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col {
    margin-top: 16px;
    gap: 6px;
  }

  #dashboardPanel .pulse-kpi.kpi-green .kpi-two-col-item,
  #dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col-item {
    padding: 6px 8px;
  }

  #dashboardPanel .pulse-kpi.kpi-green .kpi-two-col-item strong,
  #dashboardPanel .pulse-kpi.kpi-blue .kpi-two-col-item strong {
    font-size: 18px !important;
    line-height: 1.25;
  }

  #dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeTotal {
    font-size: 18px !important;
    line-height: 1.35;
  }

  #dashboardPanel .pulse-kpi.kpi-orange #dashboardKpiTimeRemaining {
    font-size: 12px !important;
  }

  #dashboardPanel .pulse-kpi.kpi-blue #dashboardKpiTodayWorked {
    font-size: 16px !important;
    line-height: 1.25;
  }

  #dashboardPanel .pulse-kpi.kpi-purple #dashboardTotalProjectsCount {
    margin-top: 61px !important;
    line-height: 1.1;
  }

  #dashboardPanel .pulse-kpi.kpi-purple #dashboardTotalProjectsCount + span {
    margin-top: 4px !important;
  }

  #dashboardPanel .modern-table th,
  #dashboardPanel .modern-table td,
  #dashboardPanel .modern-note-card p {
    font-size: 11px;
  }

  #dashboardPanel .modern-note-card strong {
    font-size: 16px;
  }

  #dashboardPanel .pulse-timer-card {
    overflow-x: hidden;
  }

  #dashboardPanel .pulse-timer-card * {
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
  }

  #dashboardPanel .pulse-timer-card .pulse-card-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  #dashboardPanel .pulse-timer-card .timer-pill {
    white-space: normal;
  }

  #dashboardPanel .pulse-timer-card .modern-timer-display {
    font-size: clamp(30px, 11vw, 42px);
    line-height: 1.1;
    display: block;
    width: 100%;
    text-align: right;
    overflow: hidden;
  }

  #dashboardPanel .pulse-timer-card .timer-overview-actions {
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
    overflow: hidden;
  }

  #dashboardPanel .pulse-timer-card .timer-stop-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  #dashboardPanel .pulse-timer-card .timer-stop-box select {
    grid-column: 1 / -1;
  }

  #dashboardPanel .pulse-timer-card .timer-start-btn,
  #dashboardPanel .pulse-timer-card .timer-stop-btn,
  #dashboardPanel .pulse-timer-card .timer-cancel-btn {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: 1 1 0;
  }

  #dashboardPanel .pulse-timer-card .timer-cancel-btn,
  #dashboardPanel .pulse-timer-card .timer-stop-btn,
  #dashboardPanel .pulse-timer-card #saveTimerBtn {
    grid-row: 2;
    height: 40px;
  }

  #dashboardPanel .pulse-timer-card .timer-goal-box {
    margin-right: 0;
    width: 100%;
    text-align: right;
    overflow: hidden;
  }

  #dashboardPanel .pulse-timer-card .manual-time-form {
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.8fr));
    align-items: stretch;
    gap: 8px;
  }

  #dashboardPanel .pulse-timer-card .manual-time-form button {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  #dashboardPanel .pulse-timer-card .manual-time-field > span {
    white-space: nowrap;
  }

  #dashboardPanel .pulse-timer-card #manualTimeProjectSelect {
    margin-top: 13px;
  }
}

/* Final hard reset after topbar removal */
#dashboardApp {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

@media (max-width: 1280px) {
  .project-detail-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #projectTaskEditForm .project-time-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-detail-modern-head,
  .project-detail-modern-tabs,
  .project-detail-overview-shell {
    margin-right: 12px;
    margin-left: 12px;
  }

  .project-detail-overview-shell {
    padding-right: 0;
    padding-left: 0;
  }

  .project-chat-sidebar {
    display: none;
  }

  .project-chat-layout {
    grid-template-columns: 1fr;
  }

  .project-detail-report-grid {
    grid-template-columns: 1fr;
  }
}

#dashboardApp .app-layout,
#dashboardApp .content,
#dashboardPanel.page-panel,
#dashboardPanel.modern-dashboard,
#projectsPanel.page-panel,
#projectsPanel.page-panel.active,
#chatThreePanel.page-panel,
#chatThreePanel.page-panel.active,
.page-panel.active.chat-test-page-shell {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#projectsPanel.page-panel.active {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

@media (max-width: 380px) {
  .projects-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-panel.active.chat-test-page-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
}

body.projects-panel-active .workspace-top-module {
  margin-bottom: 0;
}

body:has(#projectsPanel.active) .workspace-top-module {
  margin-bottom: 0;
}

body.chat-panel-active .content {
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

body:has(#chatThreePanel.active) .content {
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

body.chat-panel-active .page-panel.active.chat-test-page-shell,
body.chat-panel-active .chat-test-page-shell,
body.chat-panel-active .chat-test-embed-shell,
body.chat-panel-active .chat-test-embed-frame {
  min-height: 0 !important;
  height: 100% !important;
}

body:has(#chatThreePanel.active) .page-panel.active.chat-test-page-shell,
body:has(#chatThreePanel.active) .chat-test-page-shell,
body:has(#chatThreePanel.active) .chat-test-embed-shell,
body:has(#chatThreePanel.active) .chat-test-embed-frame {
  min-height: 0 !important;
  height: 100% !important;
}

.chat-test-page-shell {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.85), rgba(241, 235, 227, 0.95) 55%, rgba(234, 227, 218, 0.98)),
    linear-gradient(180deg, #f8f4ee 0%, #f3ede4 100%);
  overflow: hidden;
}

.chat-test-embed-shell {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.chat-test-embed-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

@media (min-width: 761px) {
  .chat-test-page-shell,
  .chat-test-embed-shell,
  .chat-test-embed-frame {
    min-height: calc(100vh - 132px);
    min-height: calc(100dvh - 132px);
  }
}

@media (max-width: 760px) {
  body:has(#chatThreePanel.active) .content {
    height: 100%;
    min-height: 0;
  }

  body:has(#chatThreePanel.active) .page-panel.active.chat-test-page-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
}

.chat-test-frame {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
  border: 1px solid rgba(112, 94, 78, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(250, 246, 241, 0.94);
  box-shadow: 0 24px 90px rgba(120, 99, 76, 0.12);
}

.chat-test-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  background: linear-gradient(180deg, rgba(239, 233, 225, 0.96), rgba(237, 231, 224, 0.88));
  border-left: 1px solid rgba(102, 84, 67, 0.1);
}

.chat-test-brand {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.chat-test-brand-mark,
.chat-test-session-mark,
.chat-test-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #4c3a2f;
  color: #f6efe9;
}

.chat-test-brand-mark {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.chat-test-brand-name {
  display: block;
  color: #15181e;
  font-size: 18px;
  font-weight: 600;
}

.chat-test-brand-subtitle,
.chat-test-sidebar-label,
.chat-test-session-title,
.chat-test-footer-note,
.chat-test-top-actions button,
.chat-test-breadcrumbs span:first-child,
.chat-test-card-eyebrow {
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.chat-test-brand-subtitle {
  display: block;
  margin-top: 4px;
  color: #8b8f98;
  font-size: 10px;
}

.chat-test-collapse {
  color: #90949c;
  font-size: 16px;
}

.chat-test-new-brief,
.chat-test-brief-card,
.chat-test-card,
.chat-test-composer,
.chat-test-toolbar {
  border: 1px solid rgba(91, 76, 63, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(102, 84, 67, 0.05), 0 10px 24px rgba(102, 84, 67, 0.06);
}

.chat-test-new-brief {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  color: #171a1f;
  font-size: 14px;
  font-weight: 600;
}

.chat-test-plus {
  font-size: 24px;
  line-height: 1;
  color: #5d4d40;
}

.chat-test-shortcut {
  margin-inline-start: auto;
  color: #a2a6ad;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.chat-test-sidebar-label {
  margin-top: 8px;
  color: #a2a6ad;
  font-size: 10px;
}

.chat-test-brief-card {
  padding: 14px 12px;
}

.chat-test-brief-card strong {
  display: block;
  color: #12151a;
  font-size: 14px;
  font-weight: 500;
}

.chat-test-brief-meta {
  margin-top: 10px;
  color: #99a0a9;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.chat-test-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 18px 8px 4px;
  border-top: 1px solid rgba(102, 84, 67, 0.1);
}

.chat-test-user-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 700;
}

.chat-test-user-copy {
  min-width: 0;
}

.chat-test-user-copy strong {
  display: block;
  color: #1a1d22;
  font-size: 14px;
  font-weight: 500;
}

.chat-test-user-copy span {
  color: #999da5;
  font-size: 12px;
}

.chat-test-user-status {
  width: 7px;
  height: 7px;
  margin-inline-start: auto;
  border-radius: 999px;
  background: #0bd17d;
  box-shadow: 0 0 0 5px rgba(11, 209, 125, 0.08);
}

.chat-test-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-test-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(102, 84, 67, 0.08);
}

.chat-test-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #252a31;
  font-size: 14px;
}

.chat-test-divider {
  color: #c0b7ad;
  letter-spacing: normal;
}

.chat-test-breadcrumbs strong {
  font-weight: 600;
}

.chat-test-top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.chat-test-top-actions button {
  color: #898d96;
  font-size: 11px;
}

.chat-test-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 28px;
  text-align: left;
}

.chat-test-session {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 640px);
}

.chat-test-session-mark {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.chat-test-session-title {
  color: #8c9098;
  font-size: 10px;
}

.chat-test-session-subtitle {
  margin-top: 4px;
  color: #60656f;
  font-size: 15px;
}

.chat-test-heading,
.chat-test-subheading {
  width: min(100%, 640px);
  margin: 0;
}

.chat-test-heading {
  margin-top: 26px;
  color: #20242a;
  font-size: clamp(42px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.02;
}

.chat-test-subheading {
  margin-top: 6px;
  color: #70757e;
  font-size: clamp(31px, 4vw, 45px);
  font-weight: 600;
  line-height: 1.08;
}

.chat-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  width: min(100%, 640px);
  margin-top: 42px;
}

.chat-test-card {
  padding: 18px 16px 20px;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chat-test-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(102, 84, 67, 0.12);
}

.chat-test-card-eyebrow {
  color: #757b84;
  font-size: 10px;
}

.chat-test-card-body {
  margin: 14px 0 0;
  color: #454b54;
  font-size: 15px;
  line-height: 1.45;
}

.chat-test-composer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 26px;
}

.chat-test-composer {
  width: min(100%, 675px);
  padding: 22px 20px 14px;
  border-radius: 24px;
}

.chat-test-composer-placeholder {
  color: #b0b4bb;
  font-size: 16px;
}

.chat-test-composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.chat-test-composer-tools,
.chat-test-toolbar {
  display: flex;
  align-items: center;
}

.chat-test-composer-tools {
  gap: 8px;
}

.chat-test-composer-tools button,
.chat-test-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #747a84;
}

.chat-test-composer-tools button {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.chat-test-brief-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #efe8df;
  color: #625648;
  font-size: 15px;
  font-weight: 500;
}

.chat-test-toolbar {
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
}

.chat-test-toolbar button {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.chat-test-footer-note {
  margin-top: 10px;
  color: #a3a7af;
  font-size: 10px;
}

@media (max-width: 1100px) {
  .chat-test-frame {
    grid-template-columns: 1fr;
  }

  .chat-test-sidebar {
    border-left: 0;
    border-bottom: 1px solid rgba(102, 84, 67, 0.1);
  }
}

@media (max-width: 760px) {
  .chat-test-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-test-top-actions {
    gap: 16px;
  }

  .chat-test-hero {
    align-items: stretch;
    padding-top: 34px;
  }

  .chat-test-grid {
    grid-template-columns: 1fr;
  }

  .chat-test-heading {
    font-size: 34px;
  }

  .chat-test-subheading {
    font-size: 28px;
  }
}

body[data-header-layout="header2"] .topbar {
  height: 72px;
  padding-inline: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #15204a 0%, #1e2c63 46%, #24337a 100%);
  color: #f8fbff;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

body[data-header-layout="header2"] .topbar-right,
body[data-header-layout="header2"] .topbar-left {
  gap: 10px;
}

body[data-header-layout="header2"] .app-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-header-layout="header2"] .account-menu,
body[data-header-layout="header2"] .plan-status {
  color: rgba(248, 251, 255, 0.82);
}

body[data-header-layout="header2"] .plan-status {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-header-layout="header2"] .search-box {
  width: 280px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(12px);
}

body[data-header-layout="header2"] .search-box input {
  color: #ffffff;
}

body[data-header-layout="header2"] .search-box input::placeholder {
  color: rgba(248, 251, 255, 0.72);
}

body[data-header-layout="header2"] .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-header-layout="header2"] .top-icon,
body[data-header-layout="header2"] .workspace-top-avatar,
body[data-header-layout="header2"] .avatar {
  box-shadow: 0 10px 24px rgba(8, 15, 40, 0.24);
}

body[data-header-layout="header2"] .workspace-top-module {
  margin: 12px 18px 12px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
  border: 1px solid rgba(199, 214, 227, 0.85);
  box-shadow: 0 18px 40px rgba(25, 39, 61, 0.08);
}

body[data-header-layout="header2"] .workspace-top-module-main h2 {
  color: #10243d;
  font-size: 18px;
}

body[data-header-layout="header2"] .workspace-top-module-main p {
  color: #60748a;
}

body[data-header-layout="header2"] .workspace-top-search {
  background: #ffffff;
  border-color: #d7e3ee;
  color: #5d7188;
}

body[data-header-layout="header2"] .workspace-top-create-btn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
}

body[data-header-layout="header2"] .workspace-top-notify-btn {
  background: linear-gradient(180deg, #ffffff, #f3f8fd);
  border-color: #d8e4ee;
}

body[data-header-layout="header2"] .workspace-top-profile-dropdown {
  border-color: #d8e4ee;
}
/* Notes page absolute EOF lock */
#notesPanel.page-panel { padding: 18px; }
#notesPanel .notes-shell { display: grid; grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; direction: ltr; }
#notesPanel .note-composer-body { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1260px) {
  #notesPanel .notes-shell,
  #notesPanel .note-composer-body { grid-template-columns: 1fr; }
}

/* Notes toolbar no-scroll final override */
#notesPanel .note-composer-toolbar {
  overflow: visible !important;
  overflow-x: visible !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
}

#notesPanel .note-toolbar-group {
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
}

#notesPanel .note-toolbar-group--select {
  flex: 1 1 180px !important;
}

#notesPanel .note-toolbar-group--spacer {
  flex: 1 1 100% !important;
  margin-inline-start: 0 !important;
  justify-content: flex-end !important;
}

#notesPanel .note-toolbar-divider {
  flex: 0 0 auto !important;
}

/* Notes three-column final override */
#notesPanel .notes-shell {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr) minmax(300px, 360px) !important;
}

#notesPanel .note-composer-body {
  grid-template-columns: 1fr !important;
}

#notesPanel .note-composer-side {
  min-width: 0;
}

#notesPanel .notes-list-shell {
  display: none;
}

#notesPanel .notes-list-column {
  grid-column: 2 / 3 !important;
}

#notesPanel .note-composer {
  grid-column: 1 / 2 !important;
}

#notesPanel .note-composer-side {
  grid-column: 3 / 4 !important;
}

@media (max-width: 1280px) {
  #notesPanel .notes-shell {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr) !important;
  }

  #notesPanel .notes-list-shell {
    display: none;
  }

  #notesPanel .note-composer-side {
    grid-column: 2 / 4 !important;
  }
}

@media (max-width: 1024px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .notes-list-column,
  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }

  #notesPanel .notes-list-shell {
    display: none;
  }

  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }
}

/* Notes page screenshot-style final layout */
#notesPanel.page-panel {
  padding: 16px 16px 18px !important;
  max-width: none !important;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%) !important;
}

#notesPanel .notes-utility-bar {
  position: relative;
  z-index: 40;
  overflow: visible;
  display: grid !important;
  grid-template-columns: auto minmax(280px, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
  border-radius: 22px !important;
}

#notesPanel .notes-utility-left,
#notesPanel .notes-utility-center,
#notesPanel .notes-utility-right {
  min-width: 0;
}

#notesPanel .notes-utility-left {
  justify-content: flex-start;
}

#notesPanel .notes-utility-center {
  justify-content: center;
}

#notesPanel .notes-utility-right {
  text-align: end;
}

#notesPanel .notes-shell {
  display: grid !important;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.6fr) minmax(290px, 0.82fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
  direction: ltr !important;
}

#notesPanel .notes-list-column,
#notesPanel .note-composer,
#notesPanel .note-composer-side {
  min-width: 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
}

#notesPanel .notes-list-column {
  grid-column: 1 / 2 !important;
  direction: rtl;
}

#notesPanel .note-composer {
  grid-column: 2 / 3 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  direction: rtl;
}

#notesPanel .note-composer-side {
  grid-column: 3 / 4 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  direction: rtl;
}

#notesPanel .notes-list-shell {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  height: 100% !important;
  padding: 16px !important;
  border: 1px solid rgba(223, 231, 240, 0.95) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06) !important;
  position: static !important;
}

#notesPanel .notes-list-head {
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(223, 231, 240, 0.8) !important;
}

#notesPanel .notes-list-head h2 {
  font-size: 18px !important;
}

#notesPanel .notes-list-filters {
  display: grid !important;
  grid-template-columns: 42px repeat(4, minmax(0, 1fr));
  gap: 8px !important;
}

#notesPanel .notes-list-filter {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(223, 231, 240, 0.95);
  border-radius: 14px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#notesPanel .notes-list-filter--icon {
  padding: 0;
}

#notesPanel .notes-list-filter--icon svg {
  width: 16px;
  height: 16px;
}

#notesPanel .notes-list-filter.active {
  border-color: rgba(16, 185, 129, 0.38);
  background: linear-gradient(180deg, rgba(245, 255, 251, 0.98), rgba(232, 253, 244, 0.98));
  color: #0f766e;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.12);
}

#notesPanel .notes-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow: auto;
  padding-inline-end: 0;
}

#notesPanel .notes-grid--cards {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
}

#notesPanel .note-card {
  border-radius: 18px;
  padding: 15px 16px;
  border-right-width: 3px;
}

#notesPanel .note-card-head {
  align-items: flex-start;
}

#notesPanel .note-card-head strong {
  font-size: 15px;
}

#notesPanel .note-card-body-trigger .note-card-summary {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.9;
}

#notesPanel .note-card-foot {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#notesPanel .note-composer {
  padding: 16px !important;
  border: 1px solid rgba(223, 231, 240, 0.95) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06) !important;
}

#notesPanel .notes-composer-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

#notesPanel .note-composer-header {
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#notesPanel .note-composer-header-copy strong {
  font-size: 18px;
  font-weight: 800;
}

#notesPanel .note-composer-header-copy p {
  max-width: 48ch;
}

#notesPanel .note-composer-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  justify-content: stretch;
}

#notesPanel .note-composer-chip {
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
}

#notesPanel .note-composer-chip--color {
  padding-inline: 10px;
}

#notesPanel .note-select {
  height: 42px;
  min-height: 42px;
}

#notesPanel .note-color-picker {
  min-height: 42px;
}

#notesPanel .note-editor-content {
  min-height: 480px;
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 14px;
}

#notesPanel .note-composer-toolbar {
  border-radius: 18px;
}

#notesPanel .note-composer-side {
  padding: 14px;
}

#notesPanel .notes-side-summary {
  padding: 18px !important;
  border-radius: 18px !important;
}

#notesPanel .notes-summary-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#notesPanel .note-composer-side .note-composer-section {
  padding: 14px;
  border-radius: 18px;
}

#notesPanel .notes-chip-list,
#notesPanel .notes-sidebar-filters {
  gap: 8px;
}

@media (max-width: 1280px) {
  #notesPanel .notes-shell {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr) !important;
  }

  #notesPanel .note-composer-side {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 1120px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .notes-list-column,
  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }
}

@media (max-width: 860px) {
  #notesPanel .notes-list-filters,
  #notesPanel .note-composer-meta-row {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-list-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Notes page clean override */
#notesPanel.page-panel {
  --notes-bg: linear-gradient(180deg, #f8fbff 0%, #f7fdf9 100%);
  --notes-surface: rgba(255, 255, 255, 0.88);
  --notes-border: rgba(226, 232, 240, 0.96);
  --notes-text: #0f172a;
  --notes-muted: #64748b;
  --notes-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  padding: 24px;
  max-width: 1680px;
  margin-inline: auto;
}

#notesPanel .page-title,
#notesPanel .notes-utility-bar,
#notesPanel .notes-list-shell,
#notesPanel .note-composer,
#notesPanel .note-composer-side {
  border: 1px solid var(--notes-border);
  border-radius: 24px;
  background: var(--notes-surface);
  box-shadow: var(--notes-shadow);
}

#notesPanel .notes-page-hero {
  margin-bottom: 16px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 253, 249, 0.96));
  gap: 20px;
}

#notesPanel .notes-page-hero-copy span {
  color: #0f766e;
  letter-spacing: 0.16em;
}

#notesPanel .notes-page-hero-copy h1 {
  color: var(--notes-text);
  font-size: clamp(26px, 3vw, 38px);
}

#notesPanel .notes-page-hero-copy p,
#notesPanel .notes-utility-caption,
#notesPanel .notes-list-head p,
#notesPanel .note-composer-header-copy p,
#notesPanel .note-toolbar-hint,
#notesPanel .note-editor-footer,
#notesPanel .notes-side-summary-head span,
#notesPanel .notes-sidebar-empty {
  color: var(--notes-muted);
}

#notesPanel .notes-page-hero-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#notesPanel .notes-hero-btn,
#notesPanel .notes-utility-btn,
#notesPanel .notes-side-summary-btn,
#notesPanel .notes-list-create-btn {
  min-height: 44px;
  border-radius: 14px;
}

#notesPanel .notes-hero-btn--primary,
#notesPanel .notes-utility-btn--primary,
#notesPanel .notes-side-summary-btn,
#notesPanel .notes-list-create-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(103, 103, 236, 0.24);
}

#notesPanel .notes-hero-icon-btn,
#notesPanel .notes-utility-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

#notesPanel .notes-utility-bar {
  position: relative;
  z-index: 40;
  overflow: visible;
  margin-bottom: 18px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.95));
}

#notesPanel .notes-utility-left,
#notesPanel .notes-utility-center,
#notesPanel .notes-utility-right {
  min-width: 0;
}

#notesPanel .notes-utility-center {
  justify-content: center;
}

#notesPanel .notes-utility-right {
  text-align: end;
}

#notesPanel .notes-search-field,
#notesPanel .notes-sort-field {
  border-color: var(--notes-border);
  background: rgba(255, 255, 255, 0.96);
}

#notesPanel .notes-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1.15fr) minmax(300px, 380px) !important;
  gap: 18px;
  align-items: start;
  direction: ltr;
}

#notesPanel .notes-list-column,
#notesPanel .note-composer,
#notesPanel .note-composer-side {
  min-width: 0;
}

#notesPanel .notes-list-column {
  grid-column: 1 / 2;
}

#notesPanel .note-composer {
  grid-column: 2 / 3;
  overflow: clip;
}

#notesPanel .note-composer-side {
  grid-column: 3 / 4;
  padding: 18px;
  display: grid;
  gap: 14px;
}

#notesPanel .notes-list-shell {
  display: grid !important;
  gap: 14px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

#notesPanel .notes-list-head {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#notesPanel .notes-list-head h2 {
  color: var(--notes-text);
  font-size: 20px;
}

#notesPanel .notes-list-scroll {
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-inline-end: 4px;
}

#notesPanel .notes-grid--cards {
  display: grid;
  gap: 12px;
}

#notesPanel .note-card {
  position: relative;
  padding: 28px 28px 22px;
  border: 1px solid rgba(225, 233, 243, 0.95);
  border-left: 0;
  border-radius: 32px;
  background:
    radial-gradient(circle at 18px 18px, rgba(15, 23, 42, 0.02) 0 2px, transparent 2px) 0 0 / 18px 18px,
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  height: 280px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  cursor: default;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

#notesPanel .note-card:hover,
#notesPanel .note-card.is-selected {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.1);
  border-color: rgba(199, 216, 232, 0.98);
}

#notesPanel .note-card-head {
  position: relative;
  z-index: 1;
  direction: ltr;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

#notesPanel .note-card-head-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

#notesPanel .note-card-head strong {
  color: #0f1729;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.3px;
  text-align: right;
}

#notesPanel .note-card-title {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#notesPanel .note-card-meta-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: none;
}

#notesPanel .note-card-meta-icon svg {
  width: 100%;
  height: 100%;
}

#notesPanel .note-card-edit-icon {
  justify-self: end;
  align-self: center;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 12px;
  background: #ffffff;
  color: #10b3b4;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

#notesPanel .note-card-edit-icon svg {
  width: 18px;
  height: 18px;
}

#notesPanel .note-card-body-trigger {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

#notesPanel .note-card-body-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

#notesPanel .note-card-dots {
  width: 110px;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px 7px;
  align-content: start;
  opacity: 0.38;
}

#notesPanel .note-card-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e7ecf2;
}

#notesPanel .note-card-body-copy {
  display: grid;
  gap: 5px;
  align-content: center;
}

#notesPanel .note-card-body-meta {
  display: flex;
  justify-content: flex-start;
}

#notesPanel .note-card-body-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7c8798;
  font-size: 11px;
  font-weight: 700;
}

#notesPanel .note-card-body-date svg {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

#notesPanel .note-card-body-trigger .note-card-summary {
  margin: 0;
  color: #162238;
  font-size: 11px;
  line-height: 1.8;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#notesPanel .note-card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(231, 236, 242, 0.95);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#notesPanel .note-card-meta-pill {
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  padding: 9px 12px 9px 12px;
  border: 1px solid rgba(191, 214, 224, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  direction: ltr;
  text-align: right;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

#notesPanel .note-card-meta-pill span {
  color: #7a8797;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

#notesPanel .note-card-meta-pill strong {
  min-width: 0;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#notesPanel .note-card-meta-pill::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(195, 214, 224, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.58);
  transform: translateY(-50%);
  flex: none;
}

#notesPanel .note-card-meta-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(170, 210, 220, 0.98);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
  filter: saturate(1.03);
}

#notesPanel .note-card-meta-pill--project {
  border-color: rgba(157, 220, 209, 0.95);
  color: #0f9a8e;
}

#notesPanel .note-card-meta-pill--project .note-card-meta-icon {
  color: #0f9a8e;
}

#notesPanel .note-card-meta-pill--customer {
  border-color: rgba(171, 206, 255, 0.96);
  color: #2b7de9;
}

#notesPanel .note-card-meta-pill--customer .note-card-meta-icon {
  color: #2b7de9;
}

#notesPanel .note-card-meta-pill--tag {
  border-color: rgba(206, 188, 255, 0.96);
  color: #7a5be7;
}

#notesPanel .note-card-meta-pill--tag .note-card-meta-icon {
  color: #7a5be7;
}

#notesPanel .note-card-meta-icon--project {
  color: #17a2cf;
}

#notesPanel .note-card-meta-icon--customer {
  color: #6a90ff;
}

#notesPanel .note-card-meta-icon--tag {
  color: #8a67ef;
}

#notesPanel .note-card-meta-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

#notesPanel .note-card-meta-circle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(205, 218, 227, 0.98);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.58);
}

#notesPanel .note-composer {
  padding: 18px;
}

#notesPanel .notes-composer-sheet {
  display: grid;
  gap: 16px;
}

#notesPanel .notes-blank-surface,
#notesPanel .notes-composer-sheet {
  position: relative;
}

#notesPanel .notes-blank-surface {
  padding: 24px;
  border: 1px dashed rgba(16, 185, 129, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.75), rgba(255, 255, 255, 0.95));
}

#notesPanel .notes-blank-surface-inner {
  display: grid;
  gap: 8px;
  max-width: 42ch;
}

#notesPanel .notes-blank-kicker {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

#notesPanel .notes-blank-surface-inner h2,
#notesPanel .note-composer-header-copy strong {
  color: var(--notes-text);
}

#notesPanel .note-composer-header,
#notesPanel .note-composer-meta-row,
#notesPanel .note-composer-toolbar,
#notesPanel .note-editor-footer {
  gap: 12px;
}

#notesPanel .note-composer-header {
  flex-wrap: wrap;
}

#notesPanel .note-composer-header-actions {
  order: 2;
}

#notesPanel .note-composer-header-copy {
  order: 1;
}

#notesPanel .note-composer-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  grid-auto-rows: min-content;
  justify-content: stretch;
  width: 100%;
  gap: 10px;
}

#notesPanel .note-composer-chip {
  min-width: 0;
  width: 100%;
  flex: initial;
  min-height: 0;
  height: 34px;
  align-self: start;
  padding: 0 10px;
  gap: 6px;
  align-items: center;
  overflow: hidden;
}

#notesPanel .note-composer-chip--color {
  min-width: 0;
  justify-content: center;
  align-self: start;
  padding: 0 10px;
}

#notesPanel .note-color-picker {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 0;
  align-items: center;
}

#notesPanel .note-composer-meta-row .note-select {
  min-height: 0;
  height: 34px;
  line-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
}

#notesPanel .note-editor-frame-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

#notesPanel .note-editor-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  background: transparent;
  overflow: auto;
}

#notesPanel .note-editor-frame-shell,
#notesPanel .note-editor-frame,
#notesPanel .note-editor-content {
  width: 100%;
  min-width: 0;
}

#notesPanel .note-color-picker::-webkit-scrollbar {
  display: none;
}

#notesPanel .note-toolbar-btn,
#notesPanel .note-icon-btn,
#notesPanel .note-toolbar-select,
#notesPanel .note-composer-main input,
#notesPanel .note-editor-content {
  border-color: rgba(226, 232, 240, 0.96);
}

#notesPanel .note-editor-content {
  min-height: 0;
  height: 100%;
  max-height: none;
  padding: 20px;
  background: transparent;
  box-shadow: none;
  overflow: auto;
  resize: none;
}

#notesPanel .note-composer-side .note-composer-section {
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

#notesPanel .notes-side-summary {
  padding: 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 250, 247, 0.95));
}

#notesPanel .notes-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#notesPanel .notes-summary-stat-card {
  border-color: rgba(226, 232, 240, 0.96);
  background: rgba(255, 255, 255, 0.92);
}

#notesPanel .notes-sidebar-filters,
#notesPanel .notes-chip-list {
  display: grid;
  gap: 10px;
}

#notesPanel .notes-sidebar-filter,
#notesPanel .notes-chip {
  width: 100%;
}

#notesPanel .note-message-box {
  min-height: 42px;
}

#notesPanel .note-composer-actions {
  justify-content: flex-start;
}

#notesPanel .note-save-btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1280px) {
  #notesPanel .notes-shell {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
  }

  #notesPanel .note-composer-side {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  #notesPanel.page-panel {
    padding: 16px;
  }

  #notesPanel .notes-shell {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .notes-list-column,
  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }

  #notesPanel .notes-list-shell {
    position: static;
    max-height: none;
  }

  #notesPanel .notes-list-scroll {
    max-height: none;
  }

  #notesPanel .note-editor-content {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  #notesPanel .notes-page-hero,
  #notesPanel .notes-utility-bar,
  #notesPanel .notes-list-shell,
  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    border-radius: 20px;
  }

  #notesPanel .notes-utility-bar {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-utility-right {
    text-align: start;
  }

  #notesPanel .notes-page-hero-actions,
  #notesPanel .note-composer-header-actions,
  #notesPanel .note-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  #notesPanel .note-composer-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  #notesPanel .note-composer-toolbar {
    padding: 10px;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    width: 100% !important;
    min-width: 100% !important;
    align-items: center !important;
  }

  #notesPanel .note-composer-toolbar::-webkit-scrollbar {
    display: none;
  }

  #notesPanel .note-toolbar-group {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  #notesPanel .note-toolbar-group--select {
    flex: 0 0 170px !important;
    width: 170px !important;
    min-width: 170px !important;
  }

  #notesPanel .note-toolbar-group--spacer {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
  }

  #notesPanel .note-toolbar-btn {
    flex: 0 0 auto !important;
  }

  #notesPanel .note-card-actions {
    width: 100%;
  }

  #notesPanel .note-edit-btn,
  #notesPanel .note-delete-btn {
    flex: 1 1 0;
  }
}

/* Notes columns height sync */
#notesPanel .notes-shell {
  align-items: stretch !important;
}

#notesPanel .notes-list-column,
#notesPanel .note-composer,
#notesPanel .note-composer-side {
  height: 100%;
  min-height: 0;
  align-self: stretch;
}

#notesPanel .notes-list-column,
#notesPanel .note-composer {
  display: flex;
  flex-direction: column;
}

#notesPanel .notes-list-shell {
  flex: 1 1 auto;
  min-height: 0;
}

#notesPanel .note-composer {
  display: flex;
  flex-direction: column;
}

#notesPanel .notes-composer-sheet {
  flex: 1 1 auto;
  min-height: 0;
}

#notesPanel .note-composer-body {
  flex: 1 1 auto;
  min-height: 0;
}

#notesPanel .note-composer-main,
#notesPanel .note-composer-side {
  min-height: 0;
}

#notesPanel .note-composer-side {
  align-content: start;
}

@media (max-width: 1280px) {
  #notesPanel .notes-shell {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(240px, 300px) !important;
  }

  #notesPanel .notes-list-column {
    grid-column: 1 / 2 !important;
  }

  #notesPanel .note-composer {
    grid-column: 2 / 3 !important;
  }

  #notesPanel .note-composer-side {
    grid-column: 3 / 4 !important;
  }

  #notesPanel .notes-list-shell {
    position: static;
    min-height: 100%;
  }
}

@media (max-width: 1120px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .notes-list-column,
  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }

  #notesPanel .notes-list-shell {
    position: static;
  }
}

/* Notes flex fallback for stable equal-height columns */
#notesPanel .notes-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  align-items: stretch !important;
  gap: 18px;
}

#notesPanel .note-composer {
  width: auto;
  max-width: none;
  flex: initial;
  min-width: 0;
  order: 1;
}

#notesPanel .note-composer-side {
  width: auto;
  flex: initial;
  order: 2;
}

#notesPanel .note-composer,
#notesPanel .note-composer-side {
  min-height: 0;
}

#notesPanel .note-composer,
#notesPanel .note-composer-side {
  height: auto;
  align-self: stretch;
}

#notesPanel .note-composer {
  overflow: hidden;
}

#notesPanel .note-composer-side {
  overflow: auto;
}

#notesPanel .note-composer {
  grid-column: 1 / 2 !important;
}

#notesPanel .note-composer-side {
  grid-column: 2 / 3 !important;
}

#notesPanel .notes-list-column {
  display: none !important;
}

@media (max-width: 1120px) {
  #notesPanel .notes-board .notes-grid--cards {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #notesPanel .note-composer,
  #notesPanel .note-composer-side {
    grid-column: auto !important;
  }
}

#notesPanel .note-composer .notes-grid--cards {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 1120px) {
  #notesPanel .note-composer .notes-grid--cards {
    grid-template-columns: 1fr !important;
  }
}

/* Notes utility bar screenshot-style override */
#notesPanel .notes-utility-bar {
  direction: ltr !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 1.15fr) minmax(0, 2fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 16px 18px !important;
  margin-bottom: 14px !important;
  min-height: 114px !important;
  border: 1px solid rgba(220, 229, 239, 0.95) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: blur(16px);
}

#notesPanel .notes-utility-search {
  min-width: 0;
}

#notesPanel .notes-utility-filters {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

#notesPanel .notes-utility-filter-shell {
  position: relative;
  min-width: 0;
}

#notesPanel .notes-utility-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#notesPanel .notes-search-field {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border-color: rgba(216, 226, 236, 0.98);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#notesPanel .notes-search-field input {
  font-size: 15px;
  color: #334155;
}

#notesPanel .notes-utility-filter {
  position: relative;
  min-width: 0;
  min-height: 58px;
  padding: 10px 16px 10px 14px;
  border: 1px solid rgba(216, 226, 236, 0.98);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #1e293b;
  text-align: right;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: stretch;
  overflow: hidden;
}

#notesPanel .notes-project-quick-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline: 0;
  z-index: 9999;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(216, 226, 236, 0.98);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

#notesPanel .notes-project-quick-menu.is-hidden {
  display: none;
}

#notesPanel .notes-project-quick-menu .notes-chip {
  width: 100%;
}

#notesPanel .notes-utility-filter-kicker {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1.2;
}

#notesPanel .notes-utility-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

#notesPanel .notes-utility-filter strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#notesPanel .notes-utility-filter svg {
  width: 18px;
  height: 18px;
  color: #7c8aa0;
  flex: none;
}

#notesPanel .notes-utility-filter select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 10px 44px 10px 14px;
  border: 0;
  background: transparent;
  color: transparent;
  appearance: none;
  cursor: pointer;
}

#notesPanel .notes-utility-filter--customer {
  border-color: rgba(214, 228, 254, 0.98);
}

#notesPanel .notes-utility-filter--customer svg {
  color: #7c8cf6;
}

#notesPanel .notes-utility-filter--project {
  border-color: rgba(214, 227, 245, 0.98);
}

#notesPanel .notes-utility-filter--project svg {
  color: #6b7fa6;
}

#notesPanel .notes-utility-btn--primary {
  min-height: 58px;
  padding: 0 22px;
  border-radius: 18px;
  font-size: 17px;
  white-space: nowrap;
  background: linear-gradient(135deg, #189f79 0%, #1fb497 100%) !important;
  box-shadow: 0 16px 30px rgba(25, 158, 121, 0.24) !important;
}

#notesPanel .notes-utility-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(216, 226, 236, 0.98);
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
}

#notesPanel .notes-utility-switcher {
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(216, 226, 236, 0.98);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fafd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#notesPanel .notes-utility-switcher-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8b95a7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#notesPanel .notes-utility-switcher-btn.is-active {
  background: #ffffff;
  color: #f59e0b;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

#notesPanel .notes-utility-switcher-btn svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1320px) {
  #notesPanel .notes-utility-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  #notesPanel .notes-utility-actions {
    justify-content: space-between;
  }
}

@media (max-width: 900px) {
  #notesPanel .notes-utility-filters {
    grid-template-columns: 1fr;
  }

  #notesPanel .notes-utility-actions {
    flex-wrap: wrap;
  }

  #notesPanel .notes-utility-btn--primary {
    width: 100%;
  }
}

/* Notes page polished redesign */
#notesPanel.page-panel {
  padding: 20px !important;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 26%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.06), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%) !important;
}

#notesPanel .notes-page-hero,
#notesPanel .notes-utility-bar,
#notesPanel .notes-list-shell,
#notesPanel .note-composer-side {
  border: 1px solid rgba(223, 232, 243, 0.96) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06) !important;
  backdrop-filter: blur(14px);
}

#notesPanel .notes-page-hero {
  direction: rtl !important;
  display: flex !important;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px !important;
  margin-bottom: 18px !important;
  overflow: hidden;
}

#notesPanel .notes-page-hero-copy {
  text-align: right;
}

#notesPanel .notes-page-hero-copy span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary-dark) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

#notesPanel .notes-page-hero-copy h1 {
  margin: 0;
  color: #0f172a !important;
  font-size: clamp(30px, 3vw, 44px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

#notesPanel .notes-page-hero-copy p {
  margin: 10px 0 0 !important;
  max-width: 620px;
  color: #64748b !important;
  font-size: 16px !important;
  line-height: 1.9 !important;
}

#notesPanel .notes-page-hero-actions {
  display: flex !important;
  align-items: center;
  gap: 14px;
}

#notesPanel .notes-hero-btn--primary,
#notesPanel .notes-utility-btn--primary,
#notesPanel .notes-side-summary-btn,
#notesPanel .note-save-btn {
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 34px rgba(103, 103, 236, 0.22) !important;
}

#notesPanel .notes-hero-btn--primary,
#notesPanel .notes-side-summary-btn,
#notesPanel .notes-utility-btn--primary {
  min-height: 52px !important;
  padding: 0 22px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

#notesPanel .notes-hero-icon-btn,
#notesPanel .notes-utility-icon,
#notesPanel .notes-utility-switcher-btn {
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #64748b !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#notesPanel .notes-utility-bar {
  direction: rtl !important;
  grid-template-columns: minmax(260px, 1.05fr) minmax(0, 1.8fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 18px 20px !important;
}

#notesPanel .notes-utility-search,
#notesPanel .notes-utility-actions {
  direction: rtl;
}

#notesPanel .notes-search-field {
  min-height: 74px !important;
  padding: 0 20px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(225, 232, 242, 0.98) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 12px 24px rgba(15, 23, 42, 0.03) !important;
}

#notesPanel .notes-search-field input {
  font-size: 16px !important;
}

#notesPanel .notes-utility-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

#notesPanel .notes-utility-filter {
  min-height: 74px !important;
  padding: 14px 18px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(225, 232, 242, 0.98) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.03) !important;
}

#notesPanel .notes-utility-filter-kicker {
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#notesPanel .notes-utility-filter strong {
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

#notesPanel .notes-utility-switcher {
  padding: 6px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
}

#notesPanel .notes-utility-switcher-btn {
  width: 50px !important;
  height: 50px !important;
}

#notesPanel .notes-utility-switcher-btn.is-active {
  background: rgba(103, 103, 236, 0.1) !important;
  color: var(--primary-dark) !important;
  box-shadow: none !important;
}

#notesPanel .notes-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 360px) !important;
  gap: 18px !important;
  align-items: start !important;
  direction: rtl !important;
}

#notesPanel .note-composer {
  grid-column: 1 / 2 !important;
  overflow: visible !important;
  margin-top: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#notesPanel .note-composer-side {
  grid-column: 2 / 3 !important;
  padding: 18px !important;
  position: sticky;
  top: 18px;
}

#notesPanel .notes-board .notes-list-shell {
  padding: 18px !important;
  direction: rtl !important;
}

#notesPanel .notes-list-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92) !important;
}

#notesPanel .notes-list-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

#notesPanel .notes-list-head h2 {
  margin: 0;
  color: #0f172a !important;
  font-size: 30px !important;
  font-weight: 900 !important;
}

#notesPanel .notes-list-head p {
  margin: 8px 0 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
}

#notesPanel .notes-list-filters {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#notesPanel .notes-list-filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

#notesPanel .notes-list-filter.active {
  background: rgba(16, 185, 129, 0.1);
  color: #0f766e;
  border-color: rgba(16, 185, 129, 0.2);
}

#notesPanel .notes-list-scroll {
  max-height: none !important;
  overflow: visible !important;
  padding-inline-end: 0 !important;
}

#notesPanel .notes-grid--cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

#notesPanel .note-card {
  height: auto !important;
  min-height: 340px !important;
  padding: 22px !important;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.95), rgba(255,255,255,0.78) 42%, transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06) !important;
  transform: none !important;
}

#notesPanel .note-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(16,185,129,0.06), transparent 32%);
  pointer-events: none;
}

#notesPanel .note-card-head,
#notesPanel .note-card-body-copy,
#notesPanel .note-card-foot {
  position: relative;
  z-index: 1;
}

#notesPanel .note-card-head {
  direction: rtl !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 12px !important;
}

#notesPanel .note-card-head-main {
  grid-template-columns: auto 1fr !important;
  align-items: start !important;
}

#notesPanel .note-card-title {
  -webkit-line-clamp: 2;
  line-height: 1.5 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  text-align: right !important;
}

#notesPanel .note-card-edit-icon {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
}

#notesPanel .note-card-body-trigger {
  margin-top: 16px;
  flex: 1 1 auto;
}

#notesPanel .note-card-body-meta {
  margin-bottom: 14px;
}

#notesPanel .note-card-body-date {
  color: #64748b !important;
  font-size: 13px !important;
  gap: 8px !important;
}

#notesPanel .note-card-summary {
  color: #475569 !important;
  font-size: 13px !important;
  line-height: 1.9 !important;
  min-height: 104px;
}

#notesPanel .note-card-mid-lines {
  display: none !important;
}

#notesPanel .note-card-foot {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

#notesPanel .note-card-meta-pill {
  min-height: 38px;
  padding: 0 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04) !important;
}

#notesPanel .note-card-meta-copy strong {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#notesPanel .note-card-meta-circle {
  width: 8px !important;
  height: 8px !important;
  background: var(--note-accent) !important;
  opacity: 1 !important;
}

#notesPanel .notes-side-summary,
#notesPanel .note-composer-side .note-composer-section {
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,0.88) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05) !important;
}

#notesPanel .notes-side-summary {
  padding: 18px !important;
}

#notesPanel .notes-side-summary-btn {
  width: 100%;
  margin-top: 14px;
}

#notesPanel .note-composer-section {
  padding: 18px !important;
}

#notesPanel .note-section-label {
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#notesPanel .notes-summary-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#notesPanel .notes-summary-stat-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.04);
}

#notesPanel .notes-summary-stat-card b {
  color: #0f172a !important;
  font-size: 26px !important;
  font-weight: 900 !important;
}

#notesPanel .notes-summary-stat-card span,
#notesPanel .notes-chip-list .notes-sidebar-empty,
#notesPanel .note-message-box {
  color: #64748b !important;
}

#notesPanel .notes-sidebar-filters,
#notesPanel .notes-chip-list {
  gap: 10px !important;
}

#notesPanel .notes-sidebar-filter,
#notesPanel .notes-chip {
  min-height: 42px;
  border-radius: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

#notesPanel .notes-sidebar-filter.active,
#notesPanel .notes-chip.active {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}

#notesPanel .notes-project-quick-menu {
  padding: 12px !important;
  border-radius: 22px !important;
}

#notesPanel .note-checklist-builder input {
  border-radius: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.96) !important;
  background: #ffffff !important;
}

@media (max-width: 1240px) {
  #notesPanel .notes-shell {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .note-composer-side {
    grid-column: 1 / -1 !important;
    position: static;
  }
}

@media (max-width: 900px) {
  #notesPanel.page-panel {
    padding: 14px !important;
  }

  #notesPanel .notes-page-hero,
  #notesPanel .notes-utility-bar,
  #notesPanel .notes-list-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #notesPanel .notes-grid--cards {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .notes-summary-stats,
  #notesPanel .notes-utility-filters {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  #notesPanel.page-panel {
    padding: 12px !important;
  }

  #notesPanel .notes-utility-bar {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 12px !important;
  }

  #notesPanel .notes-utility-actions {
    justify-content: stretch !important;
  }

  #notesPanel .notes-utility-btn--primary {
    width: 100% !important;
    justify-content: center !important;
  }

  #notesPanel .notes-utility-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 10px !important;
    padding-bottom: 2px !important;
    scrollbar-width: none;
  }

  #notesPanel .notes-utility-filters::-webkit-scrollbar {
    display: none;
  }

  #notesPanel .notes-utility-filter-shell {
    flex: 0 0 220px !important;
    min-width: 220px !important;
  }

  #notesPanel .notes-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    direction: rtl !important;
    padding: 0 !important;
  }

  #notesPanel .notes-board {
    order: 1 !important;
    width: 100% !important;
    align-self: stretch !important;
  }

  #notesPanel .note-composer {
    display: flex !important;
    flex-direction: column !important;
    order: 2 !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding: 14px !important;
  }

  #notesPanel .note-composer.is-open {
    display: flex !important;
  }

  #notesPanel .note-composer .notes-composer-sheet.is-hidden {
    display: none !important;
  }

  #notesPanel .note-composer-side {
    display: none !important;
  }

  #notesPanel .notes-list-shell {
    padding: 14px 0 !important;
    max-height: none !important;
    position: static !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
  }

  #notesPanel .notes-list-head {
    gap: 8px !important;
  }

  #notesPanel .notes-list-head h2 {
    font-size: 22px !important;
    line-height: 1.35 !important;
  }

  #notesPanel .notes-list-scroll {
    max-height: none !important;
    overflow: visible !important;
    padding-inline-end: 0 !important;
  }

  #notesPanel .notes-grid--cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

#notesPanel .note-card {
  min-height: 0 !important;
  height: auto !important;
  padding: 16px !important;
  border-radius: 22px !important;
  }

  #notesPanel .note-card-head {
    gap: 10px !important;
  }

  #notesPanel .note-card-title {
    font-size: 17px !important;
    line-height: 1.45 !important;
  }

  #notesPanel .note-card-body-trigger {
    min-height: 0 !important;
  }

  #notesPanel .note-card-foot {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .note-card-body-grid {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .note-card-dots {
    width: 100% !important;
    height: 18px !important;
    grid-template-columns: repeat(8, 1fr) !important;
  }

  #notesPanel .note-composer-meta-row {
    grid-template-columns: 1fr !important;
  }

  #notesPanel .note-composer-chip,
  #notesPanel .note-composer-chip--color {
    height: auto !important;
  }

  #notesPanel .note-editor-frame-shell,
  #notesPanel .note-editor-frame,
  #notesPanel .note-editor-content {
    min-height: 180px !important;
  }

  #notesPanel .note-editor-frame-shell {
    max-height: 42vh !important;
  }
}

@media (max-width: 768px) {
  #notes2Panel {
    min-height: 100dvh;
  }

  #notes2Panel .notes-page-hero,
  #notes2Panel .notes-utility-bar {
    padding-inline: 4px;
  }

  #notes2Panel .notes-shell {
    gap: 10px !important;
    overflow: visible;
  }

  #notes2Panel .note-composer {
    padding: 12px !important;
    gap: 10px !important;
    border-radius: 20px !important;
  }

  #notes2Panel .notes-composer-sheet {
    gap: 12px !important;
  }

  #notes2Panel .note-composer-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #notes2Panel .note-composer-header::-webkit-scrollbar {
    display: none;
  }

  #notes2Panel .note-composer-header-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  #notes2Panel .note-composer-header-copy span {
    font-size: 11px !important;
  }

  #notes2Panel .note-composer-header-copy strong {
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #notes2Panel .note-composer-header-copy p {
    display: none !important;
  }

  #notes2Panel .note-composer-header-actions {
    flex: 1 1 100% !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  #notes2Panel .note-icon-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 11px !important;
  }

  #notes2Panel .note-icon-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  #notes2Panel .note-save-btn--compact {
    order: -1 !important;
  }

  #notes2Panel .note-composer-body {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  #notes2Panel .note-composer-main {
    gap: 10px !important;
    overflow: visible !important;
  }

  #notes2Panel .note-composer-side {
    display: none !important;
  }

  #notes2Panel .note-composer-title-wrapper {
    min-height: 56px !important;
    padding-inline: 12px !important;
    border-radius: 16px !important;
  }

  #notes2Panel .note-composer-main input {
    min-height: 48px !important;
    font-size: 15px !important;
    padding: 12px 14px !important;
  }

  #notes2Panel .note-composer-toolbar {
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }

  #notes2Panel .note-toolbar-btn {
    width: 36px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  #notes2Panel .note-toolbar-group--select {
    flex: 0 0 140px !important;
    width: 140px !important;
    min-width: 140px !important;
  }

  #notes2Panel .note-toolbar-divider {
    height: 18px !important;
  }

  #notes2Panel .note-toolbar-hint {
    font-size: 11px !important;
  }

  #notes2Panel .note-editor-footer {
    margin-bottom: 6px !important;
    gap: 8px !important;
  }

  #notes2Panel .note-editor-content {
    height: clamp(130px, 16vh, 180px) !important;
    max-height: clamp(130px, 16vh, 180px) !important;
    min-height: 0 !important;
    resize: none !important;
  }

  #notes2Panel .note-composer {
    height: auto !important;
    max-height: none !important;
  }

  #notes2Panel .note-composer-toolbar {
    padding: 10px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    width: 100% !important;
    min-width: 100% !important;
    align-items: center !important;
  }

  #notes2Panel .note-composer-toolbar::-webkit-scrollbar {
    display: none;
  }

  #notes2Panel .note-toolbar-group {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  #notes2Panel .note-toolbar-group--select {
    flex: 0 0 170px !important;
    width: 170px !important;
    min-width: 170px !important;
  }

  #notes2Panel .note-toolbar-group--spacer {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
  }

  #notes2Panel .note-toolbar-btn {
    flex: 0 0 auto !important;
  }

  #calendarPanel.page-panel.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 10px 12px !important;
  }

  #calendarPanel .calendar-title {
    order: 1;
    position: relative !important;
    display: block !important;
    margin: 0 !important;
    padding: 8px 52px 4px !important;
    min-height: 78px !important;
  }

  #calendarPanel .calendar-title > div:first-child {
    text-align: center;
    display: grid !important;
    gap: 4px !important;
  }

  #calendarPanel .calendar-title span {
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  #calendarPanel .calendar-title h1 {
    margin: 1px 0 2px !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  #calendarPanel .calendar-title p {
    display: none !important;
  }

  #calendarPanel .calendar-actions {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 8px 0 !important;
    pointer-events: none;
  }

  #calendarPanel .calendar-actions button {
    pointer-events: auto;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #20314a !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  #calendarPanel .calendar-actions button::before {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 30px;
    line-height: 1;
    color: inherit;
  }

  #calendarPanel #calendarPrevBtn::before {
    content: "‹";
    font-size: 40px;
    transform: translateY(-1px);
  }

  #calendarPanel #calendarNextBtn::before {
    content: "›";
    font-size: 40px;
    transform: translateY(-1px);
  }

  #calendarPanel #calendarTodayBtn {
    display: none !important;
  }

  #calendarPanel .calendar-shell {
    order: 2;
    margin: 0 !important;
    border-radius: 18px !important;
    min-height: 560px !important;
    overflow: hidden !important;
    border-color: #e3e8f0 !important;
  }

  #calendarPanel .calendar-weekdays {
    min-height: 30px !important;
    border-bottom-color: #e7edf4 !important;
  }

  #calendarPanel .calendar-weekdays span {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #617189 !important;
    padding: 0 2px !important;
  }

  #calendarPanel .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    overflow-x: hidden !important;
  }

  #calendarPanel .calendar-day {
    min-height: 92px !important;
    height: 92px !important;
    padding: 7px 3px 6px !important;
    background: #fff !important;
    background-image: none !important;
    border-left: 1px solid #edf2f7 !important;
    border-bottom: 1px solid #edf2f7 !important;
  }

  #calendarPanel .calendar-day-head {
    min-height: 14px !important;
    margin-bottom: 3px !important;
    justify-content: center !important;
  }

  #calendarPanel .calendar-day-head strong {
    font-size: 13px !important;
    font-weight: 500 !important;
  }

  #calendarPanel .calendar-day-body {
    gap: 2px !important;
    justify-items: center !important;
    text-align: center !important;
  }

  #calendarPanel .calendar-stat {
    display: grid !important;
    justify-items: center !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    color: #334155 !important;
    text-align: center !important;
  }

  #calendarPanel .calendar-stat em {
    font-style: normal !important;
    font-size: 7px !important;
    line-height: 1 !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  #calendarPanel .calendar-stat b {
    font-size: 10px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  #calendarPanel .calendar-stat--deadline em {
    color: #8a6500 !important;
  }

  #calendarPanel .calendar-stat--work em {
    color: #0f766e !important;
  }

  #calendarPanel .calendar-stat--created em {
    color: #1d4ed8 !important;
  }

  #calendarPanel .calendar-day.is-today::after {
    display: none !important;
  }

  #calendarPanel .calendar-day.is-today::before {
    display: none !important;
  }

  #calendarPanel .calendar-day.is-today {
    background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(103, 103, 236, 0.08) !important;
  }

  #calendarPanel .calendar-day.is-today .calendar-day-head strong {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    color: #3b82f6 !important;
  }

  #calendarPanel .calendar-day.is-today .calendar-day-head strong::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 16px;
    height: 2px;
    background: #3b82f6;
    border-radius: 999px;
    transform: translateX(-50%);
  }

  #calendarPanel .calendar-day.is-outside {
    background: #fff !important;
    color: rgba(69, 80, 108, 0.38) !important;
    opacity: 1 !important;
  }

  #calendarPanel .calendar-day.is-past {
    background: linear-gradient(180deg, #fff7d9 0%, #fffdf2 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(246, 183, 60, 0.18) !important;
    padding: 8px 3px 6px !important;
  }

  #calendarPanel .calendar-today-summary {
    order: 3;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 8px 12px 10px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e3e8f0 !important;
  }

  #calendarPanel .calendar-today-summary > strong {
    display: none !important;
  }

#calendarPanel .calendar-today-summary > div {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f7 !important;
}

#calendarPanel .calendar-today-summary span {
  font-size: 11px !important;
  color: #334155 !important;
}

#calendarPanel .calendar-today-summary b {
  font-size: 13px !important;
  color: #0f172a !important;
}
}
