/* Client Area - Admin */
.ca-wrap { max-width: 1200px; }

.ca-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 0 24px;
}
.ca-page-header h1 { font-size: 24px; margin: 0; }
.ca-page-header p { color: #646970; margin: 4px 0 0; }

.ca-grid { display: grid; gap: 20px; }
.ca-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.ca-card {
  background: #fff;
  border: 1px solid #e2e4e7;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 20px;
}
.ca-card h2 {
  margin: 0 0 16px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px; border-bottom: 1px solid #f0f0f1;
}
.ca-card h2 .dashicons { color: #2271b1; }

.ca-form { display: grid; gap: 14px; }
.ca-form-row { display: grid; gap: 6px; }
.ca-form-row label { font-weight: 600; font-size: 13px; color: #1d2327; }
.ca-form-row input[type="text"],
.ca-form-row input[type="email"],
.ca-form-row input[type="number"],
.ca-form-row select,
.ca-form-row textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid #dcdcde; border-radius: 6px;
  font-size: 14px;
}
.ca-form-row input:focus, .ca-form-row select:focus, .ca-form-row textarea:focus {
  border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; outline: none;
}
.ca-form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ca-form-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.ca-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.ca-btn-primary { background: #2271b1; color: #fff; }
.ca-btn-primary:hover { background: #135e96; color: #fff; }
.ca-btn-danger { background: #d63638; color: #fff; }
.ca-btn-danger:hover { background: #b32d2e; color: #fff; }
.ca-btn-small { padding: 4px 10px; font-size: 12px; }

.ca-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid #e2e4e7; border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ca-table th {
  background: #f6f7f7; text-align: left;
  padding: 12px 14px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px;
  color: #646970; border-bottom: 1px solid #e2e4e7;
}
.ca-table td {
  padding: 12px 14px; font-size: 14px;
  border-bottom: 1px solid #f0f0f1; vertical-align: middle;
}
.ca-table tr:last-child td { border-bottom: none; }
.ca-table tr:hover td { background: #f8f9fa; }

.ca-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
}
.ca-badge-public  { background: #e6f6e6; color: #007017; }
.ca-badge-private { background: #fcf0f1; color: #b32d2e; }
.ca-badge-active  { background: #e6f6e6; color: #007017; }
.ca-badge-inactive{ background: #f0f0f1; color: #646970; }
.ca-badge-info    { background: #e8f0fe; color: #2271b1; }

.ca-actions { display: flex; gap: 6px; }

.ca-section-title {
  font-size: 18px; font-weight: 600;
  margin: 32px 0 14px; display: flex; align-items: center; gap: 8px;
}
.ca-section-title .dashicons { color: #2271b1; }

.ca-empty {
  padding: 40px; text-align: center; color: #646970;
  background: #fff; border: 1px dashed #dcdcde; border-radius: 10px;
}

.ca-file-icon { color: #d63638; font-size: 18px; vertical-align: middle; }
.ca-folder-icon { color: #dba617; font-size: 18px; vertical-align: middle; }

/* Modal */
.ca-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  z-index: 100000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
}
.ca-modal-overlay[hidden] { display: none; }

.ca-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%; max-width: 680px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  animation: ca-modal-in .18s ease-out;
}
@keyframes ca-modal-in {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ca-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #f0f0f1;
}
.ca-modal-header h2 {
  margin: 0; font-size: 17px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.ca-modal-header h2 .dashicons { color: #2271b1; }

.ca-modal-close {
  background: #f0f0f1; border: none; border-radius: 6px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #646970; line-height: 1;
}
.ca-modal-close:hover { background: #e2e4e7; color: #1d2327; }

.ca-modal-body { padding: 22px; }
.ca-modal-footer {
  padding: 16px 22px; border-top: 1px solid #f0f0f1;
  display: flex; gap: 10px; justify-content: flex-end;
}

/* Breadcrumb */
.ca-breadcrumb-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.ca-breadcrumb-bar .ca-breadcrumb { flex: 1; margin-bottom: 0; }
.ca-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  background: #fff; border: 1px solid #e2e4e7; border-radius: 8px;
  padding: 10px 16px; margin-bottom: 18px; font-size: 14px;
}
.ca-breadcrumb a { color: #2271b1; text-decoration: none; }
.ca-breadcrumb a:hover { text-decoration: underline; }
.ca-breadcrumb-sep { color: #a7aaad; }
.ca-breadcrumb-current { font-weight: 600; color: #1d2327; }

/* Botões de ícone */
.ca-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: #f0f0f1; color: #3c434a; text-decoration: none;
  transition: background .15s, color .15s;
}
.ca-icon-btn:hover { background: #e2e4e7; color: #1d2327; }
.ca-icon-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.ca-icon-btn-danger:hover { background: #d63638; color: #fff; }

/* Explorer */
.ca-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.ca-explorer-item {
  background: #fff; border: 1px solid #e2e4e7; border-radius: 10px;
  padding: 18px 10px 12px; text-align: center;
  transition: border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.ca-explorer-item:hover {
  border-color: #8c8f94;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ca-explorer-link {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: #1d2327; cursor: pointer;
}
.ca-explorer-name {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  word-break: break-word;
  display: flex; align-items: center; gap: 4px; justify-content: center;
}
.ca-explorer-meta { font-size: 11px; color: #787c82; }
.ca-explorer-actions { display: flex; gap: 4px; justify-content: center; }
.ca-restricted { font-size: 14px; width: 14px; height: 14px; color: #787c82; }

/* Painel de permissões */
.ca-perm-panel {
  border: 1px solid #dcdcde; border-radius: 8px; overflow: hidden;
}
.ca-perm-search { border-bottom: 1px solid #e2e4e7; background: #f6f7f7; }
.ca-perm-search input {
  width: 100%; border: none !important; background: transparent !important;
  padding: 10px 12px; box-shadow: none !important;
}
.ca-perm-search input:focus { outline: none; }
.ca-perm-list { max-height: 220px; overflow-y: auto; padding: 6px; }
.ca-perm-list label {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 400;
}
.ca-perm-list label:hover { background: #f0f0f1; }

/* Dashboard - tom sóbrio */
.ca-stat {
  background: #fff; border: 1px solid #e2e4e7; border-radius: 10px;
  padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ca-stat-label {
  font-size: 11px; color: #787c82;
  text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
}
.ca-stat-body { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.ca-stat-value { font-size: 32px; font-weight: 600; color: #1d2327; line-height: 1; }
.ca-stat-icon { color: #a7aaad; font-size: 26px; width: 26px; height: 26px; }

/* Listas recentes */
.ca-recent-list { list-style: none; margin: 0; padding: 0; }
.ca-recent-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f0f0f1;
}
.ca-recent-list li:last-child { border-bottom: none; }
.ca-recent-list div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ca-recent-list strong { font-size: 13px; color: #1d2327; }
.ca-recent-list span { font-size: 12px; color: #787c82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-recent-list time { font-size: 12px; color: #a7aaad; flex-shrink: 0; }

/* Info box */
.ca-info-box {
  display: flex; align-items: flex-start; gap: 8px;
  background: #f6f7f7; border: 1px solid #e2e4e7; border-radius: 8px;
  padding: 12px; font-size: 13px; color: #3c434a;
}
.ca-info-box .dashicons { color: #787c82; flex-shrink: 0; }

/* Switch */
.ca-switch {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 6px 0; user-select: none;
}
.ca-switch input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.ca-switch-track {
  position: relative; flex-shrink: 0;
  width: 42px; height: 24px;
  background: #c3c4c7; border-radius: 999px;
  transition: background .2s;
}
.ca-switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.ca-switch input[type="checkbox"]:checked + .ca-switch-track { background: #2271b1; }
.ca-switch input[type="checkbox"]:checked + .ca-switch-track::after { transform: translateX(18px); }
.ca-switch input[type="checkbox"]:focus + .ca-switch-track { box-shadow: 0 0 0 2px rgba(34,113,177,.35); }
.ca-switch-label { font-size: 13px; font-weight: 400; color: #3c434a; }

/* Grupo de canais (checkboxes) */
.ca-channel-group { display: flex; gap: 16px; flex-wrap: wrap; }
.ca-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 400; cursor: pointer;
  padding: 6px 0;
}
.ca-check .dashicons { color: #787c82; font-size: 18px; width: 18px; height: 18px; }
