:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at top left, rgba(33, 65, 104, 0.35), transparent 28%),
    linear-gradient(180deg, #11161d 0%, #0b0f14 100%);
  color: #dfe7ef;
  --bg-panel: rgba(18, 25, 33, 0.94);
  --bg-panel-strong: #161d25;
  --bg-panel-soft: #1d2732;
  --bg-panel-alt: #131b24;
  --bg-accent: rgba(111, 177, 255, 0.08);
  --line: #2a3948;
  --line-bright: #41617b;
  --text-muted: #93a6b9;
  --text-strong: #f2f7fb;
  --danger: #b64b4b;
  --primary: #2f7397;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  background: transparent;
  overflow: hidden;
}

body {
  width: 100vw;
  max-width: 100vw;
  min-width: 1280px;
  font-size: 0.95rem;
  line-height: 1.4;
  overflow: hidden;
}

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

.login-shell,
.loading-screen {
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.error-dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 11, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.error-dialog {
  width: 420px;
  padding: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--danger);
  border-radius: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.action-dialog {
  width: min(100%, 760px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border-color: var(--line-bright);
  overflow: hidden;
}

.error-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.error-dialog p {
  margin: 0 0 18px;
  color: #f2c3c3;
}

.action-dialog-body {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  overflow: auto;
  padding-right: 6px;
}

.action-dialog-body p {
  margin: 0;
  color: var(--text-strong);
}

.detail-action-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.login-panel,
.workspace-panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.login-panel {
  width: 520px;
  padding: 26px;
}

.login-header h1,
.panel-header h2 {
  margin: 6px 0;
  color: var(--text-strong);
}

.eyebrow {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
}

.form-grid input {
  background: #0d1319;
  color: var(--text-strong);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 10px 12px;
}

.form-grid input.locked-input {
  background: #18212b;
  color: #7f92a5;
  border-color: #324354;
  cursor: not-allowed;
}

.form-grid label.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  grid-template-columns: none;
  justify-self: start;
  width: fit-content;
}

.checkbox-field input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-copy {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-grid select,
.form-grid textarea {
  background: #0d1319;
  color: var(--text-strong);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 10px 12px;
}

.dialog-field {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
}

.dialog-field input {
  background: #0d1319;
  color: var(--text-strong);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 10px 12px;
}

.dialog-field select,
.dialog-field textarea {
  background: #0d1319;
  color: var(--text-strong);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 10px 12px;
  resize: vertical;
}

.field-note {
  margin-top: -6px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.field-note.is-success {
  color: #8fd7ae;
}

.field-note.is-error {
  color: #f1a3a3;
}

.dialog-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-field input {
  max-width: 140px;
}

.info-banner,
.error-banner {
  padding: 10px 12px;
  border-radius: 0.75rem;
  line-height: 1.45;
}

.info-banner {
  background: rgba(47, 115, 151, 0.16);
  border: 1px solid rgba(111, 177, 255, 0.28);
  color: #d3ebff;
}

.error-banner {
  background: rgba(182, 75, 75, 0.14);
  border: 1px solid rgba(182, 75, 75, 0.4);
  color: #ffd2d2;
}

.text-link-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9fd6ff;
  cursor: pointer;
}

.text-link-button:hover {
  color: #c5e7ff;
}

.selector-shell {
  position: relative;
}

.selector-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #0d1319;
  color: var(--text-strong);
  cursor: pointer;
}

.selector-trigger-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.selector-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--bg-panel-alt);
  box-shadow: var(--shadow);
  z-index: 40;
}

.checkbox-list {
  display: grid;
  gap: 0.45rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-strong);
}

.dialog-checkbox {
  padding-top: 0.35rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.permission-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(111, 177, 255, 0.04);
}

.permission-group strong {
  color: var(--text-strong);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.primary-button,
.secondary-button,
.module-button,
.tab {
  border-radius: 999px;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  padding: 10px 14px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(135deg, #6fb1ff 0%, #8df0cc 100%);
  color: #041018;
  font-weight: 700;
}

.secondary-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--bg-accent);
  color: var(--text-strong);
  cursor: pointer;
}

.module-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
}

.module-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.12);
  color: #9fd2ff;
}

.module-button-icon svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
}

.module-button.active,
.module-button:hover,
.secondary-button:hover {
  border-color: var(--line);
  background: rgba(111, 177, 255, 0.08);
  color: var(--text-strong);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.danger-button {
  border-color: rgba(182, 75, 75, 0.5);
  color: #ffd6d6;
}

.danger-button:hover {
  border-color: rgba(182, 75, 75, 0.85);
  background: rgba(182, 75, 75, 0.14);
}

.mfa-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg-panel-strong);
}

.mfa-card {
  display: grid;
  gap: 10px;
}

.mfa-qr-code {
  width: 200px;
  height: 200px;
  background: white;
  padding: 10px;
  border: 1px solid var(--line);
}

.mfa-secret {
  display: inline-block;
  padding: 8px 10px;
  background: #0d1319;
  border: 1px solid var(--line);
  color: var(--text-strong);
  word-break: break-all;
}

.app-shell {
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: 56px 38px minmax(0, 1fr);
  overflow: hidden;
}

.top-bar,
.tab-strip {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  justify-content: space-between;
  gap: 12px;
  padding: 0.6rem 0.95rem;
  overflow: visible;
}

.tab-strip {
  overflow: hidden;
}

.module-strip,
.tab-strip {
  gap: 6px;
}

.module-strip {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: visible;
}

.brand-block {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-block {
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #6fb1ff 0%, #8df0cc 100%);
  color: #041018;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark-image {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: block;
}

.tab {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem 0.65rem 0 0;
  background: rgba(12, 17, 27, 0.92);
  color: var(--text-muted);
  padding: 6px 10px;
}

.tab.active {
  border-color: var(--line-bright);
  background: rgba(18, 25, 40, 0.98);
  color: var(--text-strong);
}

.tab.dragging {
  opacity: 0.45;
}

.workspace {
  min-height: 0;
  height: 100%;
  padding: 0.8rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0.65rem;
  overflow: auto;
}

.workspace-panel {
  height: 100%;
  min-height: 0;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: clip;
}

.workspace-panel > * {
  min-width: 0;
}

.workspace-panel > .grid,
.workspace-panel > .timesheet-grid-shell,
.workspace-panel > .timesheet-admin-shell,
.workspace-panel > .project-tasks-shell,
.workspace-panel > .detail-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.grid {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  margin-top: 14px;
  overflow: auto;
}

.grid-header,
.grid-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 0.8fr 0.8fr 1.5fr;
}

.grid-header {
  background: var(--bg-panel-soft);
  font-weight: 600;
}

.grid-header > div,
.grid-row > div {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grid-row {
  border-top: 1px solid var(--line);
  cursor: default;
  min-height: 40px;
}

.grid-row:hover {
  background: rgba(47, 115, 151, 0.08);
}

.selected-row {
  background: rgba(111, 177, 255, 0.08);
}

.grid-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.context-menu {
  position: fixed;
  min-width: 168px;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg-panel-alt);
  box-shadow: var(--shadow);
  z-index: 80;
}

.context-menu-item {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
}

.context-menu-item:hover {
  background: rgba(111, 177, 255, 0.08);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 0.65rem;
  min-height: 0;
  overflow: hidden;
}

.detail-primary,
.detail-secondary {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(12, 17, 27, 0.68);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.detail-list {
  display: grid;
  gap: 0.45rem;
  min-height: 0;
  overflow: auto;
}

.detail-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(111, 177, 255, 0.04);
}

.detail-list-row span {
  color: var(--text-muted);
}

.detail-list-row strong {
  color: var(--text-strong);
  text-align: right;
}

.detail-token-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.detail-token {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.08);
  color: var(--text-strong);
}

.module-dropdown-shell,
.profile-menu-shell {
  position: relative;
}

.module-dropdown-menu,
.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  min-width: 220px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  z-index: 20;
  padding: 0.25rem;
}

.module-dropdown-menu {
  left: 0;
}

.profile-menu-dropdown {
  right: 0;
}

.module-dropdown-item,
.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
}

.module-dropdown-item:hover,
.profile-menu-item:hover {
  background: rgba(47, 115, 151, 0.12);
}

.module-dropdown-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #9fd2ff;
  flex: 0 0 auto;
}

.module-dropdown-item-icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.08);
  color: var(--text-strong);
  overflow: hidden;
  cursor: pointer;
}

.profile-avatar-fallback,
.profile-avatar-image,
.profile-picture-placeholder,
.profile-picture-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-avatar-fallback,
.profile-picture-placeholder {
  display: grid;
  place-items: center;
  background: #284155;
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.profile-avatar-image,
.profile-picture-preview {
  object-fit: cover;
  border: 1px solid var(--line);
}

.profile-menu-summary {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.25rem;
}

.profile-menu-summary strong {
  color: var(--text-strong);
}

.profile-menu-summary span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-upload {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.profile-upload-fields {
  display: grid;
  gap: 0.6rem;
}

.profile-picture-placeholder,
.profile-picture-preview {
  width: 84px;
  height: 84px;
  border-radius: 999px;
}

.profile-picture-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden-file-input {
  display: none;
}

.placeholder-panel {
  display: grid;
  place-items: center;
  text-align: center;
}

.project-summary-panel {
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
}

.project-summary-stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-height: 0;
  overflow: auto;
}

.project-summary-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(12, 17, 27, 0.68);
}

.project-summary-section {
  width: 100%;
}

.project-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-summary-metadata {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-description-block {
  display: grid;
  gap: 8px;
}

.project-description-block p,
.placeholder-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-member-list {
  display: grid;
  gap: 8px;
}

.project-member-asana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 10px;
}

.project-member-card,
.project-add-member-tile {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.025);
}

.project-member-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-member-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-member-copy strong,
.project-add-member-label {
  color: var(--text-strong);
}

.project-member-copy span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.project-member-avatar,
.project-member-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 999px;
}

.project-member-avatar {
  object-fit: cover;
  border: 1px solid var(--line);
}

.project-member-avatar-fallback {
  display: grid;
  place-items: center;
  background: #284155;
  color: var(--text-strong);
  font-weight: 700;
}

.project-member-remove-button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.project-member-remove-button.corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
}

.project-member-remove-button:hover {
  border-color: rgba(182, 75, 75, 0.85);
  background: rgba(182, 75, 75, 0.14);
  color: #ffd6d6;
}

.project-add-member-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.08);
  color: #9fd2ff;
  font-weight: 700;
}

.project-add-member-icon.large {
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
}

.project-add-member-tile {
  border-style: dashed;
  cursor: pointer;
  justify-content: flex-start;
}

.project-add-member-tile:hover {
  border-color: var(--line-bright);
  background: rgba(111, 177, 255, 0.06);
}

.project-member-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 0 2px;
}

.project-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(111, 177, 255, 0.04);
}

.project-member-row div {
  display: grid;
  gap: 4px;
}

.project-member-row div span {
  color: var(--text-muted);
}

.project-member-editor {
  display: grid;
  gap: 8px;
}

.project-member-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.placeholder-copy {
  display: grid;
  gap: 8px;
}

.project-due-soon-placeholder {
  min-height: 74px;
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
}

.project-nested-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--line);
}

.project-nested-tab {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 0.7rem 0.7rem 0 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.project-nested-tab.active,
.project-nested-tab:hover {
  border-color: var(--line);
  border-bottom-color: var(--bg-panel);
  background: rgba(111, 177, 255, 0.08);
  color: var(--text-strong);
}

.project-gantt-shell {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.project-gantt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-gantt-board {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(12, 17, 27, 0.58);
  overflow: auto;
  cursor: grab;
  touch-action: none;
}

.project-gantt-board.dragging {
  cursor: grabbing;
  user-select: none;
}

.project-gantt-grid {
  display: grid;
  min-width: max-content;
}

.project-gantt-months-row,
.project-gantt-days-row {
  position: sticky;
  top: 0;
  z-index: 2;
}

.project-gantt-months-row {
  background: rgba(15, 20, 31, 0.98);
}

.project-gantt-days-row {
  background: rgba(15, 20, 31, 0.94);
  top: 43px;
}

.project-gantt-side-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: inherit;
  color: var(--text-strong);
  font-weight: 600;
}

.project-gantt-side-label.muted {
  color: var(--text-muted);
  font-weight: 500;
}

.project-gantt-months,
.project-gantt-days {
  display: grid;
  min-width: 0;
}

.project-gantt-month-cell,
.project-gantt-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.project-gantt-month-cell {
  justify-content: flex-start;
  padding-left: 10px;
  color: var(--text-strong);
  font-weight: 600;
}

.project-gantt-day-cell {
  color: var(--text-muted);
}

.project-gantt-day-cell.weekend,
.project-gantt-track-cell.weekend {
  background: rgba(255, 255, 255, 0.03);
}

.project-gantt-task-row {
  min-height: 82px;
}

.project-gantt-task-meta {
  position: sticky;
  left: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 31, 0.96);
}

.project-gantt-task-meta strong {
  color: var(--text-strong);
}

.project-gantt-task-meta span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.project-gantt-track {
  position: relative;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.project-gantt-track-grid {
  display: grid;
  height: 100%;
}

.project-gantt-track-cell {
  border-right: 1px solid var(--line);
}

.project-gantt-task-bar {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  min-width: 56px;
  max-width: calc(100% - 8px);
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  transform: translateY(-50%);
  overflow: hidden;
  color: #f6fbff;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.project-gantt-task-bar.status-not-started {
  background: linear-gradient(135deg, #5c6f82, #7a90a5);
}

.project-gantt-task-bar.status-in-progress {
  background: linear-gradient(135deg, #1877c9, #5eb0ff);
}

.project-gantt-task-bar.status-complete {
  background: linear-gradient(135deg, #198754, #5dc28a);
}

.project-gantt-empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  color: var(--text-muted);
  background: rgba(12, 17, 27, 0.42);
}

.project-tasks-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin-top: 12px;
  overflow: hidden;
}

.project-tasks-grid-panel,
.task-slide-panel {
  background: rgba(12, 17, 27, 0.68);
}

.project-tasks-grid-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: hidden;
}

.project-tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.project-tasks-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-task-filter {
  min-width: 220px;
  background: #0d1319;
  color: var(--text-strong);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 8px 10px;
}

.task-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.task-grid-header,
.task-grid-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(100px, 0.9fr) minmax(110px, 0.9fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr);
  gap: 0;
}

.task-grid-header {
  background: var(--bg-panel-soft);
  font-weight: 600;
}

.task-grid-header > div,
.task-grid-row > div {
  padding: 8px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-right: 1px solid var(--line);
}

.task-grid-row {
  width: 100%;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
}

.task-grid-row:hover {
  background: rgba(111, 177, 255, 0.05);
}

.task-grid-empty-row {
  width: 100%;
  padding: 10px;
  border: none;
  border-top: 1px dashed var(--line);
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}

.task-grid-empty-row:hover {
  background: rgba(111, 177, 255, 0.05);
  color: var(--text-strong);
}

.task-slide-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 380px);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 40px rgba(0, 0, 0, 0.28);
  transform: translateX(0);
  opacity: 1;
  animation: task-panel-enter 180ms ease;
  overflow: hidden;
}

.task-slide-panel.closing {
  animation: task-panel-exit 180ms ease forwards;
}

.task-slide-panel-header,
.task-slide-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.task-slide-panel-actions {
  border-top: 1px solid var(--line);
  border-bottom: none;
  margin-top: auto;
}

.task-slide-panel-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  min-height: 0;
  overflow: auto;
}

.task-slide-panel-body .dialog-two-column {
  align-items: end;
}

.task-editor-section {
  display: grid;
  gap: 8px;
}

.task-attachment-list,
.task-custom-fields-list {
  display: grid;
  gap: 8px;
}

.task-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-attachment-download {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
}

.task-attachment-download:hover:not(:disabled) {
  background: rgba(111, 177, 255, 0.08);
}

.task-attachment-download:disabled {
  cursor: wait;
  opacity: 0.8;
}

.task-attachment-row.pending-upload .task-attachment-download {
  border-style: dashed;
}

.task-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.18);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.task-attachment-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.task-attachment-copy strong,
.task-attachment-copy span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-attachment-copy span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.task-attachment-add-button {
  justify-self: start;
}

.sr-only-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-fields-panel {
  margin-top: 12px;
}

.custom-fields-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: end;
}

.custom-fields-form-actions {
  display: flex;
  gap: 8px;
}

.custom-fields-grid {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: auto;
}

.timesheets-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  overflow: hidden;
}

.timesheets-header {
  display: grid;
  gap: 3px;
}

.timesheets-header-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  justify-content: flex-start;
}

.status-token {
  font-weight: 600;
}

.status-token.draft {
  background: rgba(111, 177, 255, 0.12);
}

.status-token.submitted {
  background: rgba(141, 240, 204, 0.14);
  color: #9ff5d3;
}

.status-token.approved {
  background: rgba(126, 208, 122, 0.18);
  color: #b7ffb5;
}

.timesheet-grid-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: auto;
  margin-top: 0;
}

.timesheet-grid-header,
.timesheet-grid-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(7, minmax(72px, 0.65fr)) minmax(80px, 0.7fr) minmax(180px, 1.1fr) 48px;
  gap: 0;
}

.timesheet-admin-grid-header,
.timesheet-admin-grid-row {
  grid-template-columns: minmax(220px, 1.8fr) repeat(7, minmax(72px, 0.65fr)) minmax(80px, 0.7fr) minmax(180px, 1.1fr);
}

.timesheet-grid-header {
  background: var(--bg-panel-soft);
  font-weight: 600;
}

.timesheet-grid-header > div,
.timesheet-grid-row > div {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}

.timesheet-grid-row {
  align-items: center;
  border-top: 1px solid var(--line);
}

.timesheet-grid-row input,
.timesheet-grid-row select {
  width: 100%;
}

.timesheet-row-total {
  font-weight: 600;
  color: var(--text-strong);
}

.timesheet-empty-state {
  padding: 16px 14px;
  color: var(--text-muted);
}

.timesheet-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.timesheet-actions .primary-button,
.timesheet-actions .secondary-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
}

.timesheet-admin-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timesheet-admin-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.timesheet-admin-list,
.timesheet-admin-detail {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(12, 17, 27, 0.5);
  overflow: auto;
  min-height: 0;
}

.timesheet-admin-list {
  display: grid;
  align-content: start;
}

.timesheet-admin-list-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
}

.timesheet-admin-list-item:first-child {
  border-top: none;
}

.timesheet-admin-list-item span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.timesheet-admin-list-item:hover {
  background: rgba(111, 177, 255, 0.06);
}

.timesheet-admin-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.timesheet-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timesheet-warning-list {
  display: grid;
  gap: 8px;
}

.timesheet-warning-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 194, 102, 0.06);
}

.timesheet-warning-row span {
  color: var(--text-muted);
}

.custom-fields-grid-header,
.custom-fields-grid-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(220px, 1.4fr) minmax(180px, 1fr);
}

.custom-fields-grid-header {
  background: var(--bg-panel-soft);
  font-weight: 600;
}

.custom-fields-grid-header > div,
.custom-fields-grid-row > div {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.custom-fields-grid-row {
  border-top: 1px solid var(--line);
}

.project-tasks-shell.panel-open .project-tasks-grid-panel {
  padding-right: 380px;
}

@keyframes task-panel-enter {
  from {
    transform: translateX(28px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes task-panel-exit {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(28px);
    opacity: 0;
  }
}

.project-due-soon-list {
  display: grid;
  gap: 8px;
}

.project-due-soon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(111, 177, 255, 0.04);
}

.project-due-soon-row span {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .project-gantt-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
