/**************************************
 * PsychCura – Client Portal
 * - Auth (login) styles
 * - Client dashboard styles
 **************************************/

:root {
  --pc-primary: #15b9d9;      /* PsychCura primary */
  --pc-primary-dark: #0ea5e9; /* Slightly deeper for hover */
  --pc-bg: #f4f7fb;
  --pc-text: #1f2933;
  --pc-muted: #6c7480;
  --pc-card-bg: #ffffff;
  --pc-sidebar-bg: #ffffff;
  --pc-header-bg: #15b9d9;
  --pc-border: #e5e7eb;
}

/* Base reset (shared) */
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  color: var(--pc-text);
}

/* ====================================
   AUTH / LOGIN PAGE
   body has class .pc-auth-page
==================================== */

.pc-auth-page {
  background: linear-gradient(135deg, var(--pc-primary-dark), var(--pc-primary));
  min-height: 100vh;
}

/* Outer wrapper centers card */
.pc-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Card */
.pc-auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.pc-auth-inner {
  padding: 2.4rem 2.2rem 2.2rem;
}

/* Logo row */
.pc-auth-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.pc-auth-logo img {
  height: 52px;
  width: auto;
}

.pc-auth-logo span {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
}

/* Small chip under logo */
.pc-chip {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(21, 185, 217, 0.09);
  color: var(--pc-muted);
  font-size: 0.75rem;
  margin-bottom: 0.9rem;
}

/* Title + subtitle */
.pc-auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.pc-auth-subtitle {
  font-size: 0.9rem;
  color: var(--pc-muted);
  margin-bottom: 1.4rem;
}

/* Alerts */
.pc-alert {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.pc-alert-error {
  background: #fee2e2;
  color: #b91c1c;
}

.pc-alert-success {
  background: #dcfce7;
  color: #166534;
}

.d-none {
  display: none !important;
}

/* Form groups / labels / inputs (shared with dashboard) */
.pc-form-group {
  margin-bottom: 0.95rem;
}

.pc-form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--pc-text);
}

.pc-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.pc-input:focus {
  border-color: var(--pc-primary);
  box-shadow: 0 0 0 1px rgba(21, 185, 217, 0.4);
  background-color: #f9feff;
}

/* Login footer row (forgot PIN, hint) */
.pc-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 0.15rem;
}

.pc-link-muted {
  font-size: 0.78rem;
  color: var(--pc-muted);
}

.pc-link-button {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--pc-primary);
  font-weight: 600;
  cursor: pointer;
}

/* Primary button (shared) */
.pc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: var(--pc-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease,
    transform 0.05s ease;
}

.pc-btn-primary:hover {
  background: var(--pc-primary-dark);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

.pc-btn-primary:active {
  transform: translateY(1px);
}

/* Login card footer */
.pc-auth-footer {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.pc-auth-footer a {
  color: var(--pc-primary-dark);
  text-decoration: none;
}

.pc-auth-footer a:hover {
  text-decoration: underline;
}

/* ====================================
   DASHBOARD (dashboard.html)
==================================== */

body:not(.pc-auth-page) {
  background: var(--pc-bg);
}

/* Top banner header bar */
.pc-portal-header {
  background: var(--pc-primary);
  padding: 1.6rem 1.5rem;
  color: #ffffff;
}

.pc-portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pc-portal-user-block {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.pc-portal-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.pc-portal-user-meta {
  display: flex;
  flex-direction: column;
}

.pc-portal-user-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.pc-portal-user-handle {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Header action button */
.pc-btn-header {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: var(--pc-primary-dark);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background-color 0.12s ease;
}

.pc-btn-header:hover {
  background: #f0fdff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
}

/* Main 2-column layout */
.pc-portal-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Sidebar */
.pc-portal-sidebar {
  width: 260px;
  background: var(--pc-sidebar-bg);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1.2rem 1rem;
  height: fit-content;
  position: sticky;
  top: 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.pc-portal-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pc-portal-nav-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pc-muted);
  margin: 0.4rem 0 0.35rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pc-portal-nav-link {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--pc-text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.05s ease;
}

.pc-portal-nav-link span:last-child {
  flex: 1;
}

/* Icon circle */
.pc-portal-nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  font-size: 0.95rem;
}

.pc-portal-nav-icon i {
  line-height: 1;
}

.pc-portal-nav-link:hover {
  background: rgba(21, 185, 217, 0.08);
}

.pc-portal-nav-link.active {
  background: var(--pc-primary);
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(21, 185, 217, 0.38);
  transform: translateY(1px);
}

.pc-portal-nav-link.active .pc-portal-nav-icon {
  background: rgba(255, 255, 255, 0.18);
}

.pc-portal-nav-link.active .pc-portal-nav-icon i {
  color: #ffffff;
}

.pc-portal-nav-danger {
  color: #b91c1c;
}

.pc-portal-nav-danger .pc-portal-nav-icon {
  background: rgba(220, 38, 38, 0.10);
}

.pc-portal-nav-danger.active {
  background: #ef4444;
}

/* Content column */
.pc-portal-content {
  flex: 1;
}

/* Sections */
.pc-portal-section {
  display: none;
}

.pc-portal-section.is-active {
  display: block;
}

/* Cards */
.pc-card {
  background: var(--pc-card-bg);
  border-radius: 16px;
  border: 1px solid var(--pc-border);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

.pc-card-lg {
  padding: 1.6rem 1.8rem;
}

.pc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.pc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.pc-card-sub {
  font-size: 0.9rem;
  color: var(--pc-muted);
}

/* Mini stats cards */
.pc-mini-card {
  border-radius: 12px;
  border: 1px solid var(--pc-border);
  padding: 0.7rem 0.9rem;
  background: #f9fafb;
}

/* Quick Action / Support pill buttons */
.pc-mini-card-action {
  background: #f9fafb;
}

.pc-quick-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease,
    color 0.15s ease;
}

.pc-quick-btn:active {
  transform: translateY(1px);
}

/* Primary CTA (Book New Appointment) */
.pc-quick-btn-primary {
  background: var(--pc-primary);
  border-color: var(--pc-primary);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(21, 185, 217, 0.35);
}

.pc-quick-btn-primary:hover {
  background: var(--pc-primary-dark);
  border-color: var(--pc-primary-dark);
}

/* Ghost / outline style (Contact Support) */
.pc-quick-btn-ghost {
  background: #ffffff;
  color: var(--pc-text);
}

.pc-quick-btn-ghost:hover {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

/* Icon bubble */
.pc-quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  font-size: 1rem;
}

.pc-quick-btn-ghost .pc-quick-icon {
  background: rgba(21, 185, 217, 0.06);
}

.pc-quick-icon i {
  line-height: 1;
  color: var(--pc-primary);
}

.pc-quick-btn-primary .pc-quick-icon i {
  color: var(--pc-primary-dark);
}

/* Text stack inside the pill */
.pc-quick-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pc-quick-title {
  line-height: 1.2;
}

.pc-quick-sub {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--pc-muted);
}

.pc-mini-card-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--pc-muted);
  margin-bottom: 0.15rem;
}

.pc-mini-card-value {
  font-size: 1.05rem;
  font-weight: 600;
}

/* Avatar in overview/profile */
.pc-profile-avatar-lg img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 4px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

/* Overview card subtle polish */
#pcSectionOverview .pc-card-lg {
  position: relative;
  overflow: hidden;
}

#pcSectionOverview .pc-card-lg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
      rgba(21, 185, 217, 0.10),
      transparent 55%);
  pointer-events: none;
}

#pcSectionOverview .pc-card-header {
  position: relative;
  z-index: 1;
}

#pcSectionOverview .pc-card-title {
  font-size: 1.35rem;
}

#pcSectionOverview .pc-card-sub {
  max-width: 540px;
}

/* Keep inner content above gradient */
#pcSectionOverview .row.g-3 {
  position: relative;
  z-index: 1;
}

/* Fix spacing under user info block */
#pcSectionOverview .pc-profile-info {
  margin-bottom: 12px;
}

/* Overview: align avatar + info to the top so it doesn't clash with Quick Action */
#pcSectionOverview .col-lg-4.d-flex {
  align-items: flex-start !important;
}

#pcSectionOverview .col-lg-8 .row {
  align-items: flex-start !important;
}

.pc-mini-card-action {
  min-height: 92px;  /* adjust if needed */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.pc-quick-btn {
  margin-top: 6px;
}

#pcSectionOverview .col-lg-4 {
  padding-bottom: 10px;
}

/* Appointment lists */
.pc-apt-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.pc-apt-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--pc-border);
  font-size: 0.92rem;
}

.pc-apt-item:last-child {
  border-bottom: none;
}

.pc-apt-meta {
  font-size: 0.8rem;
  color: var(--pc-muted);
}

/* Tabs inside Sessions */
.pc-subtabs .nav-link {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--pc-text);
  border: 1px solid transparent;
  margin-right: 0.3rem;
}

.pc-subtabs .nav-link:hover {
  border-color: rgba(21, 185, 217, 0.4);
  background: rgba(21, 185, 217, 0.06);
}

.pc-subtabs .nav-link.active {
  background: var(--pc-primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* Pagination wrap for lists */
.pc-pagination-wrap {
  margin-top: 0.75rem;
}

/* Booking overlay */
.pc-booking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}

.pc-booking-spinner {
  background: #ffffff;
  padding: 1rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

/* Form helper text alignment */
.form-text.small {
  font-size: 0.8rem;
}

/* Responsive tweaks */
@media (max-width: 992px) {
  .pc-portal-main {
    flex-direction: column;
    padding: 1rem;
  }

  .pc-portal-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .pc-portal-nav-section-label {
    width: 100%;
    margin-left: 0.2rem;
  }

  .pc-portal-nav-link {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .pc-portal-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pc-btn-header {
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .pc-auth-inner {
    padding: 2rem 1.4rem 1.7rem;
  }

  .pc-portal-main {
    padding: 0.9rem;
  }

  .pc-card,
  .pc-card-lg {
    padding: 1.3rem 1.2rem;
  }
}

.pc-logo-link img {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pc-logo-link img:hover {
  transform: scale(1.03);
}

.copy-mrn-icon {
  font-size: 1rem;
  cursor: pointer;
  color: #15b9d9;
  transition: 0.2s ease;
}

.copy-mrn-icon:hover {
  color: #0e8ca7;
  transform: scale(1.15);
}

/* ---- Minimal Portal Toast ---- */
.pc-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(10px);
  background: #222b45;
  color: #ffffff;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(15, 32, 67, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.pc-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}