:root {
  color-scheme: light;
  --bg: #f7f4f1;
  --surface: #ffffff;
  --surface-strong: #fff1e8;
  --text: #23201f;
  --muted: #746b66;
  --line: #eadfd8;
  --accent: #f36b21;
  --accent-dark: #d84e17;
  --accent-soft: #fff0e6;
  --done: #15936a;
  --open: #8a817b;
  --warning: #b45309;
  --charcoal: #25201e;
  --shadow: 0 22px 60px rgba(70, 42, 25, 0.12);
  --shadow-soft: 0 14px 36px rgba(70, 42, 25, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(243, 107, 33, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 241, 232, 0.95), rgba(247, 244, 241, 0.88)),
    var(--bg);
}

.login-card {
  width: min(520px, 100%);
  border: 1px solid rgba(243, 107, 33, 0.18);
  border-radius: 8px;
  padding: 38px 36px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 24px;
}

.login-brand h1 {
  color: var(--text);
  font-size: 24px;
}

.login-brand p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-form button {
  min-height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5822a, #f05a1a);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(243, 107, 33, 0.24);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--charcoal);
  color: #fffaf7;
  padding: 26px 22px;
  box-shadow: 12px 0 34px rgba(37, 32, 30, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.brand-logo {
  display: block;
  width: 70px;
  height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

.sidebar-logo {
  width: 58px;
  height: 42px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.brand p {
  margin: 5px 0 0;
  color: #d5c8c0;
  font-size: 13px;
}

.nav-tabs {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.internal-projects-layout {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.internal-projects-sidebar,
.internal-projects-detail {
  min-width: 0;
  padding: 22px;
}

.internal-project-form textarea,
.internal-project-item-form textarea {
  min-height: 72px;
}

.internal-project-form {
  margin-top: 14px;
  border-top: 1px solid #ead8cc;
  padding-top: 18px;
}

.internal-project-form-heading h4 {
  margin: 0;
}

.internal-project-form-grid,
.internal-project-item-grid,
.internal-project-handoff-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.internal-project-item-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.internal-project-form-grid label,
.internal-project-item-grid label,
.internal-project-handoff-fields label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #5f5049;
}

.internal-project-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.internal-project-list-card {
  width: 100%;
  border: 1px solid #ecd8ca;
  background: #fffaf7;
  border-radius: 8px;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.internal-project-list-card strong {
  color: #171717;
}

.internal-project-list-card span {
  color: #7f7069;
  font-size: 0.88rem;
}

.internal-project-list-card.active {
  border-color: #ff6a1a;
  box-shadow: inset 4px 0 0 #ff6a1a;
  background: #fff2e9;
}

.internal-project-list-empty {
  display: grid;
  gap: 6px;
  border: 1px dashed #dfcbbf;
  background: #fffaf7;
  border-radius: 8px;
  padding: 18px;
  color: #7a6c65;
}

.internal-project-list-empty strong {
  color: #2b2522;
}

.internal-project-empty-guide {
  min-height: 420px;
  border: 1px dashed #dfcbbf;
  background: #fffaf7;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 14px;
  color: #6f625c;
}

.internal-project-empty-guide strong {
  font-size: 1.25rem;
  color: #171717;
}

.internal-project-empty-guide p {
  margin: 0;
  max-width: 680px;
}

.internal-project-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.internal-project-guide-grid span {
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-weight: 800;
  color: #3c312c;
  text-align: center;
}

.internal-project-detail-heading {
  align-items: flex-start;
}

.internal-project-goal {
  border: 1px solid #ead8cc;
  background: #fffaf7;
  border-radius: 8px;
  padding: 12px 14px;
  color: #55463f;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.internal-project-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.internal-project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.internal-project-item-form {
  border: 1px solid #ead8cc;
  border-radius: 8px;
  padding: 14px;
  background: #fffaf7;
  margin-bottom: 16px;
}

.internal-project-item-list {
  display: grid;
  gap: 14px;
}

.internal-project-item-section {
  display: grid;
  gap: 10px;
}

.internal-project-item-section h4 {
  margin: 0;
}

.internal-project-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 12px;
  align-items: start;
  border: 1px solid #ead8cc;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  min-height: 0;
  overflow: visible;
}

.internal-project-item-card.status-progress {
  border-left: 5px solid #ff8a3c;
}

.internal-project-item-card.status-review {
  border-left: 5px solid #d7a33b;
}

.internal-project-item-card.status-done {
  border-left: 5px solid #28a266;
}

.internal-project-item-card.status-hold {
  border-left: 5px solid #9b948f;
}

.internal-project-item-title {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 8px;
  line-height: 1.45;
  min-height: 30px;
}

.internal-project-item-title strong {
  flex: 1 1 240px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.internal-project-item-card p {
  margin: 6px 0 0;
  color: #6f625c;
  line-height: 1.5;
}

.internal-project-options,
.internal-project-handoff {
  background: #f7f3f0;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-wrap;
}

.internal-project-item-card .management-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
}

.internal-project-item-card .management-actions button {
  min-height: 40px;
  white-space: nowrap;
}

.empty-state.compact {
  padding: 16px;
  min-height: auto;
}

@media (max-width: 1120px) {
  .internal-projects-layout,
  .internal-project-stats {
    grid-template-columns: 1fr;
  }

  .internal-project-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #internalProjectsView {
    padding-inline: 14px;
  }

  .internal-projects-sidebar,
  .internal-projects-detail {
    padding: 18px;
  }

  .internal-project-form-grid,
  .internal-project-item-grid,
  .internal-project-handoff-fields,
  .internal-project-item-card {
    grid-template-columns: 1fr;
  }

  .internal-project-item-card .management-actions {
    justify-content: flex-start;
  }

  .internal-project-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.legacy-nav-source {
  display: none !important;
}

.grouped-sidebar-nav {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.sidebar-menu-section {
  display: grid;
  gap: 8px;
}

.sidebar-menu-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8ded0;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.sidebar-menu-section summary::-webkit-details-marker {
  display: none;
}

.sidebar-menu-section summary::after {
  content: "⌄";
  color: #d5c8c0;
  font-size: 14px;
  transition: transform 0.16s ease;
}

.sidebar-menu-section[open] summary::after {
  transform: rotate(180deg);
}

.sidebar-menu-links {
  display: grid;
  gap: 7px;
  padding-left: 8px;
}

.grouped-sidebar-nav .nav-tab {
  padding: 10px 12px;
  font-size: 14px;
}

.session-card {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.session-card span {
  color: #dfd2ca;
  font-size: 13px;
}

.session-card strong {
  font-size: 18px;
}

.session-card button {
  margin-top: 6px;
  border: 1px solid rgba(243, 107, 33, 0.42);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(243, 107, 33, 0.12);
  color: #fff7f2;
}

.nav-tab {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.06);
  color: #edf7f8;
  text-align: left;
  font-weight: 750;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-tab:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
  background: #fff1e8;
  color: #5b250f;
  border-color: #fff1e8;
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.placeholder-panel {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 22px;
  align-content: start;
}

.placeholder-panel h3 {
  font-size: 18px;
}

.placeholder-panel p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.employee-management-panel {
  padding: 16px;
}

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

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inline-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.managed-employee {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.managed-employee.inactive {
  background: #fbf7f4;
}

.managed-employee div:first-child {
  display: grid;
  gap: 4px;
}

.managed-employee span {
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #edf4f2;
  color: #39705f;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}

.status-badge.inactive {
  background: #f0e7e1;
  color: #6d625c;
}

.inactive-note {
  color: var(--muted);
  font-size: 13px;
}

.management-actions {
  display: flex;
  gap: 7px;
}

.management-actions button,
.management-form button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.management-actions button {
  padding: 8px 10px;
  background: #f0e7e1;
  color: #423a36;
}

.management-actions button:last-child {
  background: #fff1e8;
  color: #b42318;
}

.management-form {
  display: grid;
  gap: 10px;
}

.management-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.management-form button {
  min-height: 44px;
  margin-top: 4px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--accent-dark);
  font-size: 13px;
}

.form-message.error {
  color: #b42318;
}

.compact-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.compact-panel label {
  color: #dfd2ca;
  font-size: 13px;
}

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

textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.45;
}

main {
  position: relative;
  padding: 38px 42px 54px;
  background:
    radial-gradient(circle at 88% 0%, rgba(243, 107, 33, 0.08), transparent 26%),
    var(--bg);
}

.view {
  display: none;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.active-view {
  display: block;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding-right: 100px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h2,
h3 {
  margin: 0;
}

h2 {
  font-size: 32px;
  letter-spacing: 0;
}

.date-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.task-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 90px;
  gap: 10px;
  margin-bottom: 14px;
}

.task-entry textarea {
  grid-column: 1 / span 2;
}

.task-entry button {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.task-entry button,
.filter-btn {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.task-entry button:hover,
.filter-btn.active {
  background: var(--accent-dark);
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-btn {
  padding: 9px 13px;
  background: #f0e7e1;
  color: #423a36;
}

.task-panel {
  min-height: 390px;
  padding: 12px;
  margin-bottom: 14px;
}

.notice-panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-left: 7px solid var(--accent);
  background: linear-gradient(135deg, #fff3e9 0%, #fffaf6 62%, #ffffff 100%);
  box-shadow: 0 18px 42px rgba(115, 74, 48, 0.11);
}

.notice-panel .section-heading {
  margin-bottom: 16px;
}

.notice-panel .section-heading h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #241b17;
  font-size: 24px;
  line-height: 1.2;
}

.notice-panel .section-heading h3::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.notice-panel .section-heading span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.11);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.shortcut-panel {
  margin-bottom: 14px;
  padding: 14px;
}

.compact-shortcut-panel {
  padding: 12px 14px;
}

.template-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-toggle-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #241b17;
  font-weight: 800;
}

.template-toggle-btn::after {
  content: "∨";
  margin-left: 8px;
  color: var(--muted);
}

.template-toggle-btn[aria-expanded="true"]::after {
  content: "∧";
}

.quick-task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.small-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(243, 107, 33, 0.22);
  border-radius: 8px;
  background: #fff1e8;
  color: #a94413;
  font-weight: 800;
  white-space: nowrap;
}

.small-action-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.template-collapsible {
  margin-top: 12px;
}

.compact-heading {
  margin-bottom: 10px;
}

.employee-week-panel {
  padding: 14px;
}

.employee-week-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.employee-week-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.employee-week-day.active {
  border-color: rgba(249, 115, 22, 0.58);
  box-shadow: inset 4px 0 0 var(--accent);
}

.employee-week-day.drag-over,
.employee-week-day ul.drag-over {
  border-color: rgba(249, 115, 22, 0.72);
  background: #fff6ee;
  box-shadow: inset 0 0 0 2px rgba(249, 115, 22, 0.18);
}

.employee-week-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: #fffaf7;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.employee-week-day-head strong {
  font-size: 15px;
}

.employee-week-day-head span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.employee-week-day ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  list-style: none;
  min-height: 58px;
  border-radius: 0 0 8px 8px;
}

.employee-week-task {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #f0e4dc;
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.employee-week-task:not(.done):hover {
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 8px 18px rgba(115, 74, 48, 0.08);
  transform: translateY(-1px);
}

.employee-week-task.dragging {
  opacity: 0.48;
  cursor: grabbing;
}

.employee-week-task.done {
  cursor: default;
}

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

.employee-week-task span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.employee-week-task strong {
  overflow-wrap: anywhere;
}

.employee-week-task small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.employee-week-task em,
.empty-week-task {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.empty-week-task {
  padding: 10px;
  border-radius: 8px;
  background: #fbf7f4;
}

.shortcut-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.shortcut-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.shortcut-item:hover {
  border-color: rgba(243, 107, 33, 0.45);
  background: #fffaf7;
}

.shortcut-item span {
  font-weight: 800;
}

.shortcut-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.notice-item {
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 12px;
  padding: 16px 18px 16px 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(115, 74, 48, 0.08);
}

.notice-item::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.notice-item strong {
  display: block;
  margin-bottom: 7px;
  color: #1f1712;
  font-size: 18px;
  line-height: 1.35;
}

.notice-item p {
  margin: 0;
  color: #6f4a38;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.compact-empty {
  padding: 18px 12px;
}

.operations-panel {
  margin-top: 16px;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.secondary-btn {
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #f0e7e1;
  color: #423a36;
  font-weight: 700;
}

.wide-secondary-btn {
  width: 100%;
  min-height: 40px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff1e8;
  color: #a94413;
  font-weight: 800;
}

.wide-secondary-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-grid label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  background: #fff;
  color: var(--text);
}

.weekday-grid input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.task-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

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

.task-check {
  width: 22px;
  height: 22px;
  accent-color: var(--done);
}

.task-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-line,
.task-text {
  min-width: 0;
}

.task-text {
  overflow-wrap: anywhere;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 7px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f1ede9;
  color: #6d625c;
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
}

.priority-badge.high {
  background: #ffe9dc;
  color: #c2410c;
}

.priority-badge.low {
  background: #edf4f2;
  color: #39705f;
}

.task-memo {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.task-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.edit-btn,
.delete-btn {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f0f2f3;
  color: #56636a;
}

.edit-btn {
  background: #fff1e8;
  color: #a94413;
}

.empty-state {
  display: none;
  padding: 56px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.report-actions button {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.settings-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.settings-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff1e8;
  color: #a94413;
  font-weight: 800;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
}

.admin-layout .panel,
.weekly-layout .panel,
.weekly-open-panel {
  padding: 16px;
}

.weekly-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.automation-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 16px;
}

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

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

.section-heading select {
  max-width: 180px;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px;
  gap: 8px;
  margin-bottom: 14px;
}

.carryover-actions {
  margin-bottom: 14px;
}

.carryover-actions .wide-secondary-btn {
  margin-bottom: 0;
}

.weekly-layout .admin-filters {
  grid-template-columns: minmax(180px, 1fr) 150px 150px 150px;
}

.employee-stats {
  display: grid;
  gap: 10px;
}

.today-employee-detail summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.today-employee-detail summary::-webkit-details-marker {
  display: none;
}

.today-employee-detail[open] summary {
  border-bottom: 1px solid var(--line);
  margin: -14px -14px 0;
  padding: 14px;
  background: #fffaf7;
}

.today-employee-detail[open] .weekly-task-groups {
  margin: 0 -14px -14px;
}

.daily-stats {
  display: grid;
  gap: 8px;
}

.daily-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.daily-row summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  list-style: none;
  cursor: pointer;
}

.daily-row summary::-webkit-details-marker {
  display: none;
}

.daily-row[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fffaf7;
}

.daily-row summary div {
  display: grid;
  gap: 4px;
}

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

.daily-row em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.daily-task-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px 12px;
  list-style: none;
}

.daily-task-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0e4dc;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.daily-task-list li.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.daily-task-list li em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.weekly-employee-detail {
  padding: 0;
  overflow: hidden;
}

.weekly-employee-detail summary {
  display: grid;
  gap: 9px;
  padding: 12px;
  list-style: none;
  cursor: pointer;
}

.weekly-employee-detail summary::-webkit-details-marker {
  display: none;
}

.weekly-employee-detail[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fffaf7;
}

.stat-detail em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-task-groups {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #fffdfb;
}

.weekly-task-group {
  display: grid;
  gap: 7px;
}

.weekly-task-group h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.weekly-task-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.weekly-task-group li {
  display: grid;
  gap: 3px;
  border: 1px solid #f0e4dc;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.weekly-task-group li.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.weekly-task-group li.done .priority-badge {
  text-decoration: none;
}

.weekly-task-group li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.weekly-task-group li small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.weekly-task-group .empty-weekly-task {
  color: var(--muted);
  background: #fbf7f4;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-weight: 700;
}

.stat-detail {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecee;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f5822a, #f05a1a);
}

.admin-list .task-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.owner-badge {
  display: inline-flex;
  margin-right: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-strong);
  color: #a94413;
  font-size: 12px;
  font-weight: 700;
}

.edit-dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.edit-dialog::backdrop {
  background: rgba(37, 32, 30, 0.42);
}

.edit-dialog-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.edit-dialog-card label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.edit-dialog-card button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.dialog-close {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f0e7e1;
  color: #423a36;
  font-weight: 700;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  main {
    padding: 76px 16px 28px;
  }

  .summary-grid,
  .admin-layout,
  .weekly-layout {
    grid-template-columns: 1fr;
  }

  .automation-layout {
    grid-template-columns: 1fr;
  }

  .admin-filters,
  .weekly-layout .admin-filters {
    grid-template-columns: 1fr;
  }

  .template-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-task-actions {
    justify-content: stretch;
  }

  .small-action-btn {
    flex: 1 1 140px;
  }
}

@media (max-width: 560px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 0;
  }

  .notification-top-button,
  .message-top-button {
    top: 18px;
  }

  .notification-top-button {
    right: 16px;
  }

  .message-top-button {
    right: 68px;
  }

  h2 {
    font-size: 25px;
  }

  .task-entry {
    grid-template-columns: 1fr;
  }

  .task-entry select,
  .task-entry textarea,
  .task-entry button {
    grid-column: 1;
    grid-row: auto;
  }

  .task-entry button {
    min-height: 44px;
  }

  .task-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .task-meta,
  .edit-btn,
  .delete-btn {
    grid-column: 2;
    justify-self: start;
  }

  .managed-employee {
    grid-template-columns: 1fr;
  }

  .management-actions {
    flex-wrap: wrap;
  }
}
/* Calendar extension */
.calendar-month-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.calendar-month-controls button,
.calendar-side-panel .form-actions button,
.calendar-event-card button {
  min-height: 40px;
}

.calendar-month-controls button {
  min-width: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.calendar-month-controls button:hover {
  background: var(--accent-strong);
}

.calendar-month-controls strong {
  min-width: 92px;
  text-align: center;
  font-size: 15px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.35fr) minmax(430px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.calendar-main-panel,
.calendar-side-panel {
  min-height: 0;
}

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

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

.calendar-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.calendar-cell:not(.muted) {
  cursor: pointer;
}

.calendar-cell:not(.muted):hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(242, 101, 34, 0.12);
}

.calendar-cell.muted {
  background: transparent;
  border-color: transparent;
}

.calendar-day {
  font-weight: 800;
}

.calendar-dot-list {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.calendar-dot-list em,
.calendar-manual-chip em,
.calendar-project-chip em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-manual-chip {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #fff7ed;
  color: #4a352b;
  font-weight: 800;
}

.calendar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 999px;
}

.calendar-dot.personal,
.calendar-type-badge.personal {
  background: #3b82f6;
}

.calendar-dot.design,
.calendar-type-badge.design {
  background: var(--accent);
}

.calendar-dot.consulting,
.calendar-type-badge.consulting {
  background: #16a34a;
}

.calendar-project-chip {
  display: block;
  min-width: 0;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.calendar-side-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.calendar-side-toolbar button {
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.calendar-side-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-event-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.calendar-event-card {
  align-items: flex-start;
  gap: 12px;
}

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

.calendar-event-card strong {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  line-height: 1.35;
}

.calendar-event-card strong > span:last-child,
.calendar-event-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-card div > span:not(.calendar-type-badge) {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.calendar-event-card div > span:last-child:not(.calendar-type-badge) {
  max-height: 42px;
  overflow: hidden;
}

.calendar-form-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.calendar-project-chip.design {
  background: #f97316;
}

.calendar-type-badge.personal,
.calendar-type-badge.design,
.calendar-type-badge.consulting {
  color: #fff;
}

.calendar-project-chip.consulting {
  background: #16a34a;
}

.calendar-project-chip.project-start {
  background: #2563eb;
}

.calendar-project-chip.project-due {
  background: #dc2626;
}

.calendar-list-heading {
  margin-top: 22px;
}

.calendar-type-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.calendar-event-card.personal {
  border-color: rgba(59, 130, 246, 0.28);
}

.calendar-event-card.design {
  border-color: rgba(242, 101, 34, 0.34);
}

.calendar-event-card.consulting {
  border-color: rgba(22, 163, 74, 0.28);
}

.calendar-project-note {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-select-label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-width: 180px;
  color: var(--muted);
  font-size: 12px;
}

.team-select-label select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

@media (max-width: 1100px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .calendar-grid {
    gap: 4px;
  }

  .calendar-cell {
    min-height: 84px;
    padding: 8px;
  }

  .calendar-dot-list em {
    display: none;
  }
}
/* Operations project center */
.operations-summary-grid {
  margin-bottom: 16px;
}

.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.calendar-side-panel,
.operations-form-panel {
  padding: 22px;
}

.calendar-side-panel .management-form,
.operations-form-panel .management-form {
  gap: 12px;
}

.calendar-side-panel input,
.calendar-side-panel select,
.calendar-side-panel textarea,
.operations-form-panel input,
.operations-form-panel select,
.operations-form-panel textarea {
  min-height: 46px;
}

.calendar-side-panel textarea,
.operations-form-panel textarea {
  min-height: 96px;
  resize: vertical;
}

.calendar-side-panel .form-actions,
.operations-form-panel .form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 8px;
}

.calendar-side-panel .form-actions button,
.operations-form-panel .form-actions button {
  min-width: 92px;
  padding-inline: 18px;
  white-space: nowrap;
}

.operations-list-panel,
.calendar-main-panel {
  padding: 22px;
}

.operations-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.operations-filters select,
.operation-two-col select,
.operation-two-col input {
  min-height: 42px;
}

.operation-category-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

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

.operation-category-card strong,
.operation-category-card span {
  display: block;
}

.operation-category-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.attendance-open-btn {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid rgba(249, 115, 22, 0.26);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.attendance-open-btn:hover {
  border-color: rgba(249, 115, 22, 0.44);
  background: #ffedd5;
}

.operation-project-list {
  display: grid;
  gap: 12px;
}

.operation-project-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.operation-project-card.progress {
  border-left-color: var(--accent);
}

.operation-project-card.review {
  border-left-color: #f59e0b;
}

.operation-project-card.done {
  border-left-color: #16a34a;
}

.operation-project-card.hold {
  border-left-color: #64748b;
}

.operation-project-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.operation-project-head h3 {
  margin: 6px 0 4px;
  font-size: 20px;
}

.operation-project-head p,
.operation-memo,
.operation-log p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.operation-project-head > strong {
  font-size: 24px;
}

.operation-category-label {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.operation-progress {
  margin: 12px 0;
}

.operation-memo {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fff8f3;
}

.operation-checklist {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.operation-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operation-checklist input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.operation-checklist label span {
  min-width: 0;
  line-height: 1.45;
  word-break: keep-all;
}

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

.operation-empty-checklist {
  color: var(--muted);
  font-size: 13px;
}

.operation-log {
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.operation-log summary {
  cursor: pointer;
  font-weight: 800;
}

.operation-log small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.operation-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.operation-two-col label {
  display: grid;
  gap: 7px;
}

.attendance-panel {
  padding: 18px 20px;
  margin-bottom: 16px;
}

.attendance-panel-heading {
  margin-bottom: 14px;
}

.attendance-panel-heading > div {
  display: grid;
  gap: 4px;
}

.attendance-panel-toggle {
  min-height: 34px;
  padding: 0 14px;
}

.attendance-panel-body.hidden {
  display: none;
}

.attendance-panel-body {
  animation: softExpand 0.16s ease-out;
}

@keyframes softExpand {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.attendance-today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 14px;
  align-items: stretch;
}

.attendance-today-grid > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attendance-today-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.attendance-today-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.attendance-today-grid button {
  min-width: 92px;
  min-height: 64px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.attendance-today-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.admin-attendance-panel {
  margin-bottom: 18px;
}

.attendance-close-btn {
  min-height: 34px;
  padding: 0 12px;
}

.attendance-filters {
  display: grid;
  grid-template-columns: 180px minmax(180px, 260px) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.attendance-filters input,
.attendance-filters select,
.attendance-filters button {
  min-height: 42px;
}

.attendance-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.attendance-summary span {
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.attendance-table-wrap {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.attendance-table th,
.attendance-table td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.attendance-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff8f3;
  color: var(--text);
}

.attendance-table tr.warning {
  background: #fff7ed;
}

.attendance-table input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
}

.attendance-table button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-weight: 900;
  cursor: pointer;
}

/* Board center */
.board-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.board-directory-panel {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.board-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.board-directory-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.board-directory-card.active {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.board-directory-card > button {
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.board-directory-card strong,
.board-directory-card span {
  display: block;
}

.board-directory-card strong {
  font-size: 16px;
}

.board-directory-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.add-board-card {
  background: #fff7ed;
}

.board-directory-actions {
  display: flex;
  gap: 6px;
}

.board-directory-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.board-manage-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr) auto auto;
  gap: 8px;
  margin-top: 14px;
}

.board-manage-form input,
.board-manage-form button {
  min-height: 42px;
}

.board-manage-form button[type="submit"] {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.board-list-panel,
.board-form-panel {
  padding: 22px 24px;
}

.board-form-panel {
  border-top: 4px solid var(--accent);
}

.primary-small-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.primary-small-btn:hover {
  background: var(--accent-strong);
}

.board-form-panel .management-form {
  gap: 13px;
}

.board-form-panel .board-field-group,
.board-form-panel .operation-two-col {
  max-width: 980px;
}

.board-form-panel #boardPostTitle,
.board-form-panel #boardPostLink {
  max-width: 980px;
}

.board-form-panel #boardPostContent {
  min-height: 420px;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.65;
  background: #fff;
}

.board-form-panel .form-actions {
  max-width: 980px;
}

.board-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 150px 170px;
  gap: 10px;
  margin-bottom: 12px;
}

.board-filters input,
.board-filters select {
  min-height: 42px;
}

.board-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.board-summary span {
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.board-post-list {
  display: grid;
  gap: 12px;
}

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

.board-post-card.pinned {
  border-left: 5px solid var(--accent);
}

.board-post-card.performance {
  border-left: 5px solid #334155;
}

.board-post-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.board-post-head h3 {
  margin: 7px 0 4px;
  font-size: 19px;
}

.board-post-head p,
.board-post-card small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.board-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.board-post-content {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #fffaf7;
  color: #5f4b40;
  line-height: 1.55;
  white-space: pre-wrap;
}

.board-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.performance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.performance-meta span,
.performance-meta strong {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 13px;
}

.board-actions {
  display: flex;
  gap: 6px;
}

.board-field-group {
  display: grid;
  gap: 8px;
}

.board-pin-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  justify-self: start;
  min-height: 32px;
  margin: 4px 0 6px;
  font-weight: 800;
}

.board-pin-label input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.notification-top-button,
.message-top-button {
  position: fixed;
  top: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(49, 36, 30, 0.13);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.notification-top-button {
  right: 32px;
}

.message-top-button {
  right: 84px;
}

.notification-top-button:hover,
.message-top-button:hover {
  border-color: rgba(249, 115, 22, 0.42);
  color: var(--accent-strong);
}

.notification-top-button svg,
.message-top-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot,
.message-dot {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
}

.notification-panel {
  padding: 22px 24px;
}

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

.notification-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notification-item.unread {
  border-left: 5px solid var(--accent);
  background: #fffaf7;
}

.notification-item h3 {
  margin: 6px 0 4px;
  font-size: 17px;
}

.notification-item p {
  margin: 0 0 7px;
  color: #5f4b40;
  line-height: 1.45;
}

.notification-item small {
  color: var(--muted);
}

.notification-item > strong {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.notification-kind {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.message-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.message-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.message-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.message-panel {
  padding: 22px 24px;
}

.message-body-input {
  min-height: 260px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.6;
}

.message-attachment-input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-attachment-hint {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

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

.message-card.unread {
  border-left: 5px solid var(--accent);
  background: #fffaf7;
}

.message-card summary {
  cursor: pointer;
  list-style: none;
}

.message-card summary::-webkit-details-marker {
  display: none;
}

.message-card span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.message-card h3 {
  margin: 8px 0 4px;
  font-size: 17px;
}

.message-card p,
.message-card small {
  margin: 0;
  color: var(--muted);
}

.message-card-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.message-card-body pre {
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  color: #43352f;
  font-family: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-attachment-box {
  display: grid;
  gap: 6px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
}

.message-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.message-attachment-link:hover {
  text-decoration: underline;
}

.message-attachment-link span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
}

.mail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.mail-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.mail-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.mail-inbox-panel,
.mail-compose-panel,
.mail-history-panel {
  padding: 22px 24px;
}

.mail-compose-panel textarea {
  min-height: 360px;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.65;
}

.inbox-email-list,
.sent-email-list {
  display: grid;
  gap: 10px;
}

.inbox-email-card,
.sent-email-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inbox-email-card.unseen {
  border-left: 5px solid var(--accent);
}

.inbox-email-card summary {
  cursor: pointer;
  list-style: none;
}

.inbox-email-card summary::-webkit-details-marker {
  display: none;
}

.sent-email-card.failed {
  border-left: 5px solid #ef4444;
}

.inbox-email-card span,
.sent-email-card span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.inbox-email-card h3,
.sent-email-card h3 {
  margin: 8px 0 4px;
  font-size: 17px;
}

.inbox-email-card p,
.inbox-email-card small,
.sent-email-card p,
.sent-email-card small {
  margin: 0;
  color: var(--muted);
}

.inbox-email-body {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inbox-email-body pre {
  max-height: 380px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: #fffaf7;
  color: #43352f;
  font-family: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.sent-email-card strong {
  display: block;
  margin-top: 8px;
  color: #dc2626;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .operations-layout {
    grid-template-columns: 1fr;
  }
  .board-layout {
    grid-template-columns: 1fr;
  }
  .board-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .operations-filters,
  .operation-category-summary,
  .operation-two-col,
  .attendance-today-grid,
  .attendance-filters,
  .board-filters,
  .board-directory,
  .board-manage-form,
  .mail-layout {
    grid-template-columns: 1fr;
  }
}

/* External project center */
.external-summary-grid {
  margin-bottom: 16px;
}

.external-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.external-list-panel,
.external-form-panel {
  padding: 22px;
}

.external-form-panel {
  max-width: 980px;
}

.external-toggle-form {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.external-toggle-form:hover {
  background: var(--accent-strong);
}

.external-form-panel .management-form {
  gap: 12px;
}

.external-form-panel input,
.external-form-panel select,
.external-form-panel textarea {
  min-height: 46px;
}

.external-form-panel textarea {
  min-height: 92px;
  resize: vertical;
}

.external-form-panel .form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 8px;
}

.external-form-panel .form-actions button {
  min-width: 92px;
  padding-inline: 18px;
  white-space: nowrap;
}

.external-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.external-type-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.external-type-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.external-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.external-filters select,
.external-two-col select,
.external-two-col input {
  min-height: 42px;
}

.external-stage-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.external-stage-add input {
  min-height: 42px;
}

.external-stage-add button {
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
}

.external-status-manager {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf6;
}

.external-status-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.external-status-manager-head strong {
  font-size: 15px;
}

.external-status-manager-head span {
  color: var(--muted);
  font-size: 13px;
}

.external-status-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.external-status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.external-status-item span {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}

.external-status-item div {
  display: flex;
  gap: 5px;
}

.external-status-item button {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.external-status-item button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.external-project-list {
  display: grid;
  gap: 12px;
}

.external-project-card {
  position: relative;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.external-project-card.design {
  border-left-color: var(--accent);
}

.external-project-card.consulting {
  border-left-color: #2563eb;
}

.external-project-card.overdue {
  border-left-color: #dc2626;
}

.external-project-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.external-project-head > div:first-child {
  min-width: 0;
}

.external-project-head h3 {
  margin: 6px 0 3px;
  overflow: hidden;
  font-size: 21px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-project-head p,
.external-memo {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.external-card-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.external-card-side > strong {
  font-size: 24px;
  color: var(--accent-strong);
}

.external-card-side > strong.danger {
  color: #dc2626;
}

.external-card-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.external-project-card:hover .external-card-actions,
.external-project-card:focus-within .external-card-actions {
  opacity: 1;
}

.external-card-actions button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.external-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.external-badges span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.external-metrics {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  margin: 10px 0;
}

.external-metric-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 15px;
}

.external-metric-label strong {
  color: var(--text);
}

.external-progress {
  height: 9px;
}

.external-timeline {
  position: relative;
  height: 9px;
  overflow: visible;
  border-radius: 999px;
  background: #e8edf0;
}

.external-timeline span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.external-timeline i {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%);
}

.external-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.external-meta-grid span {
  padding: 6px 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.external-memo {
  margin-bottom: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff8f3;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.external-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.external-checklist-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.external-checklist-tools button {
  min-height: 42px;
  font-weight: 800;
}

.external-project-card .operation-checklist {
  gap: 9px;
  margin: 12px 0 0;
}

.external-checklist-detail {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.external-checklist-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 900;
}

.external-checklist-detail summary::-webkit-details-marker {
  display: none;
}

.external-checklist-detail summary::before {
  content: "펼치기";
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 13px;
}

.external-checklist-detail[open] summary::before {
  content: "접기";
}

.external-checklist-detail summary strong {
  color: var(--accent-strong);
}

.external-checklist-detail .operation-checklist {
  padding: 0 12px 12px;
}

.external-project-card .operation-checklist label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 17px;
}

.external-project-card .operation-log summary {
  font-size: 16px;
}

.external-project-card .management-actions button {
  font-size: 16px;
  font-weight: 800;
}

.external-project-card .operation-checklist input[type="checkbox"] {
  justify-self: center;
}

.external-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.external-two-col label {
  display: grid;
  gap: 7px;
}

@media (max-width: 1180px) {
  .external-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .external-filters,
  .external-metrics,
  .external-two-col,
  .external-stage-add,
  .external-checklist-tools {
    grid-template-columns: 1fr;
  }
}

/* Customer center */
.customer-summary-grid {
  margin-bottom: 16px;
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.customer-list-panel,
.customer-detail-panel {
  padding: 22px;
}

.customer-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr);
  gap: 10px;
  margin-bottom: 14px;
}

.customer-list,
.program-list {
  display: grid;
  gap: 12px;
}

.customer-card,
.program-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-card.active {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(242, 101, 34, 0.12);
}

.customer-card > button {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.customer-card strong,
.program-card h3 {
  font-size: 20px;
  line-height: 1.35;
}

.customer-card span,
.customer-card small,
.program-card p,
.selected-customer-summary span,
.selected-customer-summary p {
  color: var(--muted);
  font-size: 15px;
}

.customer-card em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--accent-strong);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.customer-card em.danger,
.program-card strong.danger {
  color: #dc2626;
}

.customer-form-heading {
  margin-top: 22px;
}

.customer-form {
  gap: 12px;
}

.customer-form input,
.customer-form select,
.customer-form textarea {
  min-height: 44px;
}

.customer-form textarea {
  min-height: 86px;
}

.customer-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.customer-two-col label {
  display: grid;
  gap: 7px;
}

.customer-form .form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 8px;
}

.selected-customer-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8f3;
}

.selected-customer-summary strong {
  font-size: 20px;
}

.program-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border-left: 5px solid #cbd5e1;
}

.program-card.preparing,
.program-card.watching {
  border-left-color: #f59e0b;
}

.program-card.submitted,
.program-card.done,
.program-card.selected {
  border-left-color: #16a34a;
}

.program-card.rejected,
.program-card.overdue {
  border-left-color: #dc2626;
}

.program-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.program-card-head span,
.program-meta span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.program-card h3 {
  margin: 0 0 6px;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.program-note {
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.program-link {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .customer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .customer-filters,
  .customer-two-col,
  .program-card {
    grid-template-columns: 1fr;
  }
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(460px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.quote-form-panel,
.quote-list-panel {
  min-width: 0;
}

.quote-form-panel {
  padding: 26px;
}

.quote-list-panel {
  padding: 24px;
}

.quote-request-form {
  gap: 12px;
}

.quote-request-form label {
  margin-top: 6px;
}

.quote-request-form input,
.quote-request-form select,
.quote-request-form textarea {
  min-height: 48px;
  padding: 12px 14px;
}

.quote-request-form textarea.quote-details-input {
  min-height: 210px;
}

.quote-inline-grid {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
}

.quote-upload-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.quote-request-list {
  display: grid;
  gap: 14px;
}

.quote-request-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  font-size: 1.02rem;
}

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

.quote-card-head h3 {
  margin: 8px 0 4px;
  font-size: 1.34rem;
}

.quote-card-head p,
.quote-card-head strong {
  color: var(--muted);
}

.quote-card-head strong {
  white-space: nowrap;
  font-size: 1.08rem;
}

.quote-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-badges span,
.quote-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.85rem;
}

.quote-status-badge.status-quoted {
  background: #e7f7ef;
  color: #177245;
}

.quote-status-badge.status-reviewing {
  background: #eef4ff;
  color: #2459a6;
}

.quote-status-badge.status-hold,
.quote-status-badge.status-cancelled {
  background: #f1ece8;
  color: #72584b;
}

.quote-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.quote-estimate-box {
  border: 1px solid #ffb389;
  border-left: 6px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff7ef 0%, #fffdfb 100%);
  padding: 18px 20px;
  margin: 18px 0 14px;
  box-shadow: 0 14px 28px rgba(244, 101, 36, 0.08);
}

.quote-estimate-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 900;
}

.quote-estimate-box strong {
  display: block;
  color: #111827;
  font-size: 1.7rem;
  line-height: 1.25;
}

.quote-estimate-box p {
  margin: 12px 0 0;
  color: #3f342e;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
}

.quote-meta-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf7;
}

.quote-meta-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.quote-meta-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  font-size: 1.04rem;
}

.quote-details-box {
  border-radius: 8px;
  background: #fff8f2;
  padding: 12px;
  margin-bottom: 12px;
}

.quote-details-box strong {
  display: block;
  margin-bottom: 8px;
}

.quote-details-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 1.03rem;
  line-height: 1.6;
}

.quote-attachment-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.quote-attachment-box a {
  color: var(--accent-dark);
  font-weight: 800;
}

.quote-attachment-box small {
  color: var(--muted);
}

.quote-admin-controls {
  display: grid;
  gap: 10px;
}

.quote-admin-label {
  margin: 2px 0 -4px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.quote-admin-controls input,
.quote-admin-controls select,
.quote-admin-controls textarea {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.quote-admin-controls textarea {
  min-height: 92px;
}

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

.quote-employee-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.quote-employee-footer p {
  margin: 0;
  color: var(--muted);
}

.danger-btn {
  color: #c53916 !important;
}

@media (max-width: 1180px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .quote-inline-grid,
  .quote-meta-grid {
    grid-template-columns: 1fr;
  }
}

.attendance-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.attendance-breakdown span,
.attendance-breakdown strong,
.attendance-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255, 246, 239, 0.7);
  color: var(--text);
  font-size: 13px;
}

.attendance-breakdown strong {
  border-color: rgba(255, 102, 31, 0.35);
  color: var(--accent-dark);
}

.attendance-request-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.attendance-request-form.hidden {
  display: none;
}

.attendance-request-toggle {
  margin-top: 14px;
}

.attendance-request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-request-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.attendance-request-form textarea,
.attendance-request-card textarea {
  min-height: 72px;
  resize: vertical;
}

.compact-heading {
  margin-bottom: 8px;
}

.attendance-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.attendance-subpanel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.work-schedule-list,
.attendance-request-list {
  display: grid;
  gap: 10px;
}

.work-schedule-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) repeat(4, minmax(78px, 0.85fr)) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.work-schedule-row strong {
  font-size: 14px;
}

.attendance-request-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attendance-request-card span,
.attendance-request-card small {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 102, 31, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.attendance-request-card strong {
  display: block;
  margin-top: 6px;
}

.attendance-request-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.attendance-request-card em {
  color: var(--muted);
  font-size: 13px;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.attendance-table td small {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.attendance-table select {
  min-width: 86px;
}

@media (max-width: 980px) {
  .attendance-request-grid,
  .attendance-admin-grid {
    grid-template-columns: 1fr;
  }

  .work-schedule-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Internal project cards: keep this near the end so shared button/card rules cannot clip the content. */
#internalProjectsView .internal-project-item-list,
#internalProjectsView .internal-project-item-section {
  overflow: visible;
}

#internalProjectsView .internal-project-item-section {
  gap: 16px;
}

#internalProjectsView .internal-project-item-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  border: 1px solid #ead8cc !important;
  border-radius: 8px !important;
  background: #fff !important;
  height: auto !important;
  min-height: 96px;
  max-height: none !important;
  overflow: visible !important;
  padding: 18px 20px !important;
  line-height: 1.55;
}

#internalProjectsView .internal-project-item-card > div:first-child {
  min-width: 0;
  overflow: visible;
}

#internalProjectsView .internal-project-item-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: start;
  min-height: 0;
  margin: 0 0 10px;
  line-height: 1.55;
  overflow: visible;
}

#internalProjectsView .internal-project-item-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fffaf7;
  color: #6f4936;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

#internalProjectsView .internal-project-item-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #f36b21;
}

#internalProjectsView .internal-project-item-title strong {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

#internalProjectsView .internal-project-item-title .priority-badge,
#internalProjectsView .internal-project-item-title .status-badge {
  align-self: start;
  line-height: 1.2;
}

#internalProjectsView .internal-project-item-card.status-done {
  background: #fbf8f5 !important;
}

#internalProjectsView .internal-project-item-card.status-done .internal-project-item-title strong {
  color: #6f625c;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

#internalProjectsView .internal-project-completion-log,
#internalProjectsView .internal-project-followup-list,
#internalProjectsView .internal-project-parent-note {
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fffaf7;
  padding: 10px 12px;
  margin-top: 10px;
}

#internalProjectsView .internal-project-parent-details {
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fffaf7;
  margin-top: 10px;
  overflow: hidden;
}

#internalProjectsView .internal-project-parent-details summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  cursor: pointer;
  padding: 10px 12px;
  color: #5f5049;
  font-weight: 800;
}

#internalProjectsView .internal-project-parent-details summary span {
  color: #b44b18;
}

#internalProjectsView .internal-project-parent-details summary strong {
  min-width: 0;
  color: #2b2522;
  overflow-wrap: anywhere;
}

#internalProjectsView .internal-project-parent-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

#internalProjectsView .internal-project-parent-body p {
  margin: 0;
}

#internalProjectsView .internal-project-parent-body button {
  width: fit-content;
}

#internalProjectsView .internal-project-parent-completion {
  border-left: 3px solid #f36b21;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}

#internalProjectsView .internal-project-parent-completion strong {
  display: block;
  margin-bottom: 4px;
}

#internalProjectsView .internal-project-card-focus {
  animation: internal-project-card-focus 1.8s ease;
}

@keyframes internal-project-card-focus {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 107, 33, 0.55);
    border-color: #f36b21;
  }
  45% {
    box-shadow: 0 0 0 8px rgba(243, 107, 33, 0.16);
    border-color: #f36b21;
  }
  100% {
    box-shadow: none;
  }
}

#internalProjectsView .internal-project-completion-log strong,
#internalProjectsView .internal-project-followup-list strong {
  display: block;
  margin-bottom: 5px;
  color: #3b2f2a;
}

#internalProjectsView .internal-project-followup-list {
  display: grid;
  gap: 5px;
}

#internalProjectsView .internal-project-followup-list span {
  display: block;
  color: #6f625c;
}

#internalProjectsView .internal-project-item-card p {
  margin-top: 7px;
  line-height: 1.55;
}

#internalProjectsView .internal-project-item-card .management-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
}

#internalProjectsView .internal-project-item-card .management-actions button {
  height: auto;
  min-height: 42px;
  padding-top: 9px;
  padding-bottom: 9px;
  white-space: nowrap;
}

.internal-project-completion-form {
  max-width: 640px;
}

.internal-project-completion-title {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fffaf7;
  font-weight: 800;
}

.internal-project-followup-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-weight: 800;
}

.internal-project-followup-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #f36b21;
}

.internal-project-followup-fields {
  display: grid;
  gap: 10px;
  border: 1px solid #ead8cc;
  border-radius: 8px;
  background: #fffaf7;
  padding: 12px;
}

.internal-project-followup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.internal-project-followup-grid label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .internal-project-followup-grid {
    grid-template-columns: 1fr;
  }
}
