/* Agencies & Agents Styles */

.agency-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.agency-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.agency-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #bee3f8;
}

.agency-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.agency-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a365d;
  line-height: 1.3;
}

.agency-card-code {
  font-size: 12px;
  font-family: monospace;
  color: #718096;
  margin-top: 2px;
}

.agency-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.agency-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4a5568;
}

.agency-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #718096;
}

/* Agency detail modal grid */
.agency-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 4px;
  font-weight: 600;
}

/* Agent rows in detail modal */
.agent-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.agent-row-info {
  flex: 1;
  min-width: 0;
}

.agent-row-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #4a5568;
  white-space: nowrap;
}

.agent-row-actions {
  flex-shrink: 0;
}

.role-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e0e7ff;
  color: #3730a3;
  margin-left: 4px;
}

/* Danger button */
.btn-danger {
  background: #e53e3e;
  color: #fff;
  border: none;
}
.btn-danger:hover {
  background: #c53030;
}

/* Responsive */
@media (max-width: 768px) {
  .agency-cards-grid {
    grid-template-columns: 1fr;
  }
  .agency-detail-grid {
    grid-template-columns: 1fr;
  }
  .agent-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── OpsDrawer-scoped styles (WI-196) ──────────────────────────────── */

/* Info grid reused across Agency Info + Branded Links tabs.
   Mirrors the Profiles drawer Personal Information 2-column layout. */
.agency-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.agency-info-grid .detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 4px;
  font-weight: 600;
  display: block;
}

/* Agents / bookings / comms tables inside the drawer */
.agents-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.agents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.agents-table th,
.agents-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
}

.agents-table thead th {
  background: #f7fafc;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  color: #4a5568;
  letter-spacing: 0.03em;
}

.agents-table tbody tr:hover {
  background: #f7fafc;
}

.agents-table tbody tr:last-child td {
  border-bottom: none;
}

.text-muted {
  color: #718096;
}

/* Resources tab placeholder grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.resource-placeholder-card {
  background: #f7fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.resource-placeholder-card .resource-icon {
  font-size: 32px;
  color: #a0aec0;
  display: block;
  margin-bottom: 8px;
}

.resource-placeholder-card .resource-title {
  font-weight: 600;
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 4px;
}

.resource-placeholder-card .resource-desc {
  font-size: 12px;
  color: #718096;
  line-height: 1.4;
}

.resource-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 8px;
  background: #e2e8f0;
  color: #4a5568;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Branded Links form */
.brand-profile-form textarea.form-input {
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

/* Drawer status-badge fallback (page already loads status styles via
   booking-links.css; this is a safety net so badges always render). */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #4a5568;
}
.status-badge.status-active,
.status-badge.active { background: #c6f6d5; color: #22543d; }
.status-badge.status-suspended,
.status-badge.status-inactive,
.status-badge.inactive { background: #fed7d7; color: #742a2a; }
.status-badge.status-cancelled,
.status-badge.status-canceled { background: #fed7d7; color: #742a2a; }
.status-badge.status-confirmed { background: #bee3f8; color: #2a4365; }

@media (max-width: 640px) {
  .agency-info-grid { grid-template-columns: 1fr; }
}
