:root {
  --ink: #18212f;
  --muted: #697386;
  --line: #e7ebf0;
  --surface: #ffffff;
  --canvas: #f6f8fb;
  --brand: #3c5ce7;
  --brand-dark: #2945c2;
  --todo: #ef9b20;
  --progress: #4f78e9;
  --completed: #33a474;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

a { color: inherit; }

.app-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(12px);
}

.app-nav-inner {
  display: flex;
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  gap: 4px;
}

.app-nav a {
  padding: 16px 12px 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.app-nav a:hover { color: var(--brand); }

.app-nav a.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.app-page {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.dashboard {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 64px 0 88px;
}

.dashboard-header,
.section-heading,
.summary-card,
.task-row {
  display: flex;
  align-items: center;
}

.dashboard-header {
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.dashboard-subtitle,
.summary-description,
.task-main p { color: var(--muted); }

.dashboard-subtitle { margin-bottom: 0; }

.dashboard-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dashboard-nav a,
.nav-primary {
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-nav a:not(.nav-primary) { color: #566176; }
.dashboard-nav a:not(.nav-primary):hover { background: #e9edf8; }

.nav-primary {
  display: inline-block;
  color: #fff;
  background: var(--brand);
}

.nav-primary:hover { background: var(--brand-dark); }

.dashboard-section + .dashboard-section { margin-top: 48px; }

.section-heading { justify-content: space-between; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 5px; }

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

.summary-card {
  min-height: 176px;
  padding: 28px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(28 42 63 / 3%);
}

.summary-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.summary-value {
  margin-bottom: 6px;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.summary-value span { margin-left: 4px; font-size: 1rem; letter-spacing: -0.02em; }
.summary-description { margin-bottom: 0; font-size: 0.87rem; }

.summary-card-wide {
  grid-column: span 2;
  min-height: 156px;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.task-breakdown {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-breakdown li { color: var(--muted); font-size: 0.88rem; }
.task-breakdown strong { margin-left: 4px; color: var(--ink); }

.website-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.website-breakdown li {
  color: var(--muted);
  font-size: 0.78rem;
}

.website-breakdown strong {
  margin-left: 3px;
  color: var(--ink);
}

.category-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
}

.category-dot.customer { background: #4f78e9; }
.category-dot.business { background: #33a474; }
.category-dot.personal { background: #8b5cc7; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}
.status-dot.todo { background: var(--todo); }
.status-dot.in-progress { background: var(--progress); }
.status-dot.completed { background: var(--completed); }

.recent-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.text-link { color: var(--brand); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.task-list { border-top: 1px solid var(--line); }

.task-row {
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.task-main p { margin-bottom: 0; font-size: 0.86rem; }
.task-main p span { margin: 0 5px; color: #a9b0bb; }

.task-title { font-weight: 750; text-decoration: none; }
.task-title:hover { color: var(--brand); }

.status-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}
.status-todo { color: #9a5a00; background: #fff3dc; }
.status-in_progress { color: #264ab6; background: #e8efff; }
.status-completed { color: #14714b; background: #e0f5eb; }
.deadline-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.deadline-overdue {
  color: #b42318;
  background: #fff1f0;
}

.deadline-soon {
  color: #9a5a00;
  background: #fff3dc;
}

.deadline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.deadline-card {
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-top-width: 4px;
  border-radius: 16px;
}

.deadline-card-overdue {
  border-color: #f2c9c5;
  border-top-color: #d84a3e;
  background: #fffafa;
}

.deadline-card-soon {
  border-color: #f3dfb8;
  border-top-color: #d9911b;
  background: #fffcf5;
}

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

.deadline-card-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.deadline-card-heading span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgb(255 255 255 / 70%);
  font-size: 0.78rem;
  font-weight: 800;
}

.deadline-card .task-row {
  min-height: 64px;
}

.deadline-empty {
  margin: 18px 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .deadline-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state { padding: 40px 0 12px; text-align: center; color: var(--muted); }

.resource-page {
  max-width: 960px;
  margin: 0 auto;
}

.resource-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.resource-header h1 { margin-bottom: 8px; font-size: clamp(1.9rem, 4vw, 2.45rem); }
.resource-header > div > p:last-child { margin-bottom: 0; color: var(--muted); }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(28 42 63 / 3%);
}

.filter-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.filter-field select,
.filter-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid #d8dee8;
  border-radius: 9px;
  outline: none;
  background: var(--surface);
  font: inherit;
}

.filter-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(60 92 231 / 12%); }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .primary-button,
.filter-actions .secondary-button { min-height: 40px; white-space: nowrap; }

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(28 42 63 / 3%);
}

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

.resource-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}

.resource-table th {
  padding: 13px 18px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -6px;
  padding: 6px;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.sort-button:hover { color: var(--brand); }
.sort-button span { color: #a1aab8; font-size: 0.82rem; }
.sort-button:hover span,
.sort-button[data-sort-direction="asc"] span,
.sort-button[data-sort-direction="desc"] span { color: currentColor; }

.resource-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: middle;
}

.resource-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.resource-table tbody tr:hover,
.resource-table tbody tr:focus { outline: none; background: #f4f7ff; }
.resource-table tbody tr:last-child td { border-bottom: 0; }
.resource-table td strong { font-weight: 780; }
.resource-table .cell-muted { color: var(--muted); }
.resource-table .table-action { width: 1%; white-space: nowrap; }
.resource-table .website-url a { display: inline-block; max-width: 190px; overflow: hidden; color: var(--brand); text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }

.resource-card,
.detail-card,
.form-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(28 42 63 / 3%);
}

.resource-card { padding: 24px; }
.detail-card { padding: 28px; }
.form-card { max-width: 680px; padding: 28px; }

.resource-field + .resource-field {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.resource-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.resource-field p { margin-bottom: 0; line-height: 1.55; }
.resource-field p a { color: var(--brand); overflow-wrap: anywhere; }
.resource-field-primary strong { font-size: 1.15rem; letter-spacing: -0.025em; }
.resource-field-notes p { white-space: pre-wrap; }

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.notice {
  margin-bottom: 20px;
  padding: 12px 14px;
  color: #14714b;
  border: 1px solid #b9e7d1;
  border-radius: 10px;
  background: #edfbf3;
  font-size: 0.9rem;
  font-weight: 650;
}

.secondary-button,
.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary-button { color: #fff; background: var(--brand); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { color: #566176; border: 1px solid #d8dee8; background: var(--surface); }
.secondary-button:hover { border-color: #bfc8d6; background: #f8fafc; }
.danger-button { color: #b42318; background: #fff1f0; }
.danger-button:hover { background: #ffe3e0; }

.resource-form { display: grid; gap: 20px; }

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid #d8dee8;
  border-radius: 9px;
  outline: none;
  background: var(--surface);
  font: inherit;
}

.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(60 92 231 / 12%); }

.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.form-errors { padding: 14px 16px; color: #b42318; border: 1px solid #ffc8c3; border-radius: 10px; background: #fff5f4; }
.form-errors h2 { margin-bottom: 8px; font-size: 1rem; }
.form-errors ul { margin: 0; padding-left: 20px; }

.page-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.page-actions .button_to { margin: 0; }

.status-active { color: #14714b; background: #e0f5eb; }
.status-maintenance { color: #9a5a00; background: #fff3dc; }
.status-development { color: #264ab6; background: #e8efff; }
.status-inactive { color: #697386; background: #edf0f3; }

@media (max-width: 680px) {
  .app-nav-inner,
  .app-page { width: min(100% - 28px, 1080px); }
  .app-nav-inner { overflow-x: auto; }
  .dashboard { width: min(100% - 28px, 1080px); padding-top: 36px; }
  .dashboard-header { align-items: flex-start; flex-direction: column; margin-bottom: 40px; }
  .dashboard-nav { width: 100%; overflow-x: auto; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card-wide { grid-column: auto; align-items: flex-start; flex-direction: column; gap: 22px; }
  .task-breakdown { flex-wrap: wrap; gap: 12px; }
  .recent-section { padding: 20px; }
  .task-row { align-items: flex-start; padding: 16px 0; }
  .resource-header { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .resource-grid { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr; }
  .filter-actions { justify-content: flex-end; }
  .resource-table { min-width: 650px; }
  .resource-card,
  .detail-card,
  .form-card { padding: 20px; }
  .page-actions { flex-wrap: wrap; }
}

.category-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.category-customer {
  color: #264ab6;
  background: #e8efff;
}

.category-business {
  color: #14714b;
  background: #e0f5eb;
}

.category-personal {
  color: #7a4bb0;
  background: #f1e8ff;
}

.task-notes-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.task-note-form {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.task-note-form .form-field {
  margin-bottom: 0;
}

.task-note-form .form-actions {
  margin-top: 14px;
}

.task-note-list {
  border-top: 1px solid var(--line);
}

.task-note {
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}

.task-note p {
  margin-bottom: 7px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.task-note time {
  color: var(--muted);
  font-size: 0.78rem;
}

.task-note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-note-meta .button_to {
  margin: 0;
}

.task-note-delete {
  padding: 4px 7px;
  color: #b42318;
  border: 0;
  border-radius: 7px;
  background: #fff1f0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

.task-note-delete:hover {
  background: #ffe3e0;
}

.website-tasks-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.website-tasks-section .task-list {
  margin-top: 4px;
}

.website-tasks-section .task-row {
  min-height: 68px;
}

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

.task-filter-form {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.website-table {
  min-width: 1200px;
}

.app-nav-inner {
  justify-content: space-between;
}

.app-nav-links,
.app-nav-session {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-nav-session {
  gap: 10px;
}

.app-nav-user {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.nav-login,
.nav-logout {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.app-nav .nav-login {
  color: #fff;
  background: var(--brand);
}

.app-nav .nav-login:hover {
  background: var(--brand-dark);
}

.nav-logout {
  color: #566176;
  border: 1px solid #d8dee8;
  background: var(--surface);
  cursor: pointer;
}

.nav-logout:hover {
  border-color: #bfc8d6;
  background: #f8fafc;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 65px);
  place-items: center;
  padding: 48px 20px;
}

.auth-card {
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(28 42 63 / 10%);
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h1 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.auth-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-password-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-password-label a {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-password-label a:hover {
  text-decoration: underline;
}

.auth-submit {
  min-height: 44px;
  margin-top: 4px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:hover {
  background: var(--brand-dark);
}

.auth-alert,
.auth-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 650;
}

.auth-alert {
  color: #b42318;
  border: 1px solid #ffc8c3;
  background: #fff5f4;
}

.auth-notice {
  color: #14714b;
  border: 1px solid #b9e7d1;
  background: #edfbf3;
}

@media (max-width: 680px) {
  .auth-page {
    min-height: calc(100vh - 57px);
    padding: 28px 14px;
  }

  .auth-card {
    padding: 26px 20px;
  }
}

.domain-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.domain-expired {
  color: #b42318;
  background: #fff1f0;
}

.domain-expiring-soon {
  color: #9a5a00;
  background: #fff3dc;
}

.check-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.check-overdue {
  color: #b42318;
  background: #fff1f0;
}

.check-due-today {
  color: #264ab6;
  background: #e8efff;
}

.check-card-today {
  border-color: #c9d8ff;
  border-top-color: #4f78e9;
  background: #f7f9ff;
}

.edit-button,
.new-task-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 9px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.edit-button {
  color: #264ab6;
  background: #e8efff;
}

.edit-button:hover {
  background: #d9e5ff;
}

.new-task-button {
  color: #fff;
  background: #566176;
}

.new-task-button:hover {
  background: #3f4a5c;
}

.task-note-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-note-edit {
  padding: 4px 7px;
  color: #264ab6;
  border-radius: 7px;
  background: #e8efff;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.task-note-edit:hover {
  background: #d9e5ff;
}

.website-filter-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.website-filter-form .filter-actions {
  grid-column: span 3;
  justify-content: flex-end;
}

@media (max-width: 680px) {
  .website-filter-form .filter-actions {
    grid-column: auto;
  }
}

.alert-summary-card {
  border-color: #f1d8d5;
  background: #fffdfd;
}

.alert-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-breakdown li {
  color: var(--muted);
  font-size: 0.88rem;
}

.alert-breakdown strong {
  margin-left: 4px;
  color: var(--ink);
}

.alert-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}

.alert-dot-task { background: #d84a3e; }
.alert-dot-domain { background: #d9911b; }
.alert-dot-check { background: #4f78e9; }

.alert-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.alert-link:hover {
  color: var(--brand);
}

.alert-link:hover strong {
  color: var(--brand);
}

.pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.pagination-nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.pagination-nav a,
.pagination-nav [aria-current="page"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  color: #566176;
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.pagination-nav a:hover {
  color: var(--brand);
  border-color: #bfc8d6;
  background: #f4f7ff;
}

.pagination-nav [aria-current="page"] {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

@media (max-width: 640px) {
  .app-nav-inner {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 16px;
  }

  .app-nav-session {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin-left: 0;
  }

  .app-nav-session form {
    margin: 0;
  }

  .app-nav-user {
    display: none;
  }

  .app-nav-links {
    display: flex;
    flex: 1;
    gap: 2px;
    order: initial;
    overflow-x: auto;
    padding-bottom: 0;
    width: auto;
  }

  .app-nav-links a {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .nav-login,
  .nav-logout {
    min-height: 38px;
    padding: 8px 12px;
  }

  .resource-page .filter-form {
    display: none;
  }
}

.status-memo {
  background: #eef2f7;
  color: #526174;
}

.status-reviewing {
  background: #fff3d6;
  color: #9a6510;
}

.status-planned {
  background: #e5edff;
  color: #365edb;
}

.status-on_hold {
  background: #f2edf8;
  color: #745a91;
}

.idea-detail-card {
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(35, 48, 74, 0.05);
  padding: 24px;
}

.idea-detail-list {
  display: grid;
  gap: 20px;
  margin: 0;
}

.idea-detail-list > div {
  display: grid;
  gap: 6px;
}

.idea-detail-list dt {
  color: #718096;
  font-size: 0.85rem;
  font-weight: 700;
}

.idea-detail-list dd {
  color: #263248;
  margin: 0;
}

.idea-detail-body {
  border-top: 1px solid #e8edf5;
  margin-top: 4px;
  padding-top: 20px;
}

.idea-detail-body p:first-child {
  margin-top: 0;
}

.idea-detail-body p:last-child {
  margin-bottom: 0;
}

.idea-form-card {
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(35, 48, 74, 0.05);
  padding: 24px;
}

.idea-form-card form {
  display: grid;
  gap: 22px;
}

.idea-form-card .form-field {
  display: grid;
  gap: 8px;
}

.idea-form-card .form-field label {
  color: #44516a;
  font-size: 0.9rem;
  font-weight: 700;
}

.idea-form-card .form-field input,
.idea-form-card .form-field select,
.idea-form-card .form-field textarea {
  width: 100%;
}

.idea-form-card .form-field textarea {
  line-height: 1.6;
  min-height: 150px;
  resize: vertical;
}

.idea-form-card .form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.idea-form-card .form-actions a,
.idea-form-card .form-actions input[type="submit"] {
  margin: 0;
}

.idea-detail-card + .form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.idea-detail-card + .form-actions form {
  margin: 0;
}

.user-form-card {
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(35, 48, 74, 0.05);
  padding: 24px;
}

.user-form-card form {
  display: grid;
  gap: 22px;
}

.user-form-card .form-field {
  display: grid;
  gap: 8px;
}

.user-form-card .form-field label {
  color: #44516a;
  font-size: 0.9rem;
  font-weight: 700;
}

.user-form-card .form-field input,
.user-form-card .form-field select {
  width: 100%;
}

.user-form-card .form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.form-hint {
  color: #7a869a;
  font-size: 0.85rem;
  margin: 0;
}

.role-badge,
.user-current-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.role-client_user {
  background: #e8f0ff;
  color: #365edb;
}

.role-super_admin {
  background: #f2eaff;
  color: #7442a8;
}

.user-current-badge {
  background: #edf1f6;
  color: #657188;
  margin-left: 8px;
}

.resource-table .user-actions-column,
.resource-table .user-action-cell {
  min-width: 140px;
  width: 140px;
}

.user-action-cell .user-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.user-actions {
  align-items: center;
  display: inline-flex;
  flex-flow: row nowrap;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.user-actions form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.user-edit-button,
.user-delete-button {
  align-items: center;
  border: 1px solid;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 32px;
  padding: 7px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.user-edit-button {
  background: #edf3ff;
  border-color: #cbd9ff;
  color: #365edb;
}

.user-edit-button:hover {
  background: #dfe9ff;
}

.user-delete-button {
  background: #fff1f3;
  border-color: #f2c9d1;
  color: #a8455b;
}

.user-delete-button:hover {
  background: #ffe5e9;
}

.alert {
  background: #fff0f2;
  border: 1px solid #f4cbd3;
  border-radius: 10px;
  color: #9b3850;
  margin: 0 0 20px;
  padding: 12px 14px;
}

.request-status-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.request-status-received {
  background: #fff5dc;
  color: #9a6a12;
}

.request-status-in_progress {
  background: #e8f0ff;
  color: #365edb;
}

.request-status-resolved {
  background: #e7f7ed;
  color: #277a50;
}

.client-request-content,
.client-request-reply {
  border-top: 1px solid #e8edf4;
  margin-top: 24px;
  padding-top: 24px;
}

.client-request-content h2,
.client-request-reply h2 {
  color: #26344d;
  font-size: 1rem;
  margin: 0 0 12px;
}

.client-request-content p,
.client-request-reply p {
  color: #526079;
  line-height: 1.7;
  margin: 0;
}

.client-request-reply {
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  margin-top: 20px;
  padding: 20px;
}

.client-request-reply h2 {
  color: #365edb;
}

.client-request-detail {
  display: grid;
  gap: 24px;
}

.client-request-meta {
  border-bottom: 1px solid #e5eaf2;
  border-top: 1px solid #e5eaf2;
  display: grid;
}

.client-request-meta-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e5eaf2;
  border-radius: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: auto;
  padding: 16px 4px;
}

.client-request-meta-item:last-child {
  border-bottom: 0;
}

.client-request-meta-item > span {
  color: #7a869a;
  font-size: 0.85rem;
  font-weight: 700;
}

.client-request-meta-item > strong {
  align-items: center;
  color: #26344d;
  display: flex;
  font-size: 0.95rem;
  min-width: 0;
}

.client-request-content,
.client-request-reply {
  margin-top: 0;
}

@media (max-width: 640px) {
  .client-request-meta-item {
    align-items: start;
    gap: 6px;
    grid-template-columns: 1fr;
    padding: 14px 0;
  }
}

.client-request-history {
  border-top: 1px solid #e5eaf2;
  margin-top: 0;
  padding-top: 24px;
}

.client-request-history h2 {
  color: #26344d;
  font-size: 1rem;
  margin: 0 0 18px;
}

.client-request-history-list {
  display: grid;
  gap: 0;
}

.client-request-history-item {
  border-left: 2px solid #dbe4f4;
  margin-left: 8px;
  padding: 0 0 24px 24px;
  position: relative;
}

.client-request-history-item::before {
  background: #fff;
  border: 3px solid #4169e1;
  border-radius: 50%;
  content: "";
  height: 10px;
  left: -8px;
  position: absolute;
  top: 4px;
  width: 10px;
}

.client-request-history-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.client-request-history-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.client-request-history-meta time {
  color: #7a869a;
  font-size: 0.84rem;
}

.client-request-history-item p {
  color: #526079;
  line-height: 1.7;
  margin: 0;
}

.client-request-history-author {
  color: #8a95a8 !important;
  font-size: 0.82rem;
  margin-top: 10px !important;
}

.client-request-history-role {
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
}

.is-admin-update .client-request-history-role {
  background: #e8f0ff;
  color: #365edb;
}

.is-client-update .client-request-history-role {
  background: #f1f3f7;
  color: #657188;
}

.is-client-update::before {
  border-color: #8a95a8;
}

.client-request-follow-up {
  border-top: 1px solid #e5eaf2;
  display: grid;
  gap: 14px;
  margin-top: 0;
  padding-top: 24px;
}

.client-request-follow-up h2 {
  color: #26344d;
  font-size: 1rem;
  margin: 0;
}

.client-request-follow-up > p {
  color: #657188;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.client-request-follow-up-form {
  display: grid;
  gap: 14px;
}

.client-request-acknowledgement {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.client-request-acknowledgement p {
  color: #657188;
  font-size: 0.88rem;
  margin: 0;
}

.client-request-acknowledgement form {
  margin: 0;
}