@import url("/assets/application-8efcce3b.css");

:root {
  --tc-navy: #17324a;
  --tc-blue: #2f6f9f;
  --tc-blue-dark: #245879;
  --tc-cyan: #6bb8c8;
  --tc-bg: #f4f6f4;
  --tc-panel: #fffefa;
  --tc-ink: #1c2f3d;
  --tc-text: #334155;
  --tc-muted: #718096;
  --tc-line: #dce4e8;
  --tc-soft: #eef5f3;
  --tc-radius: 8px;
}

html,
body,
#wrapper {
  color: var(--tc-text);
  background: var(--tc-bg);
  font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
}

a,
#main a {
  color: #005fb8;
  font-weight: 600;
  text-decoration: none;
}

a:hover,
#main a:hover {
  color: var(--tc-blue-dark);
  text-decoration: underline;
}

#top-menu {
  min-height: 42px;
  padding: 0 18px;
  background: var(--tc-navy);
  border: 0;
  box-shadow: 0 2px 8px rgba(8, 41, 69, 0.16);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

#top-menu a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 0 10px;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
}

#top-menu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  text-decoration: none;
}

#account {
  margin-left: auto;
}

#header {
  min-height: 84px;
  padding: 12px 24px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--tc-line);
  box-shadow: 0 3px 12px rgba(8, 41, 69, 0.07);
  position: relative;
  overflow: visible;
  color: var(--tc-ink);
}

#header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tc-cyan), var(--tc-blue));
  pointer-events: none;
}

#header h1 {
  margin: 0;
  padding: 0 0 0 14px;
  color: var(--tc-ink);
  font-size: 1.38rem;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: 0;
  border-left: 4px solid var(--tc-cyan);
  display: block;
  max-width: calc(100% - 500px);
  min-height: 34px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#header h1::before,
#header h1::after {
  content: none !important;
  display: none !important;
}

#quick-search {
  position: absolute;
  top: 14px;
  right: 24px;
  margin: 0;
  padding: 0;
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 2;
  height: 34px;
  color: var(--tc-text) !important;
}

#quick-search label {
  color: #475569 !important;
  font-weight: 700;
  line-height: 32px;
}

#quick-search input[type="text"],
#quick-search select {
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  border: 1px solid #c9d7e6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--tc-text) !important;
  box-shadow: none;
}

#quick-search input[type="text"] {
  width: 136px;
}

#quick-search select {
  width: 200px;
}

#main-menu {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  width: auto;
  min-height: 42px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  z-index: 3;
}

#main-menu ul {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  overflow-x: auto;
}

#main-menu li {
  margin: 0;
  padding: 0;
}

#main-menu li a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #334155;
  background: transparent;
  border-radius: 7px 7px 0 0;
  font-weight: 750;
  opacity: 1;
}

#main-menu li a:hover {
  color: var(--tc-blue-dark);
  background: var(--tc-soft);
  text-decoration: none;
}

#main-menu li a.selected,
#main-menu li a.selected:hover,
#main-menu li a.new-object {
  color: #ffffff;
  background: var(--tc-blue);
  box-shadow: none;
}

#main-menu .menu-children {
  border: 1px solid var(--tc-line);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 24px rgba(8, 41, 69, 0.12);
}

#main-menu .menu-children li a {
  color: var(--tc-text);
  background: #ffffff;
  border-radius: 0;
}

#main-menu .menu-children li a:hover {
  color: var(--tc-blue-dark);
  background: var(--tc-soft);
}

#main {
  margin: 18px 12px 0;
  background: transparent;
  font: 0.93rem "Segoe UI", "Noto Sans", Arial, sans-serif;
}

#content,
#main.nosidebar #content {
  background: var(--tc-panel);
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  box-shadow: none;
  padding: 20px;
}

h1,
h2,
h3,
h4,
.wiki h1,
.wiki h2,
.wiki h3 {
  color: var(--tc-ink);
  font-family: "Segoe UI", "Noto Sans", Arial, sans-serif;
  letter-spacing: 0;
}

h2 {
  font-size: 1.36rem;
  font-weight: 800;
  border-bottom-color: #e2edf7;
}

.box {
  background: #fbfdff;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  box-shadow: none;
}

table.list {
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #ffffff;
}

table.list thead th {
  color: var(--tc-ink);
  background: #e8f1f8;
  border-color: var(--tc-line);
  font-weight: 800;
}

table.list tbody tr.odd {
  background: #ffffff;
}

table.list tbody tr.even {
  background: #f8fbfe;
}

table.list tbody tr:hover td {
  background: #edf6fb;
}

table.list td,
table.list th {
  border-color: #dbe6ef;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  border: 1px solid #c8d6e4;
  border-radius: 6px;
  background: #ffffff;
  color: var(--tc-text);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--tc-blue);
  box-shadow: 0 0 0 3px rgba(11, 103, 178, 0.14);
  outline: none;
}

input[type="submit"],
input[type="button"],
button {
  color: #ffffff;
  border: 1px solid var(--tc-blue);
  border-radius: 6px;
  background: var(--tc-blue);
  font-weight: 700;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
  color: #ffffff;
  background: var(--tc-blue-dark);
}

#sidebar a.selected,
#sidebar a.selected:hover {
  color: #ffffff;
  background: var(--tc-blue);
  border-radius: 6px;
  box-shadow: none;
}

.tabs ul li a {
  border-radius: 6px 6px 0 0;
}

.tabs ul li a.selected {
  color: var(--tc-ink);
  background: #ffffff;
}

.flash,
.nodata,
.warning {
  border-radius: var(--tc-radius);
}

#footer {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 30;
  max-width: 34px;
  height: 28px;
  margin: 0;
  padding: 0 10px;
  overflow: hidden;
  color: transparent;
  background: rgba(8, 41, 69, 0.72);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(8, 41, 69, 0.18);
  font-size: 0;
  line-height: 28px;
  white-space: nowrap;
  opacity: 0.38;
  transition: max-width 160ms ease, opacity 160ms ease, color 160ms ease, font-size 160ms ease;
}

#footer::before {
  content: "i";
  display: inline-block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 28px;
}

#footer:hover,
#footer:focus-within {
  max-width: 560px;
  padding: 0 14px;
  color: #dbeafe;
  font-size: 12px;
  opacity: 1;
}

#footer:hover::before,
#footer:focus-within::before {
  margin-right: 8px;
}

#footer a {
  color: #ffffff;
}

@media screen and (max-width: 899px) {
  #header {
    min-height: 150px;
    padding: 14px 16px 0;
  }

  #header h1 {
    max-width: 100%;
    font-size: 1.18rem;
  }

  #quick-search {
    position: static;
    margin-top: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #main-menu {
    left: 16px;
    right: 16px;
  }

  #main {
    margin: 12px 8px 0;
  }
}

/* Quick search uses a form plus Redmine's project jump dropdown. */
#quick-search form {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#quick-search label,
#quick-search label a,
#quick-search label a:link,
#quick-search label a:visited {
  color: #475569 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#quick-search input#q {
  width: 136px;
}

#quick-search #project-jump {
  height: 34px;
  margin: 0;
}

#quick-search #project-jump .drdn-trigger {
  width: 200px;
  height: 32px;
  min-height: 32px;
  line-height: 30px;
  box-sizing: border-box;
  color: var(--tc-text) !important;
  background: #ffffff;
  border: 1px solid #c9d7e6;
  border-radius: 6px;
  box-shadow: none;
}

#quick-search #project-jump .drdn-trigger::after {
  top: 13px;
}

/* Comfortable reading palette: lower glare for long work sessions. */
html,
body,
#wrapper {
  background: #f4f6f4;
}

a,
#main a {
  color: #2f6f9f;
}

a:hover,
#main a:hover {
  color: #245879;
}

#top-menu {
  background: #17324a;
  box-shadow: 0 1px 4px rgba(23, 50, 74, 0.10);
}

#top-menu a {
  color: #eef6f7;
}

#top-menu a:hover {
  background: rgba(238, 246, 247, 0.12);
}

#header {
  background: #fffefa;
  border-bottom-color: #dce4e8;
  box-shadow: 0 2px 8px rgba(23, 50, 74, 0.05);
}

#header::after {
  height: 2px;
  background: linear-gradient(90deg, #8fc9d2, #6f9fbd);
}

#header h1 {
  color: #1c2f3d;
  border-left-color: #6bb8c8;
}

#main-menu li a {
  color: #3f5160;
}

#main-menu li a:hover {
  color: #245879;
  background: #eef5f3;
}

#main-menu li a.selected,
#main-menu li a.selected:hover,
#main-menu li a.new-object {
  color: #ffffff;
  background: #4f8daf;
}

#main {
  background: transparent;
}

#content,
#main.nosidebar #content,
.box,
.mypage-box,
.wiki,
.news,
.message {
  background: #fffefa;
  border-color: #dce4e8;
}

h1,
h2,
h3,
h4,
.wiki h1,
.wiki h2,
.wiki h3 {
  color: #1c2f3d;
}

h2 {
  border-bottom-color: #e6ecef;
}

table.list {
  background: #fffefa;
  border-color: #dce4e8;
}

table.list thead th {
  color: #243746;
  background: #edf3f2;
  border-color: #dce4e8;
}

table.list tbody tr.odd {
  background: #fffefa;
}

table.list tbody tr.even {
  background: #f8faf7;
}

table.list tbody tr:hover td {
  background: #edf5f3;
}

table.list td,
table.list th {
  border-color: #e2e8ea;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select,
#quick-search input[type="text"],
#quick-search select,
#quick-search #project-jump .drdn-trigger {
  background: #fffefa;
  border-color: #cfdadd;
  color: #334155 !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: #6f9fbd;
  box-shadow: 0 0 0 3px rgba(111, 159, 189, 0.16);
}

input[type="submit"],
input[type="button"],
button {
  background: #4f8daf;
  border-color: #4f8daf;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
  background: #3d7696;
}

#sidebar a.selected,
#sidebar a.selected:hover {
  background: #4f8daf;
}

#footer {
  background: rgba(23, 50, 74, 0.62);
  box-shadow: 0 4px 12px rgba(23, 50, 74, 0.12);
}

/* Toan Cau project phase overview */
.tc-phase-overview {
  margin-bottom: 14px;
}

.tc-phase-overview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.tc-phase-overview__head h3 {
  margin: 0;
  color: var(--tc-ink);
}

.tc-phase-overview__summary {
  min-width: 86px;
  text-align: right;
}

.tc-phase-overview__summary strong {
  display: block;
  color: #2f6f9f;
  font-size: 1.45rem;
  line-height: 1;
}

.tc-phase-overview__summary span,
.tc-phase-card__meta {
  color: var(--tc-muted);
  font-size: 0.82rem;
}

.tc-phase-overview__bar,
.tc-phase-card__bar {
  display: block;
  overflow: hidden;
  background: #e8efee;
  border-radius: 999px;
}

.tc-phase-overview__bar {
  height: 8px;
  margin-bottom: 14px;
}

.tc-phase-overview__bar span,
.tc-phase-card__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6bb8c8, #4f8daf);
}

.tc-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.tc-phase-card,
#main .tc-phase-card {
  display: block;
  padding: 12px;
  color: var(--tc-text);
  background: #fffefa;
  border: 1px solid var(--tc-line);
  border-radius: 8px;
  text-decoration: none;
}

.tc-phase-card:hover,
#main .tc-phase-card:hover {
  background: #f6faf8;
  border-color: #b8d0d6;
  text-decoration: none;
}

.tc-phase-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tc-phase-card__name {
  color: var(--tc-ink);
  font-weight: 750;
}

.tc-phase-card__top strong {
  color: #2f6f9f;
}

.tc-phase-card__bar {
  height: 6px;
  margin-bottom: 8px;
}

/* Project overview priorities: phase progress first, time tracking hidden. */
body.controller-projects.action-show #content .splitcontentleft {
  display: flex;
  flex-direction: column;
}

body.controller-projects.action-show #content .tc-phase-overview {
  order: -30;
}

body.controller-projects.action-show #content .issues.box {
  order: -20;
}

body.controller-projects.action-show #content .spent_time.box {
  display: none;
}

/* Account dropdown contrast fix. */
#top-menu #account.dropdown {
  position: relative;
}

#top-menu #account .dropdown-trigger {
  margin-right: 0;
  padding: 3px 6px;
}

#top-menu #account .dropdown-content {
  min-width: 190px;
  margin-top: 8px;
  padding: 6px 0;
  color: #1f3345;
  background: #ffffff;
  border: 1px solid #cfdbe6;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(8, 41, 69, 0.18);
}

#top-menu #account .dropdown-content .user-info {
  padding: 10px 14px;
  color: #1f3345;
}

#top-menu #account .dropdown-content .user-name,
#top-menu #account .dropdown-content .user-login {
  display: block;
  color: #1f3345;
}

#top-menu #account .dropdown-content .user-login {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 2px;
}

#top-menu #account .dropdown-content a,
#top-menu #account .dropdown-content a:link,
#top-menu #account .dropdown-content a:visited {
  min-height: 0;
  margin: 0;
  padding: 9px 14px;
  color: #0f4f89;
  background: transparent;
  border-radius: 0;
  font-weight: 650;
}

#top-menu #account .dropdown-content a:hover,
#top-menu #account .dropdown-content a:focus {
  color: #073a63;
  background: #eaf4f7;
  text-decoration: none;
}

#top-menu #account .dropdown-divider,
#top-menu #account .dropdown-content .logout {
  border-color: #d9e4ea;
}

/* Toan Cau checklist module. */
.tc-checklist-summary,
.tc-checklist-board {
  border-color: #d7e4ea;
  background: #fffefa;
}

.tc-checklist-summary__head,
.tc-checklist-board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tc-checklist-summary h3,
.tc-checklist-board h3 {
  margin-bottom: 4px;
  color: #17324a;
}

.tc-checklist-summary__link {
  white-space: nowrap;
}

.tc-checklist-mini,
#main .tc-checklist-mini {
  display: block;
  padding: 10px 0;
  color: #334155;
  border-top: 1px solid #e1ebef;
  text-decoration: none;
}

.tc-checklist-mini__name,
.tc-checklist-mini__meta {
  display: block;
}

.tc-checklist-mini__name {
  color: #17324a;
  font-weight: 750;
}

.tc-checklist-mini__meta {
  color: #64748b;
  font-size: 0.82rem;
}

.tc-checklist-mini__meta em {
  color: #b42318;
  font-style: normal;
  margin-left: 6px;
}

.tc-checklist-mini__bar {
  display: block;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f5;
}

.tc-checklist-mini__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4fa37c, #2f6f9f);
}

.tc-checklist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 16px;
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #d8e5ea;
  border-left-width: 5px;
  border-radius: 8px;
  background: #ffffff;
}

.tc-checklist-item.is-passed {
  border-left-color: #2f9e6d;
}

.tc-checklist-item.is-linked {
  border-left-color: #2f6f9f;
}

.tc-checklist-item.is-unlinked {
  border-left-color: #d64545;
  background: #fffafa;
}

.tc-checklist-item.is-na {
  border-left-color: #94a3b8;
}

.tc-checklist-item__status {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 3px 8px;
  color: #17324a;
  background: #eaf4f7;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.tc-checklist-item__source,
.tc-checklist-item__links {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.86rem;
}

.tc-checklist-item__links.is-missing {
  color: #b42318;
  font-weight: 700;
}

.tc-checklist-item__note {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f6faf8;
  border-radius: 6px;
}

.tc-checklist-item__settings {
  color: #334155;
}

.tc-checklist-item__settings label,
.tc-checklist-item__settings input,
.tc-checklist-item__settings select,
.tc-checklist-item__settings textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
}

@media (max-width: 900px) {
  .tc-checklist-item {
    grid-template-columns: 1fr;
  }
}

/* Toan Cau checklist visibility refinements. */
.tc-checklist-summary__stats,
.tc-checklist-board__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}

.tc-checklist-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #17324a;
  background: #eef5f7;
  font-size: 0.82rem;
  font-weight: 700;
}

.tc-checklist-stat.is-passed {
  color: #145437;
  background: #e6f6ed;
}

.tc-checklist-stat.is-linked {
  color: #174c75;
  background: #e6f1f8;
}

.tc-checklist-stat.is-unlinked,
.tc-checklist-stat.is-failed {
  color: #8f1f18;
  background: #fff0ee;
}

.tc-checklist-mini {
  border-top: 1px solid #e1ebef;
}

.tc-checklist-mini summary {
  padding: 10px 0;
  cursor: pointer;
  list-style-position: outside;
}

.tc-checklist-mini[open] summary {
  padding-bottom: 8px;
}

.tc-checklist-summary-list {
  display: grid;
  gap: 6px;
  margin: 0 0 10px 18px;
  padding: 0;
}

.tc-checklist-summary-list li {
  padding: 7px 8px;
  border-left: 4px solid #94a3b8;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.tc-checklist-summary-list li.is-passed {
  border-left-color: #2f9e6d;
}

.tc-checklist-summary-list li.is-linked {
  border-left-color: #2f6f9f;
}

.tc-checklist-summary-list li.is-unlinked {
  border-left-color: #d64545;
}

.tc-checklist-summary-list__status {
  display: inline-flex;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf3f5;
  color: #17324a;
  font-size: 0.76rem;
  font-weight: 800;
}

.tc-checklist-summary-list__text {
  color: #1f3345;
  font-weight: 650;
}

.tc-checklist-summary-list__links {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
}

.tc-checklist-board__percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  border-radius: 8px;
  color: #145437;
  background: #e6f6ed;
  font-size: 1rem;
}

.tc-checklist-board__bar {
  margin-bottom: 12px;
}

.tc-checklist-item__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.tc-checklist-item.is-passed .tc-checklist-item__status {
  color: #145437;
  background: #e6f6ed;
}

.tc-checklist-item.is-linked .tc-checklist-item__status {
  color: #174c75;
  background: #e6f1f8;
}

.tc-checklist-item.is-unlinked .tc-checklist-item__status {
  color: #8f1f18;
  background: #fff0ee;
}

@media (max-width: 700px) {
  .tc-checklist-item__top {
    grid-template-columns: 1fr;
  }
}

/* 3D logo fallback spacing. */
.tc-logo-3d-unavailable #header h1 {
  min-height: 46px;
}
