.header-link {
  color: white;
  text-decoration: none;
}

.campaign-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

/* Stats */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.stat {
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #111b21;
}

.stat-label {
  font-size: 13px;
  color: #667781;
}

.stat-pending .stat-number { color: #f39c12; }
.stat-sent .stat-number { color: #25d366; }
.stat-failed .stat-number { color: #e74c3c; }

/* Layout */
.two-columns {
  display: flex;
  gap: 20px;
}

.actions-panel {
  width: 360px;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.directory-panel {
  flex: 1;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Cards */
.card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h3 {
  font-size: 15px;
  color: #075e54;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  color: #667781;
  margin-bottom: 12px;
}

.card label {
  display: block;
  font-size: 12px;
  color: #667781;
  margin-top: 8px;
  margin-bottom: 2px;
}

.card input[type="text"],
.card input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.card input[type="text"]:focus,
.card input[type="number"]:focus {
  border-color: #075e54;
}

.card input[type="file"] {
  width: 100%;
  margin-bottom: 8px;
  font-size: 13px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.csv-preview {
  background: #f0f2f5;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #333;
  max-height: 100px;
  overflow-y: auto;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 10px;
  background: #075e54;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}

.btn-primary:hover { background: #064e46; }
.btn-primary:disabled { background: #a0a0a0; cursor: not-allowed; }

.btn-send {
  width: 100%;
  padding: 10px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

.btn-send:hover { background: #1da851; }
.btn-send:disabled { background: #a0a0a0; cursor: not-allowed; }

.btn-secondary {
  padding: 8px 14px;
  background: #f0f2f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary:hover { background: #e4e6e9; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-delete {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

.btn-delete:hover { background: #fde8e8; border-radius: 4px; }

.btn-edit {
  background: none;
  border: none;
  color: #128c7e;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}

.btn-edit:hover { background: #e8f8e8; border-radius: 4px; }

.btn-save {
  background: #128c7e;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 4px;
}

.btn-save:hover { background: #0a6b5e; }

.btn-cancel {
  background: #f0f2f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.btn-cancel:hover { background: #e4e6e9; }

.result-msg {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.result-msg.success { background: #e8f8e8; color: #1a7a1a; }
.result-msg.error { background: #fde8e8; color: #c0392b; }

/* Directory */
.directory-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.directory-header h3 {
  font-size: 15px;
  color: #075e54;
}

.directory-filters {
  display: flex;
  gap: 8px;
}

.directory-filters select,
.directory-filters input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.table-container {
  flex: 1;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  position: sticky;
  top: 0;
  background: #f0f2f5;
}

th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  color: #667781;
  font-weight: 600;
}

td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f0f2f5;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.status-pending { background: #fef3cd; color: #856404; }
.status-sent { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }
.status-no_phone { background: #e8e8e8; color: #666; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #e0e0e0;
}

#page-info {
  font-size: 13px;
  color: #667781;
}

/* Progress */
.progress-bar {
  background: #e0e0e0;
  border-radius: 6px;
  height: 6px;
  margin: 12px 0 6px;
  overflow: hidden;
}

.progress-fill {
  background: #25d366;
  height: 100%;
  width: 0%;
  transition: width 0.3s;
  border-radius: 6px;
}

#send-status {
  font-size: 12px;
  color: #667781;
  text-align: center;
}

/* Token field */
.token-field {
  display: flex;
  gap: 4px;
}

.token-field input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.token-field input:focus {
  border-color: #075e54;
}

.btn-icon {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
}

.token-info {
  font-size: 12px;
  color: #667781;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .two-columns { flex-direction: column; }
  .actions-panel { width: 100%; min-width: unset; }
  .stats-bar { flex-wrap: wrap; }
  .stat { min-width: calc(50% - 8px); }
}
