/* Client Portal Policy page */

.cpp-page .cpp-body {
  padding: 16px 16px 32px;
}

.cpp-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cpp-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #25b7a7;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.cpp-back svg { width: 16px; height: 16px; }
.cpp-back:hover { background: #1a9e8f; }

.cpp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.cpp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  padding: 8px 18px 22px;
  min-height: 420px;
}

.cpp-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 18px;
}

.cpp-tab {
  border: 0;
  background: transparent;
  padding: 12px 2px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.cpp-tab:hover { color: #0e7490; }
.cpp-tab.is-active {
  color: #25b7a7;
  border-bottom-color: #25b7a7;
}

.cpp-pane[hidden] { display: none !important; }

.cpp-section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #25B7A7;
}

.cpp-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

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

.cpp-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.cpp-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #1e293b;
  vertical-align: middle;
}

.cpp-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cpp-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cpp-icon-btn svg { width: 16px; height: 16px; }
.cpp-icon-btn--view,
.cpp-icon-btn--edit { color: #25B7A7; }
.cpp-icon-btn--del { color: #ef4444; }
.cpp-icon-btn:hover { background: #f1f5f9; }

.cpp-editor {
  padding-top: 4px;
}

.cpp-form-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px 18px;
  align-items: start;
  margin-bottom: 16px;
}

.cpp-form-row label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  padding-top: 10px;
}

.cpp-req { color: #ef4444; }

.cpp-select {
  position: relative;
  max-width: 420px;
}

.cpp-select__input {
  width: 100%;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 34px 0 12px;
  font: inherit;
  font-size: 13px;
  color: #64748b;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
}

.cpp-select.is-open .cpp-select__input,
.cpp-select__input:focus {
  outline: none;
  border-color: #25b7a7;
  box-shadow: 0 0 0 2px rgba(37, 183, 167, .2);
}

.cpp-select__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e6edf2;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  z-index: 20;
  display: none;
  max-height: 220px;
  overflow: auto;
}

.cpp-select.is-open .cpp-select__menu { display: block; }

.cpp-select__item {
  padding: 6px 12px;
  font-size: 13px;
  color: #1f2933;
  cursor: pointer;
}

.cpp-select__item:hover,
.cpp-select__item.is-active { background: #e8f8f6; }

.cpp-form-row--editor { align-items: start; }

.cpp-richtext {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cpp-richtext__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.cpp-rt-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.cpp-rt-btn:hover { background: #e2e8f0; }

.cpp-rt-select {
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  color: #475569;
  background: #fff;
}

.cpp-richtext__body {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #1e293b;
}

.cpp-richtext__body:focus { outline: none; }
.cpp-richtext__body h3 { margin: 0 0 10px; font-size: 16px; }
.cpp-richtext__body p { margin: 0 0 10px; }
.cpp-richtext__body strong { font-weight: 700; }

.cpp-richtext__foot {
  display: flex;
  justify-content: flex-end;
  padding: 6px 10px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #94a3b8;
  background: #fafbfc;
}

.cpp-form-actions {
  display: flex;
  gap: 10px;
  padding-left: 158px;
  margin-top: 8px;
}

.cpp-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.cpp-btn--save {
  background: #25B7A7;
  color: #fff;
}

.cpp-btn--save:hover { background: #1a9e8f; }

.cpp-btn--reset {
  background: #fff;
  color: #475569;
  border: 1px solid #d1d5db;
}

.cpp-btn--reset:hover { border-color: #94a3b8; }

.cpp-access-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.cpp-access-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.cpp-access-list li:last-child { border-bottom: 0; }

.cpp-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cpp-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cpp-toggle span {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cfd6dc;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}

.cpp-toggle span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .2s;
}

.cpp-toggle input:checked + span { background: #25B7A7; }
.cpp-toggle input:checked + span::after { transform: translateX(18px); }

.cpp-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cpp-toast {
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .25);
  font-size: 13px;
}

.cpp-toast strong {
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 700px) {
  .cpp-form-row { grid-template-columns: 1fr; }
  .cpp-form-row label { padding-top: 0; }
  .cpp-form-actions { padding-left: 0; flex-wrap: wrap; }
}
