
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f4f7fb;
  --panel: #fff;
  --line: #d9e2ef;
  --text: #071a38;
  --muted: #71829e;
  --blue: #3978ff;
  --green: #09b781;
  --red: #ff6269;
  --orange: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 13px Inter, Arial, sans-serif;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  gap: 16px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
}

.plane { font-size: 25px; transform: rotate(-15deg); }

.logout-btn {
  color: #315db9;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .93fr);
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 12px 24px;
  align-items: start;
}

.card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 7px 20px rgba(21, 45, 83, .035);
}

h2 { margin: 0; font-size: 17px; font-weight: 800; }

label { display: block; font-weight: 700; margin-bottom: 7px; }

input:not([type="checkbox"]), textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

input:focus, textarea:focus {
  outline: 2px solid #dce7ff;
  border-color: #8aabff;
}

input:disabled { background: #f5f7fb; color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 14px;
}

.two-col small, .recipients-card > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px; }
.password-wrap button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 5px;
}

.body-heading {
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mode-switch { display: flex; gap: 5px; }
.mode {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.mode.active {
  color: var(--blue);
  border-color: #cbdcff;
  background: #eff5ff;
}

.message-body {
  height: 264px;
  margin-top: 5px;
  resize: vertical;
  line-height: 1.6;
}

.info-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: #f6faff;
  color: #1762d5;
}
.shuffle { font-size: 21px; }
.info-strip strong, .info-strip small { display: block; }
.info-strip strong { font-size: 11px; }
.info-strip small { font-size: 10px; color: var(--muted); margin-top: 2px; }

.security-heading { margin: 19px 0 14px; font-size: 13px; }
.consent-row { display: flex; align-items: flex-start; gap: 8px; }
.consent-row input { margin-top: 3px; }
.consent-row label { font-weight: 400; line-height: 1.5; }
.help-text { color: var(--muted); font-size: 11px; line-height: 1.5; }

.right-column { display: grid; gap: 20px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; }
.section-heading p { margin: 4px 0 10px 22px; color: var(--muted); font-size: 10px; }
.badge {
  align-self: start;
  background: #f0f5ff;
  color: var(--blue);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 9px;
  white-space: nowrap;
}

.recipient-input { height: 135px; resize: vertical; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 5px;
}
.stat {
  min-height: 91px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.stat span { font-size: 9px; color: #607493; font-weight: 600; }
.stat strong { color: var(--blue); font-size: 24px; }
.stat strong.green { color: var(--green); }
.stat strong.red { color: #ff4646; }
.stat strong.orange { color: var(--orange); }

.progress-track {
  height: 7px;
  margin-top: 21px;
  background: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
}
#progressBar {
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width .2s ease;
}
.status { text-align: center; font-weight: 700; margin: 16px 0 22px; }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.action-row button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 10px;
  font: inherit;
  font-weight: 700;
  color: white;
  cursor: pointer;
}
.send-btn { background: #09b781; }
.stop-btn { background: #ff777d; }
.action-row button:disabled { opacity: .65; cursor: not-allowed; }

.results { margin-top: 12px; max-height: 240px; overflow-y: auto; }
.result-row {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.result-row.sent { color: #087e58; }
.result-row.failed { color: #c72d38; }

.login-page { display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(100%, 430px);
  background: white;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.login-card h1 { font-size: 27px; }
.login-card h1 span { color: var(--blue); }
.primary-btn {
  margin-top: 20px;
  width: 100%;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.error { color: #a51e2b; background: #fff0f1; padding: 12px; border-radius: 8px; }

@media (max-width: 850px) {
  .dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topbar { padding: 12px; }
  .app-title { font-size: 17px; }
  .card { padding: 18px; }
  .two-col { grid-template-columns: 1fr; }
  .message-body { height: 220px; }
  .action-row { gap: 8px; }
}
