/* Deals Pane — narrow Outlook task pane styling (~320–360px). */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: #201f1e;
  background: #faf9f8;
}
.hidden { display: none !important; }

header {
  position: sticky; top: 0; z-index: 5;
  background: #fff; border-bottom: 1px solid #edebe9;
  padding: 10px 12px 8px;
}
.hdr-row { display: flex; align-items: center; gap: 8px; }
.hdr-row h1 { font-size: 17px; margin: 0; font-weight: 600; }
.badge {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: #fff4ce; color: #7a5c00; border: 1px solid #e3c878;
  border-radius: 8px; padding: 1px 7px;
}
.toolbar { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.toolbar input[type="search"] {
  flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px;
  border: 1px solid #c8c6c4; border-radius: 3px;
}
.toggle { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.status { font-size: 11px; color: #a4262c; min-height: 0; margin-top: 4px; }
.status:empty { margin-top: 0; }

button {
  font: inherit; font-size: 12px; cursor: pointer;
  background: #fff; border: 1px solid #c8c6c4; border-radius: 3px;
  padding: 5px 10px; color: #201f1e;
}
button:hover { background: #f3f2f1; }
button.primary { background: #0f4c81; border-color: #0f4c81; color: #fff; }
button.primary:hover { background: #0d406e; }
button.danger { color: #a4262c; border-color: #e0b4b7; }
button.small { padding: 2px 7px; font-size: 11px; }
button.linklike { border: none; background: none; color: #0f4c81; padding: 2px 0; }
button.linklike:hover { text-decoration: underline; background: none; }

main, section.view { padding: 10px 12px 24px; }

.stage { margin-bottom: 14px; }
.stage-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid #0f4c81; padding-bottom: 3px; margin-bottom: 7px;
}
.stage-head h2 { font-size: 13px; margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stage-head .count { color: #605e5c; font-weight: 400; }
.card {
  background: #fff; border: 1px solid #edebe9; border-left: 3px solid #0f4c81;
  border-radius: 3px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer;
}
.card:hover { border-color: #c8c6c4; border-left-color: #0f4c81; }
.card .name { font-weight: 600; font-size: 13px; }
.card .sub { color: #605e5c; font-size: 12px; margin-top: 1px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: #323130; }
.card .follow { color: #986f0b; font-weight: 600; }
.empty { color: #8a8886; font-size: 12px; padding: 2px 0 4px; font-style: italic; }

form.deal-form, form.note-form {
  background: #fff; border: 1px solid #edebe9; border-radius: 3px;
  padding: 10px; margin-bottom: 10px;
}
form label { display: block; font-size: 11px; font-weight: 600; color: #605e5c; margin: 8px 0 3px; }
form label:first-child { margin-top: 0; }
form input[type="text"], form input[type="number"], form input[type="date"],
form select, form textarea {
  width: 100%; padding: 6px 8px; font: inherit; font-size: 13px;
  border: 1px solid #c8c6c4; border-radius: 3px; background: #fff;
}
form textarea { resize: vertical; min-height: 54px; }
.form-row { display: flex; gap: 8px; }
.form-row > div { flex: 1; min-width: 0; }
.form-actions { display: flex; gap: 6px; margin-top: 10px; }

.back-row { margin-bottom: 8px; }
.deal-title { font-size: 15px; font-weight: 600; margin: 2px 0 8px; }

/* Thread-recognition banner (read mode) */
.banner {
  margin: 10px 12px 0; padding: 8px 10px;
  background: #e8f1fa; border: 1px solid #b8d2ee; border-left: 3px solid #0f4c81;
  border-radius: 3px; font-size: 12px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.banner .banner-error { color: #a4262c; }

/* Compose-mode assignment panel */
#compose-panel { padding: 10px 12px 0; }
.compose-card {
  background: #fff; border: 1px solid #edebe9; border-left: 3px solid #107c41;
  border-radius: 3px; padding: 10px;
}
.compose-card select {
  width: 100%; padding: 6px 8px; font: inherit; font-size: 13px;
  border: 1px solid #c8c6c4; border-radius: 3px; background: #fff;
}
.compose-cur { font-size: 12px; margin-top: 7px; }
.compose-note { font-size: 11px; color: #605e5c; margin: 5px 0 7px; }
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #605e5c; margin: 14px 0 6px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item {
  background: #fff; border: 1px solid #edebe9; border-radius: 3px;
  padding: 8px 10px; margin-bottom: 6px;
}
.tl-email { border-left: 3px solid #2b579a; }
.tl-out { border-left-color: #107c41; }
.tl-note { border-left: 3px solid #d9a419; background: #fffdf5; }
.tl-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tl-kind { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #605e5c; }
.tl-date { font-size: 11px; color: #605e5c; white-space: nowrap; }
.tl-subject { font-weight: 600; margin-top: 2px; }
.tl-from { font-size: 12px; color: #605e5c; }
.tl-snippet, .tl-text { font-size: 12px; color: #323130; margin-top: 3px; white-space: pre-wrap; word-wrap: break-word; }
.tl-actions { margin-top: 5px; display: flex; gap: 6px; }

table.comm { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #edebe9; }
table.comm th, table.comm td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #edebe9; font-size: 13px; }
table.comm th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #605e5c; }
table.comm td.num, table.comm th.num { text-align: right; }
table.comm tr.total td { font-weight: 700; border-top: 2px solid #0f4c81; }
.comm-note { font-size: 12px; color: #605e5c; margin-top: 8px; }
