:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe5ef;
  --primary: #1769aa;
  --primary-strong: #0f4f82;
  --accent: #1f9f88;
  --warning: #b7791f;
  --danger: #b42318;
  --blue: #1769aa;
  --green: #16836f;
  --orange: #c56a18;
  --red: #b42318;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(238, 243, 248, 0.16), rgba(238, 243, 248, 0.24)),
    url("/hinh-nen-hoa-sen100.jpg") center center / cover fixed no-repeat,
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/hinh-nen-hoa-sen100.jpg") center center / cover no-repeat;
}

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

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

button:hover {
  background: var(--primary-strong);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 620px) minmax(300px, 420px);
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 32px;
  background: transparent;
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.login-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.login-card h2,
.panel h2 {
  margin: 0 0 12px;
}

.hint,
.muted {
  color: var(--muted);
}

.error {
  min-height: 20px;
  color: var(--danger);
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 72px 1fr;
}

.global-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(520px, auto) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  display: grid;
  gap: 4px;
  line-height: 1.15;
}

.brand-title span {
  white-space: nowrap;
  color: #17324d;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-title small {
  color: #1769aa;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  padding-left: 86px;
  background: #f7fafd;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-action {
  white-space: nowrap;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--primary);
  background: rgba(232, 242, 251, 0.92);
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 24px;
  border-right: 1px solid #d4deea;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
}

nav,
.side-bottom {
  display: grid;
  gap: 8px;
  align-content: start;
}

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

.case-list-main {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.case-link {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(23, 105, 170, 0.16);
  border-radius: 8px;
  padding: 9px;
  color: #172033;
  background: rgba(232, 242, 251, 0.74);
  text-decoration: none;
}

.case-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.case-link em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #344054;
  text-align: left;
  background: transparent;
}

.nav-item span {
  width: 24px;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  color: var(--primary-strong);
  background: #e8f2fb;
}

.user-box {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.user-box button {
  width: 100%;
}

.user-box span {
  color: var(--muted);
}

.user-box small {
  color: #344054;
  font-weight: 700;
}

.content {
  min-width: 0;
  padding: 24px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.12), transparent 58%),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.project-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
}

.project-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 120px);
  gap: 10px;
}

.hero-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
}

.hero-stat:hover,
.hero-stat.active {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: rgba(232, 242, 251, 0.94);
}

.hero-stat span {
  color: var(--muted);
  font-size: 13px;
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  backdrop-filter: blur(8px);
}

.view-tab,
.filter-button {
  color: #344054;
  background: #f4f7fb;
}

.view-tab.active,
.view-tab:hover,
.filter-button:hover {
  color: #fff;
  background: var(--primary);
}

.filter-button {
  margin-left: auto;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
}

.panel {
  padding: 20px;
}

.category-panel {
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.soft-note {
  border-radius: 999px;
  padding: 6px 10px;
  color: #245b51;
  background: #e5f7f2;
  font-size: 13px;
  font-weight: 700;
}

.category-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.category-block {
  min-height: 132px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  text-align: left;
  color: #fff;
  background: var(--blue);
}

.category-block strong {
  font-size: 32px;
}

.category-block small {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.category-green {
  background: linear-gradient(135deg, #16836f, #27a88e);
}

.category-blue {
  background: linear-gradient(135deg, #1769aa, #2d8dcc);
}

.category-orange {
  background: linear-gradient(135deg, #c56a18, #e99436);
}

.category-red {
  background: linear-gradient(135deg, #b42318, #d94a3f);
}

.folder-panel,
.document-panel {
  margin-bottom: 16px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.folder-card {
  min-height: 150px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 2px solid transparent;
  padding: 16px;
  color: #172033;
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
}

.folder-card.active {
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(23, 105, 170, 0.14);
}

.folder-icon {
  font-size: 34px;
  line-height: 1;
}

.folder-card small,
.folder-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.folder-blue {
  background: #f1f7fd;
}

.folder-red {
  background: #fff3f2;
}

.folder-green {
  background: #effaf7;
}

.folder-orange {
  background: #fff7ed;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(251, 253, 255, 0.82);
  cursor: pointer;
}

.document-card > div:first-child {
  min-width: 0;
}

.document-card strong,
.document-card p {
  overflow-wrap: anywhere;
}

.document-card.active {
  border-color: var(--primary);
  box-shadow: 0 12px 26px rgba(23, 105, 170, 0.16);
}

.overdue-document {
  border-left: 8px solid var(--danger);
  background: rgba(255, 242, 240, 0.9);
}

.document-card p {
  margin: 6px 0;
  color: var(--muted);
}

.document-card small {
  color: var(--muted);
}

.document-card span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--primary-strong);
  background: #e8f2fb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-panel {
  margin-bottom: 16px;
}

.document-preview {
  display: grid;
  gap: 12px;
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.preview-overdue {
  border-color: #f2a19b;
  background: rgba(255, 242, 240, 0.92);
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-meta span,
.preview-docs small {
  border-radius: 999px;
  padding: 5px 9px;
  color: #344054;
  background: #eef3f8;
  font-size: 12px;
  font-weight: 700;
}

.preview-docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.source-link {
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.danger-button:hover {
  background: #8f1d14;
}

.small-button {
  padding: 6px 9px;
  font-size: 12px;
}

.inline-delete {
  margin-left: 6px;
  border: 0;
  border-radius: 999px;
  padding: 2px 7px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
  cursor: pointer;
}

.completion-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.kanban-column {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(8px);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
}

.kanban-head span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--primary);
  background: #e8f2fb;
  font-weight: 700;
}

.kanban-stack,
.stack,
.task-list {
  display: grid;
  gap: 12px;
}

.add-card {
  width: 100%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #b8c6d8;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 16px;
}

.task-card,
.job-card,
.user-card,
.meeting-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  backdrop-filter: blur(8px);
}

.task-card {
  display: grid;
  gap: 12px;
  border-left: 6px solid var(--blue);
}

.task-overdue {
  border-left-color: var(--danger);
  background: rgba(255, 247, 246, 0.9);
}

.task-green {
  border-left-color: var(--green);
}

.task-orange {
  border-left-color: var(--orange);
}

.task-red {
  border-left-color: var(--red);
}

.task-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.task-head h3 {
  margin: 6px 0 0;
}

.category-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  color: #245b51;
  background: #e5f7f2;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--primary-strong);
  background: #e8f2fb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.warning {
  color: var(--warning);
  background: #fff4df;
}

.badge.danger {
  color: var(--danger);
  background: #fee4e2;
}

.card-meta,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.task-actions {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
}

.form-panel {
  display: grid;
  gap: 14px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.upload-box {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px dashed #9bb7d3;
  border-radius: 8px;
  padding: 14px;
  background: #f4f9ff;
}

.admin-summary-panel {
  margin-top: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 14px;
}

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

.admin-table th {
  color: #344054;
  background: #f4f7fb;
  font-weight: 800;
}

.admin-table td span {
  color: var(--muted);
}

.danger-text {
  color: var(--danger);
  font-weight: 800;
}

.table-chip {
  display: block;
  margin: 0 0 6px;
  border-radius: 6px;
  padding: 5px 7px;
  color: #344054 !important;
  background: #eef3f8;
}

.meeting-row {
  display: grid;
  gap: 6px;
  border-left: 6px solid var(--blue);
}

.meeting-green {
  border-left-color: var(--green);
}

.meeting-orange {
  border-left-color: var(--orange);
}

.meeting-red {
  border-left-color: var(--red);
}

.calendar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 8px;
}

.calendar-switch {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(232, 242, 251, 0.9);
}

.calendar-mode {
  color: var(--primary);
  background: transparent;
  font-weight: 700;
}

.calendar-mode.active,
.calendar-mode:hover {
  color: #fff;
  background: var(--primary);
}

.calendar-weekday {
  padding: 8px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.calendar-day {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: #fbfdff;
}

.calendar-day.active,
.calendar-day:hover {
  border-color: var(--primary);
  background: #e8f2fb;
}

.muted-day {
  background: #eef3f8;
}

.calendar-day span {
  font-weight: 700;
}

.calendar-event {
  display: block;
  border-radius: 6px;
  padding: 5px 6px;
  color: #fff;
  background: var(--blue);
  line-height: 1.25;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
}

.week-day {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
}

.week-day.active,
.week-day:hover {
  border-color: var(--primary);
  background: rgba(232, 242, 251, 0.94);
}

.week-day span {
  color: var(--muted);
  font-size: 13px;
}

.week-events {
  display: grid;
  gap: 7px;
}

.week-events em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.meeting-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

.event-green {
  background: var(--green);
}

.event-orange {
  background: var(--orange);
}

.event-red {
  background: var(--red);
}

.report-bars {
  display: grid;
  gap: 14px;
}

.report-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr 54px;
  align-items: center;
  gap: 12px;
}

.report-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.report-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.check-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 1220px) {
  .project-hero,
  .global-topbar {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .category-blocks,
  .folder-grid,
  .week-calendar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 980px) {
  .login-panel,
  .workspace,
  .grid.two,
  .kanban-board {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-rows: auto auto 1fr;
  }

  .global-topbar,
  .sidebar {
    position: static;
  }

  .sidebar {
    height: auto;
  }

  .toolbar,
  .task-actions,
  .report-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .document-card {
    align-items: stretch;
    flex-direction: column;
  }

  .document-actions {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .hero-stats,
  .category-blocks,
  .folder-grid,
  .calendar-grid,
  .week-calendar {
    grid-template-columns: 1fr;
  }

  .view-tabs,
  .top-actions {
    flex-wrap: wrap;
  }

  .calendar-weekday {
    display: none;
  }

  .brand-title span {
    white-space: normal;
  }
}
