* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #0b0f14;
  color: #e8edf2;
}

.navbar {
  background: #05070b;
  border-bottom: 1px solid #171f2a;
}

.navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar__brand {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
  color: #9fb0c2;
}

.navbar__links {
  display: flex;
  gap: 8px;
}

.navbar__link {
  background: transparent;
  color: #9fb0c2;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 14px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.navbar__link--active {
  background: #1a2332;
  border-color: #2f3e54;
  color: #e8edf2;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page__subtitle {
  margin: 0;
  color: #97a6b6;
  font-size: 15px;
}

.page__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.file-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #151b22;
  border: 1px solid #263240;
  border-radius: 8px;
  cursor: pointer;
  color: #e8edf2;
  font-size: 14px;
}

.file-input input {
  display: none;
}

button {
  border: none;
  background: #4b7bec;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(75, 123, 236, 0.3);
}

button.secondary {
  background: transparent;
  border: 1px solid #2c3c4f;
  color: #d2d8df;
}

.custom-message-section {
  margin-bottom: 24px;
}

.custom-message-section__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #9fb0c2;
  margin-bottom: 8px;
}

.custom-message-section__textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  background: #131a22;
  border: 1px solid #243141;
  border-radius: 10px;
  color: #e8edf2;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 12px;
}

.custom-message-section__textarea::placeholder {
  color: #5a6b7a;
}

.custom-message-section__vars {
  font-size: 13px;
  color: #97a6b6;
}

.custom-message-section__vars-title {
  font-weight: 600;
  color: #9fb0c2;
}

.custom-message-section__vars-list {
  margin: 6px 0 0;
  padding-left: 20px;
}

.custom-message-section__vars-list li {
  margin-bottom: 4px;
}

.custom-message-section__vars-list code {
  background: #1a2332;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #c5d0db;
}

.status {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #131a22;
  border: 1px solid #243141;
  border-radius: 10px;
  color: #a9b7c6;
}

.table {
  background: #10161e;
  border-radius: 12px;
  border: 1px solid #223041;
  overflow: hidden;
}

.table__row {
  display: grid;
  grid-template-columns: 1.0fr 0.9fr 1.2fr 1.0fr 0.4fr;
  gap: 12px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid #1c2735;
}

.table__row--header {
  background: #0d131a;
  font-weight: 600;
  color: #9fb0c2;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.table__row:last-child {
  border-bottom: none;
}

.table__action {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.row__username {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
}

.row__copy,
.row__send {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
  display: inline-block;
}

.row__copy.copied {
  background: #19a974;
}

.row__send.whatsapp-linked:not(:disabled) {
  background: #25d366 !important;
  color: #fff !important;
}

.row__send.whatsapp-linked:hover:not(:disabled) {
  background: #20ba5a !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.3);
}

.row__send.sent {
  background: #19a974 !important;
}

.row__send.error {
  background: #e53e3e !important;
}

.row__send:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  background: #1a2332 !important;
  color: #5a6b7a !important;
  border: 1px solid #243141 !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .table__row {
    grid-template-columns: 1fr 0.8fr;
    grid-template-rows: auto auto;
  }

  .table__row--header {
    display: none;
  }

  .table__row > div:nth-child(3),
  .table__row > div:nth-child(4) {
    grid-column: 1 / -1;
    color: #9fb0c2;
    font-size: 13px;
  }

  .table__action {
    grid-column: 2 / 3;
  }
}
