:root {
  --green: #285b47;
  --dark: #172923;
  --muted: #66756d;
  --border: #dfe7e1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f6f3;
  color: var(--dark);
  font:
    15px/1.6 Arial,
    sans-serif;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4%;
  background: white;
  border-bottom: 1px solid var(--border);
}
header strong {
  font-size: 25px;
  letter-spacing: 2px;
  color: var(--green);
}
header span {
  margin-left: 20px;
  color: var(--muted);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid var(--border);
  background: white;
  color: var(--dark);
  padding: 10px 15px;
  border-radius: 7px;
  cursor: pointer;
}
button:hover {
  background: #edf3ee;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--dark);
}
textarea {
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 15px;
}
label input,
label select,
label textarea {
  margin-top: 5px;
  font-weight: 400;
}
.demo {
  background: #eee8d6;
  color: #66522a;
  padding: 11px 4%;
  font-size: 12px;
}
main {
  max-width: 1450px;
  margin: auto;
  padding: 35px 4%;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 0;
}
h2 {
  font-size: 25px;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
  margin: 0 0 10px;
}
p {
  margin: 0 0 12px;
}
.intro p:last-child,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 5px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.metric {
  padding: 19px 23px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
}
.metric strong {
  font-size: 29px;
  display: block;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.workspace > aside {
  padding: 23px;
  border-right: 1px solid var(--border);
  background: #fbfcfa;
}
.ticket {
  display: block;
  width: 100%;
  text-align: left;
  margin: 10px 0;
  padding: 16px;
  border-radius: 8px;
}
.ticket.active {
  border-color: var(--green);
  background: #eaf2ec;
}
.ticket strong,
.ticket small {
  display: block;
}
.ticket small {
  font-size: 12px;
  color: var(--muted);
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  background: #e8efea;
  color: var(--green);
  margin: 6px 0;
}
.badge.unread {
  background: #fff0cc;
  color: #7a5900;
}
#detail {
  padding: 30px;
  min-width: 0;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 22px;
}
.detail-heading p {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 18px 0 25px;
}
.message {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f8f5;
  max-width: 94%;
}
.message.out {
  align-self: flex-end;
  background: #eaf2ec;
}
.message small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.message p,
.note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.note {
  padding: 13px 16px;
  background: #fff8e8;
  border-radius: 7px;
  margin: 10px 0;
}
.note small {
  font-size: 11px;
  color: var(--muted);
}
.notes {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 28px;
}
.compose {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.compose .muted {
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--dark);
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 10;
}
#toast:empty {
  display: none;
}
dialog {
  border: 0;
  border-radius: 12px;
  padding: 28px;
  width: min(600px, 92vw);
  max-height: 90vh;
  color: var(--dark);
}
dialog::backdrop {
  background: #17292399;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b68b25;
  outline-offset: 3px;
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  #detail {
    padding: 22px;
  }
  .settings {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .workspace > aside {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  #list {
    max-height: 300px;
    overflow: auto;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  header span {
    display: block;
    margin: 0;
  }
  .detail-heading {
    flex-direction: column;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .message {
    max-width: 100%;
  }
  h1 {
    font-size: 29px;
  }
}

#auto-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  background: #f4f6f3;
  padding: 18px;
  border-radius: 8px;
  font-size: 13px;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toggle-label input {
  width: 20px;
  height: 20px;
}
header {
  gap: 12px;
  flex-wrap: wrap;
}
header > div {
  margin-right: auto;
}

#automation-dialog {
  width: min(850px, 96vw);
}
#email-preview {
  width: 100%;
  height: 650px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f2f5f2;
}
#auto-preview {
  margin-bottom: 12px;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  padding: 10px;
  max-width: 100%;
  font-size: 13px;
}
.attachment > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.attachment img {
  width: 65px;
  height: 60px;
  object-fit: contain;
}
.attachment small {
  display: block;
}
.pdf-icon {
  background: #eef3ed;
  padding: 10px;
  font-weight: 700;
}
header > div:first-child {
  display: flex;
  align-items: center;
  gap: 18px;
}
.panel-logo {
  width: 160px;
  height: 65px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.panel-logo img {
  display: block;
  width: auto;
  height: 150px;
  transform: translateY(-7px);
}
header > div:first-child > span {
  margin-left: 0;
}

.pending-files {
  margin-top: 8px;
}
.pending-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-weight: 400;
}
.pending-file span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.pending-file button {
  font-size: 12px;
  padding: 5px 10px;
  flex-shrink: 0;
}
.panel-mail-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
}
.panel-mail-link:hover {
  background: #edf3ee;
}
