:root {
  --bg: #f4f6f7;
  --panel: #fff;
  --side: #f8f9fa;
  --line: #e4e7eb;
  --line2: #d4dae0;
  --text: #20252b;
  --muted: #747d88;
  --soft: #f0f2f4;
  --hover: #e9edf0;
  --green: #0f8666;
  --green2: #0a6e54;
  --greenSoft: #e5f3ee;
  --amber: #b7791f;
  --amberSoft: #fff5df;
  --red: #b74848;
  --redSoft: #fbe9e9;
  --blue: #3b6fb6;
  --blueSoft: #edf4ff;
  --sidebar: 310px;
  --ai: 440px;
  --shadow: 0 16px 50px rgba(20, 27, 34, .13)
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: Pretendard, "Noto Sans KR", Apple SD Gothic Neo, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg)
}

button,
input,
textarea,
select {
  font: inherit
}

button {
  cursor: pointer
}

.hidden {
  display: none !important
}

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  overflow: hidden
}

.app.sidebar-collapsed {
  grid-template-columns: 0 1fr
}

.sidebar {
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: .2s
}

.brandbar {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 13px 0 17px;
  border-bottom: 1px solid var(--line);
  gap: 7px;
  min-width: 310px
}

.brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.6px;
  flex: 1;
  color: inherit;
  text-decoration: none
}

.brand small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .08em;
  margin-top: 1px
}

.icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  color: #46505b
}

.icon:hover {
  background: var(--hover)
}

.side-scroll {
  flex: 1;
  overflow: auto;
  padding: 11px 10px 18px;
  min-width: 310px
}

.section-head {
  display: flex;
  align-items: center;
  padding: 10px 8px 7px;
  gap: 8px
}

.section-head strong {
  font-size: 11px;
  color: #707883;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex: 1
}

.module-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
  font-weight: 760;
  color: #39414a;
  margin: 2px 0
}

.module-link:hover {
  background: var(--hover)
}

.module-link.active {
  background: var(--greenSoft);
  color: #0a674f
}

.module-icon {
  width: 22px;
  text-align: center;
  font-size: 16px
}

.module-arrow {
  margin-left: auto;
  color: #8a929c
}

.filter {
  border: 0;
  background: transparent;
  color: #59636f;
  font-size: 11px;
  padding: 4px 5px;
  border-radius: 7px;
  outline: 0
}

.filter:hover {
  background: var(--hover)
}

.newchat {
  width: 100%;
  border: 1px solid var(--line2);
  background: #fff;
  border-radius: 11px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  margin: 3px 0 8px
}

.newchat:hover {
  border-color: #aeb8c2
}

.newchat b {
  font-size: 18px;
  color: var(--green);
  line-height: 1
}

.tree-row,
.chat-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 9px;
  padding: 6px 6px 6px 8px;
  gap: 8px;
  color: #343b43;
  position: relative
}

.tree-row:hover,
.chat-row:hover {
  background: var(--hover)
}

.tree-row.active,
.chat-row.active {
  background: var(--greenSoft);
  color: #0b654f;
  font-weight: 780
}

.caret {
  width: 17px;
  text-align: center;
  color: #7b8490;
  font-size: 12px
}

.folder {
  font-size: 14px;
  color: #6f7781
}

.label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px
}

.count {
  font-size: 10px;
  background: #edf0f3;
  color: #6b7280;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 750
}

.subtree {
  padding-left: 21px
}

.subtree2 {
  padding-left: 19px
}

.subproject {
  font-size: 13px
}

.work-link {
  font-size: 12px;
  color: #59636f;
  min-height: 34px
}

.work-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #31a57f;
  margin-left: 3px
}

.row-more,
.more {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #737b86;
  opacity: 0
}

.tree-row:hover .row-more,
.chat-row:hover .more,
.chat-row.active .more {
  opacity: 1
}

.row-more:hover,
.more:hover {
  background: #dce2e7
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a67a
}

.status-dot.hold {
  background: #d59a38
}

.status-dot.closed {
  background: #9aa1aa
}

.chat-title {
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.project-tag {
  font-size: 10px;
  color: #78818c;
  background: #eef1f4;
  padding: 2px 6px;
  border-radius: 999px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.profile {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 310px;
  background: transparent;
  text-align: left;
  color: inherit
}

.profile:hover,
.profile.active {
  background: var(--greenSoft)
}

.profile-text {
  flex: 1;
  min-width: 0
}

.profile-text strong,
.profile-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.profile-gear {
  font-size: 10px;
  font-weight: 800;
  color: #6f7882;
  background: #eef1f4;
  border-radius: 999px;
  padding: 4px 7px
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dcefe8;
  color: #0e775b;
  display: grid;
  place-items: center;
  font-weight: 900
}

.profile strong {
  display: block;
  font-size: 13px
}

.profile span {
  font-size: 11px;
  color: var(--muted)
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  transition: grid-template-columns .22s;
  background: #fff
}

.workspace.ai-open {
  grid-template-columns: minmax(0, 1fr) var(--ai)
}

.main {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  z-index: 15
}

.crumbs {
  flex: 1;
  min-width: 110px;
  font-size: 13px;
  color: #7b8490;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.crumbs b {
  color: #313841
}

.status-select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 7px 8px;
  font-size: 11px;
  color: #4d5662;
  outline: 0
}

.topbtn,
.ai-panel-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 8px 10px;
  font-weight: 760;
  font-size: 11px;
  color: #424b56;
  white-space: nowrap
}

.topbtn:hover,
.ai-panel-btn:hover {
  background: var(--soft)
}

.folder-state {
  font-size: 10px;
  color: #6f7882;
  max-width: 105px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.folder-state.ok {
  color: #0b7659;
  font-weight: 760
}

.mode {
  display: flex;
  background: #edf0f2;
  padding: 4px;
  border-radius: 10px;
  gap: 3px
}

.mode button {
  border: 0;
  background: transparent;
  color: #6c7580;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 9px;
  border-radius: 7px
}

.mode button.active {
  background: #fff;
  color: #283039;
  box-shadow: 0 2px 8px rgba(22, 29, 36, .08)
}

.safe-banner {
  display: none;
  border-bottom: 1px solid #cde4da;
  background: #edf8f4;
  color: #236b56;
  padding: 9px 16px;
  font-size: 11px
}

.safe-banner.show {
  display: block
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbfb;
  z-index: 10
}

.toolgroup {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 7px;
  margin-right: 3px;
  border-right: 1px solid var(--line)
}

.toolgroup:last-child {
  border: 0
}

.toolbtn {
  min-width: 30px;
  height: 30px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  color: #454e58;
  font-size: 12px;
  font-weight: 760
}

.toolbtn:hover {
  background: #fff;
  border-color: var(--line)
}

.toolbar select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  padding: 0 7px;
  color: #46505a
}

.color-control {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px;
  background: #fff
}

.editor-scroll {
  flex: 1;
  overflow: auto;
  background: #fff
}

.editor {
  max-width: 980px;
  margin: 0 auto;
  padding: 38px 58px 120px
}

.note-title {
  width: 100%;
  border: 0;
  outline: 0;
  font-weight: 900;
  font-size: 35px;
  letter-spacing: -1.1px;
  color: #21262c;
  padding: 0;
  margin: 0 0 11px
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #7c8490;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px
}

.chip {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--greenSoft);
  color: #0a7056;
  font-weight: 760
}

.note-body {
  min-height: 560px;
  padding-top: 25px;
  outline: 0;
  font-size: 16px;
  line-height: 1.86;
  color: #323943
}

.note-body h1 {
  font-size: 30px
}

.note-body h2 {
  font-size: 23px;
  line-height: 1.4;
  margin: 33px 0 12px
}

.note-body h3 {
  font-size: 19px
}

.note-body p {
  margin: 0 0 15px
}

.note-body blockquote {
  margin: 20px 0;
  border-left: 4px solid #aeb8c2;
  padding: 5px 0 5px 16px;
  color: #58616c;
  background: #fafbfc
}

.note-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px
}

.note-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0
}

.note-body td,
.note-body th {
  border: 1px solid #cfd5db;
  padding: 8px;
  min-width: 52px
}

.note-body td.active-cell,
.note-body th.active-cell {
  outline: 2px solid var(--green);
  outline-offset: -2px
}

.note-body a {
  color: #08765a
}

.module-view {
  flex: 1;
  overflow: auto;
  background: #f5f7f8;
  padding: 32px
}

.module-wrap {
  max-width: 1120px;
  margin: 0 auto
}

.module-title {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px
}

.module-title h1 {
  margin: 0;
  font-size: 28px
}

.module-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px
}

.module-title .spacer {
  flex: 1
}

.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(22, 29, 36, .035)
}

.schedule-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px
}

.calendar-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11px;
  color: #717a85;
  text-align: center;
  margin-bottom: 5px
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line)
}

.day {
  min-height: 98px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
  background: #fff
}

.day b {
  font-size: 11px;
  color: #606a75
}

.day .event {
  display: block;
  margin-top: 6px;
  border-radius: 6px;
  background: var(--greenSoft);
  color: #0b694f;
  padding: 4px 5px;
  font-size: 10px;
  line-height: 1.35
}

.side-form label,
.ledger-form label,
.gmail-form label {
  display: block;
  font-size: 10px;
  font-weight: 760;
  color: #66707b;
  margin: 9px 0 5px
}

.side-form input,
.side-form textarea,
.ledger-form input,
.ledger-form select,
.gmail-form input,
.gmail-form textarea {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  outline: 0
}

.primary {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 11px
}

.primary:hover {
  background: var(--green2)
}

.secondary {
  border: 1px solid var(--line2);
  background: #fff;
  color: #424b56;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 11px
}

.secondary:hover {
  background: var(--soft)
}

.schedule-list {
  margin-top: 14px
}

.schedule-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px
}

.schedule-item b {
  display: block;
  font-size: 12px
}

.schedule-item span {
  color: var(--muted)
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.kpi b {
  display: block;
  font-size: 21px;
  margin-top: 7px
}

.mgmt-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px
}

.ledger th,
.ledger td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left
}

.ledger td:last-child {
  text-align: right
}

.ledger .income {
  color: #0a795a;
  font-weight: 800
}

.ledger .expense {
  color: #b14949;
  font-weight: 800
}

.gmail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px
}

.connect-card {
  background: linear-gradient(135deg, #fff, #f4f8ff);
  border: 1px solid #dce6f5;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px
}

.connect-card strong {
  display: block;
  font-size: 15px
}

.connect-card p {
  font-size: 11px;
  line-height: 1.65;
  color: #66717e;
  margin: 7px 0
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--amberSoft);
  color: #956316;
  font-size: 10px;
  font-weight: 800
}

.draft-list {
  display: grid;
  gap: 9px
}

.draft-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px
}

.draft-card b {
  display: block;
  font-size: 13px
}

.draft-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px
}

.draft-card p {
  font-size: 11px;
  color: #4f5965;
  white-space: pre-wrap;
  max-height: 72px;
  overflow: hidden
}

.mail-item.unread b {
  font-weight: 900
}

.mail-item .mail-unread {
  color: #0a7056;
  font-weight: 800
}

.empty {
  padding: 28px;
  text-align: center;
  color: #89919a;
  font-size: 11px;
  border: 1px dashed var(--line2);
  border-radius: 12px;
  background: #fff
}

.ai-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.ai-head {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff
}

.ai-head div {
  flex: 1
}

.ai-head strong {
  font-size: 16px
}

.ai-head span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted)
}

.ai-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px;
  background: #f4f6f8;
  border-bottom: 1px solid var(--line);
  gap: 5px
}

.ai-tab {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 800;
  color: #69727d
}

.ai-tab.active {
  background: #fff;
  color: #0b7458;
  box-shadow: 0 2px 8px rgba(25, 33, 41, .07)
}

.ai-body {
  flex: 1;
  overflow: auto;
  padding: 15px
}

.tab-pane {
  display: none
}

.tab-pane.active {
  display: block
}

.field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(22, 29, 36, .025)
}

.field-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px
}

.num {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: var(--greenSoft);
  color: #0c7559;
  font-weight: 850;
  display: grid;
  place-items: center;
  font-size: 12px
}

.field-head b {
  display: block;
  font-size: 13px
}

.field-head small {
  display: block;
  color: #7d8590;
  font-size: 10px;
  margin-top: 2px;
  line-height: 1.4
}

.field textarea {
  width: 100%;
  border: 1px solid #dfe3e8;
  background: #fcfcfd;
  border-radius: 10px;
  resize: vertical;
  outline: 0;
  padding: 10px 11px;
  color: #333b44;
  font-size: 12px;
  line-height: 1.65
}

.field textarea:focus {
  border-color: #79b8a3;
  box-shadow: 0 0 0 3px rgba(15, 138, 103, .08)
}

.summary {
  min-height: 105px
}

.assistant-prompt {
  min-height: 330px
}

.prompt-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blueSoft);
  color: #335f9b;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 800;
  margin-top: 5px
}

.include-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #525c67;
  padding: 4px 2px 10px
}

.include-row input {
  accent-color: var(--green)
}

.preview {
  border: 1px dashed #cbd2d9;
  border-radius: 12px;
  padding: 11px;
  background: #fff;
  margin-bottom: 12px
}

.preview summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  color: #535d68
}

.preview pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.65;
  color: #616b76;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  max-height: 260px;
  overflow: auto
}

.request-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.request {
  width: 100%;
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 11px;
  padding: 12px 14px;
  font-weight: 850
}

.request:hover {
  background: var(--green2)
}

.request.secondary-request {
  background: #fff;
  color: #40505b;
  border: 1px solid var(--line2)
}

.request.secondary-request:hover {
  background: var(--soft)
}

.request-note {
  text-align: center;
  font-size: 9px;
  color: #87909a;
  margin: 8px 0 0
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.message {
  border-radius: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff
}

.message.user {
  border-color: #cde4da;
  background: #f2faf7
}

.message.assistant {
  border-color: #d9e3f2;
  background: #f6f9ff
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px
}

.message-head b {
  font-size: 11px
}

.message-head span {
  font-size: 9px;
  color: var(--muted);
  margin-left: auto
}

.message-body {
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.65;
  color: #4d5762;
  max-height: 300px;
  overflow: auto
}

.message-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap
}

.smallbtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px
}

.smallbtn:hover {
  background: var(--soft)
}

.reply-box {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px
}

.reply-box textarea {
  width: 100%;
  min-height: 115px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 9px;
  font-size: 11px;
  line-height: 1.6;
  resize: vertical
}

.reply-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px
}

.file-toolbar {
  display: flex;
  gap: 7px;
  margin-bottom: 10px
}

.file-toolbar select {
  flex: 1;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 7px;
  font-size: 10px;
  background: #fff
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.file-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px
}

.file-top {
  display: flex;
  gap: 9px;
  align-items: center
}

.file-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef2f5;
  display: grid;
  place-items: center
}

.file-info {
  min-width: 0;
  flex: 1
}

.file-info b {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.file-info span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px
}

.file-actions {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  flex-wrap: wrap
}

.path-box {
  font-size: 9px;
  color: #78818c;
  background: #f1f3f5;
  border-radius: 7px;
  padding: 6px;
  margin-top: 7px;
  word-break: break-all
}

.menu {
  position: fixed;
  z-index: 120;
  display: none;
  width: 205px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow)
}

.menu.show {
  display: block
}

.menu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 11px;
  color: #424b55
}

.menu button:hover {
  background: var(--soft)
}

.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px
}

.menu .danger {
  color: var(--red)
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(28, 34, 40, .38);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.modal-back.show {
  display: flex
}

.modal {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow)
}

.modal.wide {
  width: min(600px, 100%)
}

.modal h3 {
  margin: 0 0 6px;
  font-size: 18px
}

.modal p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6
}

.modal label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #65707b;
  margin: 11px 0 5px
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 9px;
  font-size: 12px
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px
}

.modal-actions button {
  border: 0;
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 11px;
  font-weight: 800
}

.modal-actions .cancel {
  background: var(--soft);
  color: #4d5661
}

.modal-actions .confirm {
  background: var(--green);
  color: #fff
}

.table-options {
  display: flex;
  gap: 14px;
  margin-top: 11px;
  font-size: 11px;
  color: #555f69
}

.table-options input {
  width: auto
}

.table-tools {
  position: fixed;
  z-index: 110;
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 6px;
  box-shadow: var(--shadow);
  max-width: 310px
}

.table-tools.show {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.table-tools button {
  border: 0;
  background: #f3f5f6;
  border-radius: 7px;
  padding: 7px 8px;
  font-size: 9px
}

.table-tools button:hover {
  background: #e5eaed
}

.search-back {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 31, .35);
  z-index: 140;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 70px
}

.search-back.show {
  display: flex
}

.search {
  width: min(620px, 92vw);
  background: #fff;
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden
}

.search input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  outline: 0;
  font-size: 14px
}

.search-results {
  max-height: 65vh;
  overflow: auto;
  padding: 7px
}

.result {
  padding: 11px;
  border-radius: 9px
}

.result:hover {
  background: var(--soft)
}

.result b {
  display: block;
  font-size: 12px
}

.result span {
  font-size: 10px;
  color: var(--muted)
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 15px);
  opacity: 0;
  z-index: 300;
  background: #263039;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 11px;
  transition: .2s;
  pointer-events: none
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

@media(max-width:1120px) {

  .topbtn.optional,
  .folder-state {
    display: none
  }

  .workspace.ai-open {
    grid-template-columns: minmax(0, 1fr) 380px
  }
}

@media(max-width:820px) {

  .app,
  .app.sidebar-collapsed {
    grid-template-columns: 1fr
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 286px;
    z-index: 60;
    transform: translateX(-100%);
    transition: .22s;
    box-shadow: var(--shadow)
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .workspace,
  .workspace.ai-open {
    grid-template-columns: 1fr
  }

  .ai-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(440px, 96vw);
    z-index: 70;
    transform: translateX(100%);
    transition: .22s;
    box-shadow: var(--shadow)
  }

  .workspace.ai-open .ai-panel {
    transform: translateX(0)
  }

  .editor {
    padding: 28px 20px 90px
  }

  .note-title {
    font-size: 27px
  }

  .crumbs,
  .status-select,
  .topbtn.optional {
    display: none
  }

  .topbar {
    padding: 0 8px
  }

  .mode button {
    padding: 7px
  }

  .schedule-layout,
  .mgmt-layout,
  .gmail-layout {
    grid-template-columns: 1fr
  }

  .kpis {
    grid-template-columns: 1fr 1fr
  }

  .module-view {
    padding: 20px 12px
  }

  .toolbar {
    padding: 7px 8px
  }

  .request-row {
    grid-template-columns: 1fr
  }
}

/* ===== 통합알림 · 업무 메신저 (PC) ===== */
.workflow-status {
  font-size: 10px;
  color: #6f7882;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap
}

.workflow-status.live {
  color: #0b7659;
  border-color: #b9decf;
  background: #eff9f5
}

.workflow-status.demo {
  color: #946516;
  border-color: #ead7a6;
  background: #fff9e9
}

.workflow-board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(22, 29, 36, .035);
  margin-bottom: 16px
}

.workflow-grid {
  display: grid;
  grid-template-columns: 120px repeat(5, minmax(100px, 1fr));
  align-items: stretch
}

.workflow-grid>div {
  min-height: 64px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9px
}

.workflow-grid>div:nth-child(6n) {
  border-right: 0
}

.workflow-grid .wf-head {
  min-height: 48px;
  background: #fafbfb;
  color: #5f6873;
  font-size: 11px;
  font-weight: 850
}

.workflow-grid .wf-corner {
  justify-content: flex-start;
  color: #8a929c
}

.workflow-grid .wf-row {
  justify-content: flex-start;
  font-size: 13px;
  font-weight: 900;
  color: #343c45;
  background: #fcfdfd
}

.wf-count {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 23px;
  font-weight: 900;
  color: #283039
}

.wf-count:hover {
  background: var(--greenSoft);
  color: var(--green2)
}

.wf-count.active {
  background: var(--green);
  color: #fff
}

.wf-count.na {
  color: #a6adb5;
  cursor: default
}

.wf-count.na:hover {
  background: transparent;
  color: #a6adb5
}

.workflow-note {
  padding: 10px 14px;
  background: #fcfdfd;
  color: #7a838d;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px
}

.workflow-note strong {
  color: #53606b
}

.notification-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px
}

.notification-tabs {
  display: flex;
  gap: 5px
}

.notification-tab {
  border: 1px solid transparent;
  background: #f2f4f6;
  color: #66707b;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 850
}

.notification-tab.active {
  background: var(--greenSoft);
  color: #0b6d53;
  border-color: #cce9df
}

.notification-search {
  margin-left: auto;
  min-width: 250px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11px;
  outline: 0
}

.notification-search:focus {
  border-color: #79b8a3;
  box-shadow: 0 0 0 3px rgba(15, 138, 103, .08)
}

.timeline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden
}

.timeline-empty {
  padding: 50px 20px;
  text-align: center;
  color: #8a929c;
  font-size: 12px
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  align-items: start
}

.timeline-item:last-child {
  border-bottom: 0
}

.timeline-time {
  font-size: 11px;
  color: #818a95;
  padding-top: 3px;
  font-weight: 760
}

.timeline-main {
  min-width: 0
}

.timeline-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 5px
}

.timeline-tag {
  font-size: 9px;
  font-weight: 850;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef1f4;
  color: #66707b
}

.timeline-tag.mail {
  background: #edf4ff;
  color: #3a6194
}

.timeline-tag.schedule {
  background: #eaf7f0;
  color: #147155
}

.timeline-tag.task {
  background: #fff3e4;
  color: #9b6318
}

.timeline-tag.urgent {
  background: var(--redSoft);
  color: var(--red)
}

.timeline-tag.client {
  background: #f2edff;
  color: #6c50a1
}

.timeline-tag.econova {
  background: var(--greenSoft);
  color: #0b7156
}

.timeline-title {
  font-size: 13px;
  font-weight: 900;
  color: #303841;
  margin-bottom: 4px
}

.timeline-preview {
  font-size: 11px;
  line-height: 1.58;
  color: #69727d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 760px
}

.timeline-actions {
  display: flex;
  gap: 6px;
  align-items: center
}

.mini-action {
  border: 1px solid var(--line2);
  background: #fff;
  color: #4b5560;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800
}

.mini-action:hover {
  background: var(--soft)
}

.mini-action.ai {
  border-color: #c7dfd6;
  color: #0b7156;
  background: #f4fbf8
}

.ai-review {
  grid-column: 2/4;
  border: 1px solid #cfe5dc;
  background: #f8fcfa;
  border-radius: 12px;
  padding: 12px 13px;
  margin-top: 2px;
  display: none
}

.timeline-item.ai-open .ai-review {
  display: block
}

.ai-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px
}

.ai-review-block {
  background: #fff;
  border: 1px solid #e2ece8;
  border-radius: 10px;
  padding: 10px
}

.ai-review-block b {
  display: block;
  font-size: 10px;
  color: #4c5a54;
  margin-bottom: 4px
}

.ai-review-block p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: #4e5963
}

.ai-review .draft {
  grid-column: 1/-1
}

.ai-review-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap
}

.briefing {
  display: none;
  background: #fff;
  border: 1px solid #cfe5dc;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(22, 29, 36, .03)
}

.briefing.show {
  display: block
}

.briefing-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px
}

.briefing-head strong {
  font-size: 14px
}

.briefing-head span {
  font-size: 10px;
  color: #7a838d
}

.briefing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px
}

.brief-card {
  border: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 11px;
  padding: 11px
}

.brief-card b {
  display: block;
  font-size: 10px;
  color: #68727d;
  margin-bottom: 5px
}

.brief-card strong {
  font-size: 13px
}

.brief-list {
  margin: 11px 0 0;
  padding-left: 18px;
  color: #4f5964;
  font-size: 11px;
  line-height: 1.65
}

@media(max-width:1050px) {
  .workflow-grid {
    grid-template-columns: 100px repeat(5, minmax(86px, 1fr))
  }

  .workflow-grid>div {
    padding: 7px
  }

  .wf-count {
    font-size: 20px
  }

  .timeline-item {
    grid-template-columns: 58px 1fr
  }

  .timeline-actions {
    grid-column: 2;
    justify-content: flex-start
  }

  .ai-review {
    grid-column: 2
  }

  .briefing-cards {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:820px) {
  .workflow-board {
    overflow-x: auto
  }

  .workflow-grid {
    min-width: 690px
  }

  .notification-search {
    width: 100%;
    min-width: 0;
    margin-left: 0
  }

  .timeline-item {
    grid-template-columns: 50px 1fr;
    padding: 13px 11px
  }

  .timeline-actions {
    grid-column: 2
  }

  .ai-review {
    grid-column: 2
  }

  .ai-review-grid,
  .briefing-cards {
    grid-template-columns: 1fr
  }

  .ai-review .draft {
    grid-column: auto
  }
}

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.settings-grid label,
.account-card p {
  display: block;
  font-size: 10px;
  font-weight: 760;
  color: #66707b;
  margin: 0 0 5px
}

.settings-grid input {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  outline: 0
}

.account-card p {
  font-weight: 500;
  line-height: 1.65;
  margin: 7px 0 0
}

.account-email {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #0b7156;
  background: #f4fbf8;
  border: 1px solid #c7dfd6;
  border-radius: 8px;
  padding: 9px 10px
}

@media (max-width: 820px) {
  .settings-layout,
  .settings-grid {
    grid-template-columns: 1fr
  }
}

.login-page {
  min-height: 100%;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px
}

.login-shell {
  width: min(440px, 100%)
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: var(--shadow)
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px
}

.login-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--greenSoft);
  color: var(--green2);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px
}

.login-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.5px
}

.login-brand small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted)
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -.6px
}

.login-lead,
.login-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted)
}

.login-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--redSoft);
  color: var(--red);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55
}

.google-btn {
  margin-top: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line2);
  background: #fff;
  color: #283039;
  border-radius: 11px;
  padding: 12px 14px;
  font-weight: 850;
  font-size: 13px;
  text-decoration: none
}

.google-btn:hover {
  background: var(--soft);
  border-color: #c5ccd3
}

.login-note {
  margin-top: 14px;
  text-align: center;
  font-size: 11px
}
