/* ==========================================
   Wealth Client Portal — Frontend Styles
   ========================================== */

.wcp-portal,
.wcp-login-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1d2327;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Card wrapper — gives portal proper background when embedded in dark themes */
.wcp-portal {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  margin-top: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ----- LOGIN ----- */
.wcp-login-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
}

.wcp-login-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(10, 24, 48, 0.08);
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.wcp-login-header {
  text-align: center;
  margin-bottom: 28px;
}
.wcp-login-header h2 {
  margin: 0 0 8px;
  color: #0a1830;
  font-size: 24px;
  font-weight: 700;
}
.wcp-login-header p {
  margin: 0;
  color: #646970;
  font-size: 14px;
}

.wcp-login-form label {
  display: block;
  margin-bottom: 16px;
}
.wcp-login-form label span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 6px;
}
.wcp-login-form input[type="text"],
.wcp-login-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}
.wcp-login-form input:focus {
  outline: none;
  border-color: #d4a142;
  box-shadow: 0 0 0 2px rgba(212, 161, 66, 0.15);
}

.wcp-btn-primary {
  width: 100%;
  background: #d4a142;
  color: #0a1830;
  border: none;
  padding: 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.wcp-btn-primary:hover { background: #e8b85a; }

.wcp-btn-outline {
  display: inline-block;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #c3c4c7;
  color: #1d2327;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.wcp-btn-outline:hover {
  background: #f0f0f1;
  color: #1d2327;
}

.wcp-help-text {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
}

.wcp-message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}
.wcp-message-error {
  background: #fcf0f1;
  border: 1px solid #d63638;
  color: #d63638;
}

/* ----- DASHBOARD ----- */
.wcp-portal {
  /* padding moved to top-level wrapper */
}

.wcp-portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
  flex-wrap: wrap;
  gap: 16px;
}
.wcp-portal-header h1 {
  margin: 0 0 4px;
  color: #0a1830;
  font-size: 28px;
  font-weight: 700;
}
.wcp-subtitle {
  margin: 0;
  color: #646970;
  font-size: 14px;
}

.wcp-admin-bar {
  background: #fff4d9;
  border: 1px solid #dba617;
  color: #1d2327;
  padding: 14px 18px;
  margin-bottom: 28px;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.wcp-admin-bar strong {
  color: #1d2327;
  font-weight: 600;
}
.wcp-admin-bar select {
  padding: 6px 10px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #1d2327;
  min-width: 200px;
}
.wcp-admin-bar a {
  color: #d63638;
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
}
.wcp-admin-bar a:hover {
  text-decoration: underline;
}

.wcp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.wcp-stat-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 24px;
  text-align: center;
}
.wcp-stat-card.wcp-stat-warning { border-left: 4px solid #dba617; }
.wcp-stat-card.wcp-stat-danger { border-left: 4px solid #d63638; }

.wcp-stat-num {
  font-size: 36px;
  font-weight: 700;
  color: #0a1830;
  line-height: 1;
  margin-bottom: 6px;
}
.wcp-stat-card.wcp-stat-danger .wcp-stat-num { color: #d63638; }
.wcp-stat-card.wcp-stat-warning .wcp-stat-num { color: #dba617; }

.wcp-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #646970;
}

.wcp-portal h2 {
  color: #0a1830;
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 16px;
}

.wcp-empty {
  background: #f6f7f7;
  border: 1px dashed #c3c4c7;
  border-radius: 6px;
  padding: 40px;
  text-align: center;
  color: #646970;
}

.wcp-inspections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wcp-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 20px 24px;
  border-left: 4px solid #c3c4c7;
}
.wcp-card-overdue { border-left-color: #d63638; background: #fcfafa; }
.wcp-card-soon { border-left-color: #dba617; background: #fffdf5; }
.wcp-card-upcoming { border-left-color: #2271b1; }
.wcp-card-ok { border-left-color: #00a32a; }

.wcp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f1;
  flex-wrap: wrap;
}
.wcp-card-header h3 {
  margin: 4px 0;
  color: #0a1830;
  font-size: 17px;
  font-weight: 600;
}
.wcp-card-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #d4a142;
  font-weight: 600;
}
.wcp-card-meta {
  font-size: 13px;
  color: #646970;
  margin-top: 4px;
}

.wcp-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wcp-badge-overdue { background: #fcf0f1; color: #d63638; }
.wcp-badge-soon { background: #fcf9e8; color: #b9881a; }
.wcp-badge-upcoming { background: #e8f0fa; color: #2271b1; }
.wcp-badge-ok { background: #edf7ed; color: #00a32a; }

.wcp-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 14px;
  color: #1d2327;
  margin-bottom: 12px;
}
.wcp-dates strong { color: #646970; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 4px; }

.wcp-notes {
  background: #f6f7f7;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #50575e;
  margin: 12px 0;
}

.wcp-files {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f1;
  font-size: 14px;
}
.wcp-files strong { display: block; margin-bottom: 8px; color: #646970; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.wcp-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #0a1830;
  color: #ffffff !important;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  margin: 4px 6px 0 0;
  transition: background 0.2s;
}
.wcp-file-link:hover {
  background: #d4a142;
  color: #0a1830 !important;
}

.wcp-portal-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  color: #646970;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .wcp-stats { grid-template-columns: 1fr; }
  .wcp-dates { grid-template-columns: 1fr; }
  .wcp-portal-header { flex-direction: column; align-items: flex-start; }
}
