* {
  box-sizing: border-box;
}

:root {
  --navy: #172234;
  --green: #18b77b;
  --green-dark: #129463;
  --green-soft: #e6f8f0;
  --blue: #3b82f6;
  --bg: #eef3f7;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #e4eaf0;
  --text: #17212f;
  --muted: #728197;
}

body {
  margin: 0;
  font-family: "Pretendard", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  background: #eef3f7;
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.01em;
}

button,
input,
select {
  font-family: inherit;
}

.topbar {
  height: 64px;
  background: var(--navy);
  display: flex;
  align-items: center;
  color: white;
  box-shadow: 0 8px 24px rgba(23, 34, 52, 0.14);
}

.logo {
  width: 180px;
  height: 64px;
  display: flex;
  align-items: center;
  padding-left: 26px;
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.4px;
}

.topnav {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topnav button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d9e4f2;
  font-weight: 600;
  cursor: pointer;
}

.topnav button.active,
.topnav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.user-switcher {
  margin-left: auto;
  padding-right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.user-switcher select {
  height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: #22304a;
  color: white;
  padding: 0 10px;
  outline: none;
}

.layout {
  width: 1440px;
  margin: 22px auto;
  display: flex;
  min-height: calc(100vh - 108px);
  background: white;
  border: 1px solid #dce5eb;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(40, 58, 80, 0.12);
}

.sidebar {
  width: 270px;
  background: #f6f9fb;
  border-right: 1px solid var(--line);
  padding: 20px 16px;
}

.compose {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.compose button {
  flex: 1;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.compose button:hover {
  background: var(--green-dark);
}

.side-section {
  margin-bottom: 24px;
}

.side-section h3 {
  margin: 0 0 8px 8px;
  font-size: 12px;
  color: #7b8798;
  font-weight: 700;
}

.folders {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folders li {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  margin-bottom: 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #405168;
  cursor: pointer;
  font-weight: 500;
}

.folders.small li {
  min-height: 36px;
  font-size: 13px;
}

.folders li:hover {
  background: #edf3f7;
}

.folders li.active {
  background: var(--green-soft);
  border-color: #b7ead5;
  color: #0b8f5b;
  font-weight: 700;
}

.folders span {
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.main {
  flex: 1;
  background: var(--panel);
}

.titlebar {
  height: 78px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.titlebar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.titlebar h1 span {
  color: var(--muted);
  font-weight: 500;
}

.titlebar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.titlebar input {
  width: 280px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  outline: none;
  background: var(--panel-soft);
  color: var(--text);
}

.titlebar input:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.toolbar {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.toolbar button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}

.toolbar button:hover {
  background: #f5f8fb;
  border-color: #b8c5d3;
}

.mail-table {
  width: calc(100% - 52px);
  margin: 26px;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 14px;
}

.mail-table thead th {
  height: 34px;
  color: #637083;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}

.mail-table tbody td {
  height: 56px;
  background: #ffffff;
  border-top: 1px solid #e9eef3;
  border-bottom: 1px solid #e9eef3;
  color: #3d4d61;
}

.mail-table tbody td:first-child {
  border-left: 1px solid #e9eef3;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.mail-table tbody td:last-child {
  border-right: 1px solid #e9eef3;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.mail-table tbody tr:hover td {
  background: #f7fbff;
  border-color: #cfe0ff;
}

.mail-table tbody tr.unread td {
  color: #111827;
  font-weight: 700;
  background: #fbfffd;
}

.mail-table th:nth-child(1),
.mail-table td:nth-child(1) {
  width: 38px;
  text-align: center;
}

.mail-table th:nth-child(2),
.mail-table td:nth-child(2) {
  width: 38px;
  text-align: center;
}

.mail-table th:nth-child(3),
.mail-table td:nth-child(3) {
  width: 48px;
  text-align: center;
}

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

.mail-table th:nth-child(6),
.mail-table td:nth-child(6) {
  width: 160px;
}

.mail-table th:nth-child(7),
.mail-table td:nth-child(7) {
  width: 110px;
}

.mail-table th:nth-child(8),
.mail-table td:nth-child(8) {
  width: 100px;
}

.mail-table th:nth-child(9),
.mail-table td:nth-child(9) {
  width: 150px;
}

.mail-table th:nth-child(10),
.mail-table td:nth-child(10) {
  width: 90px;
}

.subject {
  color: #255fba;
  font-weight: 600;
}

.read-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.read-chip.unread {
  background: #eaf3ff;
  color: #1d5fd1;
}

.read-chip.me {
  background: #eef2f6;
  color: #526173;
}

.read-chip.dept {
  background: #e5f7ee;
  color: #0b8f5b;
}

.read-chip.company {
  background: #fff4df;
  color: #a26300;
}

.read-chip.all {
  background: #ede9fe;
  color: #5b3db8;
}

.status-chip.wait {
  background: #fff4df;
  color: #a26300;
}

.status-chip.review {
  background: #eaf3ff;
  color: #1d5fd1;
}

.status-chip.reply {
  background: #fee2e2;
  color: #b91c1c;
}

.status-chip.done {
  background: #e5f7ee;
  color: #0b8f5b;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}