:root {
  --bg: #05070a;
  --panel: #ffffff;
  --ink: #102235;
  --muted: #60758a;
  --line: #c9d9e8;
  --accent: #1e6fae;
  --accent-dark: #124c7d;
  --accent-soft: #e3f0fb;
  --row-red: #805052;
  --row-blue: #3d6694;
  --row-green: #3f7356;
  --row-gray: #141820;
  --tag-red: #b8787d;
  --tag-blue: #7da9d6;
  --tag-green: #7fbc98;
  --tag-gray: #2d3540;
  --tag-brown: #6f9cc4;
  --shadow: 0 20px 50px rgba(16, 34, 53, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(24, 72, 112, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(5, 7, 10, 0.98), rgba(10, 15, 22, 0.96)),
    var(--bg);
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

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

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

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 420px);
  padding: 38px;
  background: var(--panel);
  border: 1px solid rgba(217, 224, 231, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin-bottom: 28px;
  color: var(--ink);
  text-align: center;
}

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

.topbar .eyebrow,
.topbar h1,
.brand-home {
  color: #fff;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: 0;
}

.login-copy {
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.55;
}

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

label {
  color: #40505f;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 38px;
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

#postContent {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 95, 143, 0.14);
}

.login-form button,
.primary-button,
.ghost-button,
.post-form button,
.work-form button,
.schedule-form button,
.memo-form button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.login-form button {
  margin-top: 8px;
  color: #fff;
  background: var(--accent);
}

.login-form button:hover {
  background: var(--accent-dark);
}

.login-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: #b9322b;
  font-size: 13px;
}

.board-view {
  min-height: 100vh;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
  max-width: 1280px;
}

.brand-home {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.brand-home:hover {
  color: #d8e9fb;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  max-width: 1520px;
  margin: 0 auto;
}

.workspace-main {
  min-width: 0;
}

.side-menu {
  align-self: start;
  overflow: hidden;
  background: #0f2e4a;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.menu-title {
  padding: 12px 14px;
  color: #f3f6f9;
  background: #0b253d;
  border-bottom: 1px solid #245d8c;
  font-size: 14px;
  font-weight: 800;
}

.menu-group + .menu-group {
  border-top: 1px solid #245d8c;
}

.menu-item {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  color: #d8dee6;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
  color: #fff;
  background: #1e6fae;
}

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

.login-badge {
  color: #8a94a3;
  font-size: 14px;
  white-space: nowrap;
}

.board-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto 10px;
}

.board-actions.hidden {
  display: none;
}

.ghost-button {
  padding: 0 14px;
  color: var(--accent);
  background: var(--accent-soft);
}

.primary-button {
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.danger-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: #9f4f5a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.danger-button:hover {
  background: #b75d68;
}

.controls,
.post-panel,
.table-wrap,
.detail-panel {
  max-width: 1280px;
  margin-inline: auto;
}

.view-heading {
  max-width: 1280px;
  margin: 0 auto 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px 180px;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: #0e2b45;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.issue-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 12px;
  background: #0e2b45;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.issue-controls label {
  color: #d8e8f7;
}

.issue-controls input,
.issue-controls select {
  border-color: #3a78ad;
  background: #153d60;
  color: #f4f9fd;
  font-size: 15px;
}

.issue-controls input::placeholder {
  color: #a8c3da;
}

.issue-controls input:focus,
.issue-controls select:focus {
  border-color: #85b9e6;
  box-shadow: 0 0 0 3px rgba(133, 185, 230, 0.18);
}

.controls label {
  color: #d8e8f7;
}

.controls input,
.controls select {
  border-color: #3a78ad;
  background: #153d60;
  color: #f4f9fd;
  font-size: 15px;
}

.controls input::placeholder {
  color: #a8c3da;
}

.controls input:focus,
.controls select:focus {
  border-color: #85b9e6;
  box-shadow: 0 0 0 3px rgba(133, 185, 230, 0.18);
}

.search-field {
  min-width: 0;
}

.post-panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.post-form {
  display: grid;
  grid-template-columns: 180px 190px 180px minmax(220px, 1fr);
  gap: 12px;
  align-items: start;
}

.time-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-controls select {
  min-width: 0;
}

.post-form input[readonly] {
  color: var(--muted);
  background: #f2f7fb;
}

.wide-field {
  grid-column: 1 / -1;
}

.participants-field {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.content-style-controls {
  display: grid;
  grid-template-columns: 160px 70px 120px;
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.content-style-controls input[type="color"] {
  min-height: 38px;
  padding: 4px;
}

.format-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  background: #eef4f9;
  font-weight: 900;
  cursor: pointer;
}

.tool-label {
  display: block;
  margin-bottom: 6px;
  color: #40505f;
  font-size: 13px;
  font-weight: 700;
}

.format-button:hover {
  background: #dceaf4;
}

.participants-field legend {
  padding: 0 6px;
  color: #40505f;
  font-size: 13px;
  font-weight: 700;
}

.participant-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
  cursor: pointer;
}

.participant-choice input {
  width: 16px;
  min-height: 16px;
}

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

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

.post-form button,
.work-form button,
.memo-form button {
  min-width: 100px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
}

.post-form button:hover,
.work-form button:hover,
.schedule-form button:hover,
.memo-form button:hover {
  background: var(--accent-dark);
}

.post-form .secondary-button,
.work-form .secondary-button,
.schedule-form .secondary-button,
.memo-form .secondary-button {
  color: var(--accent);
  background: #e7eef5;
}

.post-form .secondary-button:hover,
.work-form .secondary-button:hover,
.schedule-form .secondary-button:hover,
.memo-form .secondary-button:hover {
  background: #d6e3ef;
}

.work-dashboard {
  display: grid;
  gap: 18px;
  min-height: 360px;
  max-width: 1280px;
  margin: 0 auto;
}

.dashboard-status-section {
  padding: 16px;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  background: #080c12;
  box-shadow: var(--shadow);
}

.dashboard-status-section h2 {
  margin: 0 0 12px;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.dashboard-work-card {
  min-height: 150px;
  padding: 14px;
  color: #f4f9fd;
  background: #171f29;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.dashboard-work-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.dashboard-title-button {
  display: inline;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-title-button:hover {
  text-decoration: underline;
}

.dashboard-meta {
  margin: 7px 0 0;
  color: #c7d4df;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.dashboard-meta.category {
  display: inline-flex;
  width: fit-content;
  border-radius: 4px;
  padding: 3px 8px;
  color: #fff;
  background: #7652a8;
}

.dashboard-meta.category.red {
  background: #b6575d;
}

.dashboard-meta.category.green {
  background: #3f8a62;
}

.dashboard-meta.category.blue {
  background: #3f76b5;
}

.dashboard-meta.category.yellow {
  background: #9a7a2e;
}

.dashboard-meta.category.purple {
  background: #7652a8;
}

.dashboard-meta.period {
  color: #e1edf7;
}

.dashboard-empty {
  margin: 0;
  padding: 12px;
  color: #8a94a3;
  font-size: 13px;
  font-weight: 700;
}

.work-form-panel,
.work-list,
.schedule-form-panel,
.schedule-list,
.memo-form-panel,
.memo-list {
  max-width: 1280px;
  margin-inline: auto;
}

.work-form,
.schedule-form,
.memo-form {
  display: grid;
  grid-template-columns: 160px 220px 160px 180px;
  gap: 12px;
  align-items: start;
  padding: 18px;
  margin-bottom: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.work-form-panel h2,
.schedule-form-panel h2,
.memo-form-panel h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
}

.work-form label,
.schedule-form label,
.memo-form label {
  color: #40505f;
}

.work-form input,
.work-form select,
.schedule-form input,
.schedule-form select,
.memo-form input,
.memo-form textarea {
  background: #fff;
}

.work-filters {
  display: grid;
  grid-template-columns: 150px 150px 180px 160px 180px;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 12px;
  background: #0e2b45;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.work-filters label {
  color: #d8e8f7;
}

.work-filters input,
.work-filters select {
  border-color: #3a78ad;
  background: #153d60;
  color: #f4f9fd;
  font-size: 15px;
}

.work-filters input:focus,
.work-filters select:focus {
  border-color: #85b9e6;
  box-shadow: 0 0 0 3px rgba(133, 185, 230, 0.18);
}

.work-form .wide-field {
  grid-column: 1 / -1;
}

.schedule-form .wide-field {
  grid-column: 1 / -1;
}

.date-option-control {
  display: grid;
  gap: 8px;
  align-items: start;
}

.date-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #40505f;
  white-space: nowrap;
}

.inline-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  border-radius: 6px;
  padding: 0 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.status-tag.red {
  background: #9f4f5a;
}

.status-tag.yellow {
  background: #8a742f;
}

.status-tag.green {
  background: #3f7356;
}

.status-tag.gray {
  background: #555d66;
}

.status-tag.purple {
  background: #7652a8;
}

.status-tag.blue {
  background: #315f8f;
}

.schedule-category-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 4px;
  padding: 4px 9px;
  color: #fff;
  font-weight: 800;
}

.schedule-category-tag.blue {
  background: #3f76b5;
}

.schedule-category-tag.red {
  background: #b6575d;
}

.schedule-category-tag.green {
  background: #3f8a62;
}

.schedule-category-tag.purple {
  background: #7652a8;
}

.table-wrap {
  position: relative;
  margin-top: 12px;
  overflow-x: auto;
  background: #0e2b45;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: #fff;
  table-layout: fixed;
}

th,
td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0b253d;
  color: #d8dee6;
  font-size: 13px;
  font-weight: 800;
}

td {
  font-size: 14px;
  line-height: 1.45;
}

tbody tr.red {
  background: var(--row-red);
}

tbody tr.blue {
  background: var(--row-blue);
}

tbody tr.green {
  background: var(--row-green);
}

tbody tr.gray {
  background: var(--row-gray);
}

tbody tr.black {
  background: #080c12;
}

tbody tr:hover {
  filter: brightness(1.08);
}

th:first-child,
td:first-child {
  width: 170px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 280px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 280px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 210px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 120px;
}

#boardTable .delete-select-header,
#boardTable .delete-select-cell,
#workTable .work-delete-select-header,
#workTable .delete-select-cell,
#scheduleTable .schedule-delete-select-header,
#scheduleTable .delete-select-cell,
#memoTable .memo-delete-select-header,
#memoTable .delete-select-cell {
  width: 42px;
  padding-inline: 8px;
  text-align: center;
}

#boardTable .date-header,
#boardTable .date-cell {
  width: 180px;
}

#boardTable .title-header,
#boardTable .title-cell {
  width: 170px;
}

#boardTable .topic-header {
  width: auto;
}

#boardTable .type-header,
#boardTable .type-cell {
  width: 190px;
}

#boardTable .author-header,
#boardTable .author-cell {
  width: 110px;
}

#workTable {
  min-width: 900px;
}

#workTable th:nth-child(2),
#workTable td:nth-child(2),
#workTable th:nth-child(3),
#workTable td:nth-child(3) {
  width: 96px;
  white-space: nowrap;
}

#workTable th:nth-child(4),
#workTable td:nth-child(4) {
  width: auto;
}

#workTable th:nth-child(5),
#workTable td:nth-child(5) {
  width: 190px;
}

#workTable th:nth-child(6),
#workTable td:nth-child(6) {
  width: 110px;
}

#workTable th:nth-child(7),
#workTable td:nth-child(7) {
  width: 130px;
  white-space: nowrap;
}

#scheduleTable {
  min-width: 760px;
}

#scheduleTable th:nth-child(2),
#scheduleTable td:nth-child(2) {
  width: 220px;
  white-space: nowrap;
}

#scheduleTable th:nth-child(3),
#scheduleTable td:nth-child(3) {
  width: 120px;
  white-space: nowrap;
}

#scheduleTable th:nth-child(4),
#scheduleTable td:nth-child(4) {
  width: auto;
}

#scheduleTable th:nth-child(5),
#scheduleTable td:nth-child(5) {
  width: 150px;
}

#memoTable {
  min-width: 760px;
}

#memoTable th:nth-child(2),
#memoTable td:nth-child(2) {
  width: auto;
}

#memoTable th:nth-child(3),
#memoTable td:nth-child(3) {
  width: 180px;
}

#memoTable th:nth-child(4),
#memoTable td:nth-child(4) {
  width: 180px;
}

.action-cell {
  display: flex;
  gap: 6px;
}

.small-action-button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.small-action-button.danger {
  background: #9f4f5a;
}

.post-delete-checkbox,
.work-delete-checkbox,
.schedule-delete-checkbox,
.memo-delete-checkbox,
#selectAllPosts,
#selectAllWorkItems,
#selectAllSchedules,
#selectAllMemos {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--accent);
}

.date-cell,
.title-cell {
  font-weight: 800;
}

.title-cell {
  white-space: nowrap;
}

.title-cell .link-button {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-cell {
  text-align: center;
  white-space: nowrap;
}

.date-cell span {
  display: inline;
}

.date-cell span + span {
  margin-left: 5px;
}

.time-part {
  font-size: 0.86em;
  opacity: 0.86;
}

.link-button {
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.link-button:hover,
.link-button:focus {
  text-decoration: underline;
}

.topic-link {
  font-weight: 800;
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.type-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.type-cell .tag {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
}

.type-cell .tag + .tag {
  margin-top: 0;
}

.type-divider {
  display: inline-block;
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

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

.tag.blue {
  background: var(--tag-blue);
}

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

.tag.gray {
  background: var(--tag-gray);
}

.tag.brown {
  background: var(--tag-brown);
}

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

.person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #27313b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.detail-meta .participants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty-state {
  margin: 0;
  padding: 28px;
  color: #d7dee6;
  text-align: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 1280px;
  margin: 12px auto 0;
}

.pagination button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid #255f92;
  border-radius: 6px;
  padding: 0 10px;
  color: #d8e8f7;
  background: #0e2b45;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
  color: #fff;
  background: var(--accent);
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.confirm-card {
  width: min(420px, 100%);
  padding: 22px;
  color: #f4f9fd;
  background: #102a44;
  border: 1px solid #255f92;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.confirm-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.confirm-card p {
  margin: 0 0 18px;
  color: #b9cad8;
  font-size: 14px;
}

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

.password-card {
  width: min(420px, calc(100vw - 32px));
}

.password-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

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

.password-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f223a;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.calendar-panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-panel {
  max-width: 900px;
  margin: 12px auto 0;
}

.admin-card {
  padding: 18px;
  color: #f4f9fd;
  background: #102a44;
  border: 1px solid #255f92;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-card h2 {
  margin: 0;
  font-size: 22px;
}

.admin-help {
  margin: 0 0 16px;
  color: #b9cad8;
  font-size: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid #255f92;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #255f92;
  text-align: left;
}

.admin-table th {
  color: #eaf4fd;
  background: #0b253d;
  font-size: 14px;
}

.admin-table td {
  background: #153d60;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tr.disabled-user-row td {
  color: #7f8a96;
  background: #102b44;
}

.admin-table select {
  width: 160px;
  min-height: 36px;
  border: 1px solid #3a78ad;
  border-radius: 6px;
  padding: 0 10px;
  color: #f4f9fd;
  background: #0e2b45;
}

.issue-panel {
  max-width: 1280px;
  margin: 12px auto 0;
}

.issue-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.issue-table-wrap {
  overflow-x: auto;
  background: #0e2b45;
  border: 1px solid #1f5c8f;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.issue-table {
  min-width: 980px;
}

.issue-table th {
  text-align: center;
}

.issue-table th:first-child,
.issue-table td:first-child {
  width: 72px;
}

.issue-table th:nth-child(2),
.issue-table td:nth-child(2) {
  width: 82px;
}

.issue-table th:nth-child(3),
.issue-table td:nth-child(3) {
  width: 115px;
}

.issue-table th:nth-child(4),
.issue-table td:nth-child(4) {
  width: 520px;
}

.issue-table th:nth-child(5),
.issue-table td:nth-child(5) {
  width: 190px;
}

.issue-table input,
.issue-table select {
  min-height: 34px;
  border-color: #3a78ad;
  background: #0e2b45;
  color: #f4f9fd;
  font-size: 13px;
}

.issue-table input:focus,
.issue-table select:focus {
  border-color: #85b9e6;
  box-shadow: 0 0 0 3px rgba(133, 185, 230, 0.16);
}

.issue-table tbody tr.issue-week-1 td {
  background: #2f6f53;
}

.issue-table tbody tr.issue-week-2 td {
  background: #6b5d28;
}

.issue-table tbody tr.issue-week-3 td {
  background: #315f8f;
}

.issue-table tbody tr.issue-week-4 td {
  background: #805052;
}

.issue-table tbody tr.issue-week-5 td {
  background: #555d66;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-header h2 {
  min-width: 130px;
  margin: 0;
  font-size: 22px;
  text-align: center;
}

.calendar-header .ghost-button {
  width: 42px;
  padding: 0;
  font-size: 24px;
}

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

.calendar-weekdays {
  border: 1px solid #1f5c8f;
  border-bottom: 0;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #0b253d;
}

.calendar-weekdays span {
  padding: 10px;
  color: #d8dee6;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 124px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-day:nth-child(7n + 1) {
  border-left: 1px solid var(--line);
}

.calendar-day.muted {
  background: #eef2f6;
}

.calendar-day-number {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.schedule-calendar-panel .calendar-cell {
  min-height: 124px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.schedule-calendar-panel .calendar-cell:nth-child(7n + 1) {
  border-left: 1px solid var(--line);
}

.schedule-calendar-panel .calendar-cell.muted {
  background: #eef2f6;
}

.schedule-calendar-panel .day-number {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-event {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.calendar-event.red {
  background: #b84f5c;
}

.calendar-event.blue {
  background: var(--row-blue);
}

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

.calendar-event.purple {
  background: #7652a8;
}

.calendar-event.gray {
  background: var(--row-gray);
}

.calendar-event.black {
  background: #080c12;
}

.calendar-event:hover {
  filter: brightness(1.08);
}

.detail-panel {
  margin-top: 12px;
}

.detail-top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-date {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.detail-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.3;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  font-size: 14px;
}

.detail-meta div {
  padding: 12px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.detail-meta dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: inherit;
  font-weight: 800;
}

.detail-meta dd {
  margin: 0;
  font-size: inherit;
  font-weight: 700;
}

.detail-meta .tag,
.detail-meta .person {
  font-size: inherit;
}

.detail-meta .avatar {
  font-size: 11px;
}

.detail-content {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-content h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.work-updates {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.work-updates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.work-updates h3 {
  margin: 0;
  font-size: 16px;
}

.work-update-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 72px;
  gap: 8px;
  margin-bottom: 12px;
}

.work-update-form.hidden {
  display: none;
}

.work-update-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.work-update-table {
  min-width: 520px;
  color: #05070a;
}

.work-update-table th,
.work-update-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.work-update-table th {
  position: static;
  background: #eef4fa;
  color: #05070a;
  font-weight: 900;
}

.work-update-table td {
  background: #fff;
  color: #05070a;
  font-weight: 800;
}

.work-update-table th:first-child,
.work-update-table td:first-child {
  width: 150px;
}

.work-update-table .work-update-actions-header,
.work-update-table .action-cell {
  width: 130px;
  text-align: center;
}

.markdown-body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.7;
}

#memoDetailContent {
  white-space: pre-wrap;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 18px 0 8px;
  line-height: 1.35;
}

.markdown-body p {
  margin: 0;
}

.markdown-body p + p {
  margin-top: 10px;
}

.markdown-body ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2f6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

@media (max-width: 760px) {
  .board-view {
    padding: 18px;
  }

  .topbar,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .side-menu {
    width: 100%;
  }

  .menu-item {
    display: inline-block;
    width: auto;
    padding-right: 24px;
  }

  .controls,
  .issue-controls,
  .post-form,
  .work-form,
  .schedule-form,
  .memo-form,
  .content-style-controls,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 28px;
  }

  .calendar-grid {
    min-width: 760px;
  }

  .calendar-panel {
    overflow-x: auto;
  }
}
