/* ============================================================
   PCRT Customer Portal — UI v1.3
   Brand: Inter · Navy #1a3a6c · Orange #e84c0e
   ============================================================ */

:root {
  --p-navy:      #1a3a6c;
  --p-navy-dk:   #0f1f3d;
  --p-navy-lt:   #e8edf5;
  --p-orange:    #e84c0e;
  --p-orange-lt: #fef0ea;
  --p-green:     #16a34a;
  --p-green-lt:  #dcfce7;
  --p-red:       #dc2626;
  --p-red-lt:    #fee2e2;
  --p-text:      #1e2532;
  --p-muted:     #5a6577;
  --p-border:    #e2e8f0;
  --p-bg:        #f7f9fc;
  --p-white:     #ffffff;
  --p-radius:    10px;
  --p-shadow:    0 1px 8px rgba(26,58,108,.09);
  --p-shadow-md: 0 4px 20px rgba(26,58,108,.13);
}

/* ============================================================
   Page-level reset (applied via JS when our portal takes over)
   ============================================================ */
body.pcrt-page-active {
  background: #f7f9fc !important;
  display: block !important;
  min-height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================================
   Landing Page (logged-out)
   ============================================================ */
.pcrt-landing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
}

/* Left — brand & marketing */
.pcrt-landing__left {
  background: linear-gradient(150deg, #0f1f3d 0%, #1a3a6c 55%, #1d4a8a 100%);
  color: #fff;
  padding: 3rem 2.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Decorative circles — use actual pseudo-elements on a wrapper so we can control z-index */
.pcrt-landing__left::before,
.pcrt-landing__left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
  z-index: 0;
}
.pcrt-landing__left::before { width: 340px; height: 340px; top: -100px; right: -100px; }
.pcrt-landing__left::after  { width: 220px; height: 220px; bottom: -70px; right: 40px; }

.pcrt-landing__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.pcrt-landing__logo-icon {
  width: 50px;
  height: 50px;
  background: var(--p-orange);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(232,76,14,.45);
}

.pcrt-landing__biz-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.pcrt-landing__portal-tag {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.55);
}

.pcrt-landing__headline {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin: 0;
  position: relative;
}

.pcrt-landing__tagline {
  font-size: .95rem;
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  margin: 0;
  position: relative;
}

.pcrt-landing__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  position: relative;
}

.pcrt-landing__features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
}

.pcrt-landing__features li::before {
  content: '\2713';
  width: 22px;
  height: 22px;
  background: rgba(232,76,14,.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.pcrt-landing__back-link {
  margin-top: auto;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .15s;
  position: relative;
}
.pcrt-landing__back-link:hover { color: rgba(255,255,255,.8); }

/* Right — login form */
.pcrt-landing__right {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.75rem;
}

/* ============================================================
   Login Box (inside .pcrt-landing__right)
   ============================================================ */
.pcrt-login-box {
  width: 100%;
  max-width: 340px;
}

.pcrt-login-box__title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--p-navy);
  margin: 0 0 .3rem;
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
}

.pcrt-login-box__sub {
  font-size: .88rem;
  color: var(--p-muted);
  margin: 0 0 1.6rem;
}

.pcrt-login-box__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .4rem;
}

.pcrt-login-box__remember {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--p-muted);
  cursor: pointer;
  user-select: none;
}

.pcrt-login-box__forgot {
  font-size: .82rem;
  color: var(--p-navy);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.pcrt-login-box__forgot:hover { color: var(--p-orange); }

.pcrt-login-box__divider {
  height: 1px;
  background: var(--p-border);
  margin: 1.4rem 0 1rem;
}

.pcrt-login-box__footer {
  font-size: .82rem;
  color: var(--p-muted);
  text-align: center;
  margin: 0;
}
.pcrt-login-box__footer a {
  color: var(--p-navy);
  font-weight: 600;
  text-decoration: none;
}
.pcrt-login-box__footer a:hover { color: var(--p-orange); }

/* Block button for login */
.pcrt-btn--block {
  width: 100%;
  justify-content: center;
  padding: .75rem 1rem;
  font-size: .95rem;
}

/* ============================================================
   Portal wrapper (logged-in)
   ============================================================ */
.pcrt-portal {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--p-text);
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  box-sizing: border-box;
}

/* ============================================================
   Welcome bar
   ============================================================ */
.pcrt-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.pcrt-welcome-bar__greeting {
  font-size: .9rem;
  color: var(--p-muted);
  margin-right: .3rem;
}

.pcrt-welcome-bar__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--p-navy);
}

.pcrt-signout-btn {
  font-size: .8rem;
  font-family: inherit;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 6px;
  border: 1.5px solid var(--p-border);
  background: transparent;
  color: var(--p-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pcrt-signout-btn:hover {
  background: var(--p-red-lt);
  border-color: #fca5a5;
  color: var(--p-red);
}

/* ============================================================
   KPI Cards
   ============================================================ */
.pcrt-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.pcrt-kpi {
  border-radius: var(--p-radius);
  padding: 1.25rem 1.4rem;
  position: relative;
  overflow: hidden;
}

.pcrt-kpi::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: .12;
  transform: translate(25px,-25px);
  background: currentColor;
}

.pcrt-kpi--navy  { background: var(--p-navy);  color: var(--p-white); }
.pcrt-kpi--orange{ background: var(--p-orange); color: var(--p-white); }
.pcrt-kpi--green { background: var(--p-green);  color: var(--p-white); }
.pcrt-kpi--red   { background: var(--p-red);    color: var(--p-white); }

.pcrt-kpi__num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .4rem;
}

.pcrt-kpi__label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .85;
}

/* ============================================================
   Tabs
   ============================================================ */
.pcrt-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--p-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.pcrt-tab {
  display: inline-block;
  padding: .65rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--p-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.pcrt-tab:hover { color: var(--p-navy); }
.pcrt-tab--active {
  color: var(--p-navy);
  border-bottom-color: var(--p-orange);
}

/* ============================================================
   Work Order Cards
   ============================================================ */
.pcrt-wo-grid { display: grid; gap: .75rem; }

.pcrt-wo-card {
  background: var(--p-white);
  border: 1px solid var(--p-border);
  border-left: 4px solid var(--p-navy);
  border-radius: var(--p-radius);
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--p-shadow);
  transition: box-shadow .15s, transform .12s, border-left-color .15s;
}
.pcrt-wo-card:hover {
  box-shadow: var(--p-shadow-md);
  transform: translateY(-1px);
  border-left-color: var(--p-orange);
}

.pcrt-wo-card[data-status*="complete"],
.pcrt-wo-card[data-status*="done"]     { border-left-color: var(--p-green); }
.pcrt-wo-card[data-status*="ready"]    { border-left-color: #2563eb; }
.pcrt-wo-card[data-status*="progress"] { border-left-color: var(--p-orange); }
.pcrt-wo-card[data-status*="wait"],
.pcrt-wo-card[data-status*="hold"]     { border-left-color: var(--p-red); }

.pcrt-wo-card__body { flex: 1; min-width: 0; }

.pcrt-wo-card__title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--p-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .2rem;
}

.pcrt-wo-card__meta {
  font-size: .78rem;
  color: var(--p-muted);
  display: flex;
  gap: .75rem;
}

.pcrt-wo-card__right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* ============================================================
   Status Badges
   ============================================================ */
.pcrt-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pcrt-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
  flex-shrink: 0;
}

.pcrt-badge--complete,
.pcrt-badge--completed,
.pcrt-badge--done            { background:#d1fae5; color:#065f46; }
.pcrt-badge--ready,
.pcrt-badge--ready-for-pickup{ background:#dbeafe; color:#1e40af; }
.pcrt-badge--in-progress,
.pcrt-badge--in-repair       { background:#fef3c7; color:#92400e; }
.pcrt-badge--waiting,
.pcrt-badge--on-hold,
.pcrt-badge--waiting-for-parts{ background:#ffe4e6; color:#9f1239; }
.pcrt-badge--new,
.pcrt-badge--open            { background:#ede9fe; color:#5b21b6; }
.pcrt-badge--paid            { background:#d1fae5; color:#065f46; }
.pcrt-badge--unpaid          { background:#fef3c7; color:#92400e; }
.pcrt-badge--void            { background:#f3f4f6; color:#6b7280; }
.pcrt-badge--unknown         { background:#f3f4f6; color:#6b7280; }

/* ============================================================
   Work Order Detail
   ============================================================ */
.pcrt-back { font-size: .875rem; margin-bottom: 1.1rem; }
.pcrt-back a {
  color: var(--p-navy); text-decoration: none;
  font-weight: 500; display: inline-flex; align-items: center; gap: .3rem;
}
.pcrt-back a:hover { color: var(--p-orange); }

.pcrt-detail-card {
  background: var(--p-white);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  overflow: hidden;
  box-shadow: var(--p-shadow);
  margin-bottom: 1.5rem;
}

.pcrt-detail-card__head {
  background: var(--p-navy);
  color: var(--p-white);
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.pcrt-detail-card__head h3 {
  margin: 0; font-size: 1rem; font-weight: 700; color: inherit;
}

.pcrt-detail-card__body { padding: .25rem 0; }

.pcrt-detail-row {
  display: flex;
  gap: 1rem;
  padding: .65rem 1.25rem;
  border-bottom: 1px solid var(--p-border);
  font-size: .9rem;
}
.pcrt-detail-row:last-child { border-bottom: none; }

.pcrt-detail-row__lbl {
  width: 110px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--p-muted);
  padding-top: .1rem;
}
.pcrt-detail-row__val { flex: 1; line-height: 1.55; }

/* Notes */
.pcrt-notes-heading {
  font-size: .88rem;
  font-weight: 700;
  color: var(--p-navy);
  margin: 1.4rem 0 .75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.pcrt-notes-heading::after { content:''; flex:1; height:1px; background:var(--p-border); }

.pcrt-note {
  background: var(--p-bg);
  border-left: 3px solid var(--p-orange);
  border-radius: 0 var(--p-radius) var(--p-radius) 0;
  padding: .75rem 1rem;
  margin-bottom: .6rem;
}
.pcrt-note__meta { font-size: .75rem; color: var(--p-muted); margin-bottom: .3rem; }
.pcrt-note__body { font-size: .9rem; line-height: 1.6; }

/* ============================================================
   Invoice Table
   ============================================================ */
.pcrt-table-wrap {
  background: var(--p-white);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  overflow: hidden;
}

.pcrt-table { width: 100%; border-collapse: collapse; font-size: .88rem; }

.pcrt-table thead th {
  background: var(--p-navy);
  color: rgba(255,255,255,.82);
  text-align: left;
  padding: .65rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
}

.pcrt-table tbody tr { transition: background .1s; }
.pcrt-table tbody tr:hover { background: var(--p-bg); }
.pcrt-table tbody td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--p-border);
  vertical-align: middle;
}
.pcrt-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   Forms
   ============================================================ */
.pcrt-form-card {
  background: var(--p-white);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: 1.6rem;
  max-width: 520px;
}
.pcrt-form-card h3 {
  margin: 0 0 .35rem;
  color: var(--p-navy);
  font-size: 1.05rem;
  font-weight: 700;
}
.pcrt-form-card > p {
  color: var(--p-muted);
  font-size: .88rem;
  margin: 0 0 1.25rem;
}

.pcrt-field { margin-bottom: .9rem; }

.pcrt-field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--p-muted);
  margin-bottom: .35rem;
}

.pcrt-field input[type="text"],
.pcrt-field input[type="email"],
.pcrt-field input[type="tel"],
.pcrt-field textarea {
  width: 100%;
  padding: .55rem .8rem;
  border: 1.5px solid var(--p-border);
  border-radius: 7px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--p-text);
  background: var(--p-white);
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.pcrt-field textarea { resize: vertical; min-height: 100px; }
.pcrt-field input:focus,
.pcrt-field textarea:focus {
  outline: none;
  border-color: var(--p-navy);
  box-shadow: 0 0 0 3px rgba(26,58,108,.1);
}

/* Landing page uses same .pcrt-field but needs dark border on white bg */
.pcrt-login-box .pcrt-field input[type="text"],
.pcrt-login-box .pcrt-field input[type="email"],
.pcrt-login-box .pcrt-field input[type="password"] {
  border-color: #d1d9e6;
  background: #f8fafc;
}
.pcrt-login-box .pcrt-field input:focus {
  background: #fff;
  border-color: var(--p-navy);
}

.pcrt-help-text { font-size: .82rem; color: var(--p-muted); margin-top: .75rem; }

/* ============================================================
   Buttons
   ============================================================ */
.pcrt-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1.1rem;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--p-navy);
  background: transparent;
  color: var(--p-navy);
  transition: background .15s, color .15s, transform .1s;
}
.pcrt-btn:hover {
  background: var(--p-navy);
  color: var(--p-white);
  transform: translateY(-1px);
}

.pcrt-btn--primary {
  background: var(--p-orange);
  border-color: var(--p-orange);
  color: var(--p-white);
}
.pcrt-btn--primary:hover {
  background: #c93d07;
  border-color: #c93d07;
  color: var(--p-white);
}
.pcrt-btn--sm { padding: .3rem .75rem; font-size: .78rem; border-radius: 5px; }

/* ============================================================
   Notices
   ============================================================ */
.pcrt-notice {
  padding: .7rem .95rem;
  border-radius: 7px;
  font-size: .88rem;
  margin-bottom: 1rem;
}
.pcrt-notice--error   { background:#fef2f2; color:#991b1b; border-left:3px solid #ef4444; }
.pcrt-notice--success { background:#f0fdf4; color:#166534; border-left:3px solid #22c55e; }
.pcrt-notice--info    { background:#eff6ff; color:#1e40af; border-left:3px solid #3b82f6; }

.pcrt-empty {
  color: var(--p-muted);
  font-style: italic;
  padding: 2rem;
  text-align: center;
  background: var(--p-bg);
  border-radius: var(--p-radius);
  border: 1px dashed var(--p-border);
}

.pcrt-error {
  color:#991b1b; background:#fef2f2;
  padding:.7rem 1rem; border-radius:7px;
  border-left:3px solid #ef4444; font-size:.88rem;
}

/* ============================================================
   Success Screen
   ============================================================ */
.pcrt-success-message {
  background: linear-gradient(135deg,#f0fdf4,#dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: var(--p-radius);
  padding: 2.5rem 2rem;
  text-align: center;
}

.pcrt-success-message__icon {
  width: 52px; height: 52px;
  background: var(--p-green);
  color: var(--p-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.pcrt-success-message h3 { color:#166534; margin:0 0 .5rem; font-size:1.15rem; }
.pcrt-success-message p  { color:#166534; opacity:.8; margin:0 0 1.25rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 700px) {
  .pcrt-landing {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }
  .pcrt-landing__left  { padding: 2.25rem 1.5rem; }
  .pcrt-landing__headline { font-size: 2rem; }
  .pcrt-landing__right { padding: 2rem 1.5rem; }
}

@media (max-width: 560px) {
  .pcrt-kpi-row { grid-template-columns: 1fr 1fr; }
  .pcrt-kpi-row .pcrt-kpi:last-child { grid-column: span 2; }

  .pcrt-wo-card { flex-wrap: wrap; }
  .pcrt-wo-card__right { width: 100%; justify-content: space-between; }

  .pcrt-detail-row { flex-direction: column; gap: .15rem; }
  .pcrt-detail-row__lbl { width: auto; }

  .pcrt-table thead { display: none; }
  .pcrt-table tbody tr { display: block; border-bottom: 1px solid var(--p-border); }
  .pcrt-table tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: .4rem .75rem; border-bottom: none; font-size: .82rem;
  }
  .pcrt-table tbody td::before {
    content: attr(data-label);
    font-weight: 700; color: var(--p-muted);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  }

  .pcrt-form-card { padding: 1.1rem; }
}

/* ============================================================
   Portal Shell — sidebar + main layout
   ============================================================ */
.pcrt-shell {
    display: flex;
    min-height: calc(100vh - 72px);
    align-items: stretch;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.pcrt-sidebar {
    width: 224px;
    flex-shrink: 0;
    background: var(--p-navy);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    scrollbar-width: none;
}
.pcrt-sidebar::-webkit-scrollbar { display: none; }

.pcrt-sidebar__user {
    padding: 24px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.pcrt-sidebar__avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--p-orange);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: .95rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.pcrt-sidebar__name {
    font-size: .875rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 2px;
}

.pcrt-sidebar__email {
    font-size: .7rem;
    color: rgba(255,255,255,.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcrt-sidebar__nav {
    flex: 1;
    padding: 10px 0;
}

.pcrt-sidebar__section {
    padding: 14px 20px 4px;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255,255,255,.22);
}

.pcrt-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
    transition: background .14s, color .14s;
    position: relative;
    border-left: 3px solid transparent;
}

.pcrt-nav-item:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.88);
}

.pcrt-nav-item--active {
    background: rgba(232,76,14,.14);
    color: #fff;
    font-weight: 700;
    border-left-color: var(--p-orange);
}

.pcrt-nav-item svg { flex-shrink: 0; }

.pcrt-nav-badge {
    margin-left: auto;
    background: var(--p-orange);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.pcrt-sidebar__footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.pcrt-signout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: color .15s;
}
.pcrt-signout-link:hover { color: rgba(255,255,255,.75); }

/* ── Main area ───────────────────────────────────────────── */
.pcrt-main {
    flex: 1;
    min-width: 0;
    background: var(--p-bg);
    display: flex;
    flex-direction: column;
}

.pcrt-main__hd {
    background: var(--p-white);
    border-bottom: 1px solid var(--p-border);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pcrt-main__hd-text { flex: 1; min-width: 0; }

.pcrt-main__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--p-navy);
    margin: 0 0 2px;
    letter-spacing: -.01em;
}

.pcrt-main__desc {
    font-size: .8rem;
    color: var(--p-muted);
    margin: 0;
}

.pcrt-main__body {
    padding: 28px;
    flex: 1;
}

/* Mobile nav toggle */
.pcrt-mob-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--p-navy);
    background: var(--p-white);
    border: 1.5px solid var(--p-border);
    border-radius: 7px;
    padding: 7px 13px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   Section headings
   ============================================================ */
.pcrt-section-hd {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--p-muted);
    margin: 0 0 14px;
}

.pcrt-dash-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 14px;
}

.pcrt-view-all {
    font-size: .8rem;
    font-weight: 600;
    color: var(--p-orange);
    text-decoration: none;
}
.pcrt-view-all:hover { text-decoration: underline; }

/* ============================================================
   Service status grid (dashboard)
   ============================================================ */
.pcrt-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.pcrt-svc-card {
    background: var(--p-white);
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--p-text);
    transition: box-shadow .15s, transform .12s, border-color .15s;
    box-shadow: var(--p-shadow);
}

.pcrt-svc-card:hover {
    box-shadow: var(--p-shadow-md);
    transform: translateY(-1px);
    color: var(--p-text);
}

.pcrt-svc-card__icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--p-navy-lt);
    color: var(--p-navy);
}

.pcrt-svc-card__body { flex: 1; min-width: 0; }

.pcrt-svc-card__name {
    font-size: .85rem;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: 2px;
}

.pcrt-svc-card__desc {
    font-size: .72rem;
    color: var(--p-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcrt-svc-card__pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--p-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* State variants */
.pcrt-svc--ok    .pcrt-svc-card__icon { background: var(--p-green-lt);  color: var(--p-green);  }
.pcrt-svc--ok    .pcrt-svc-card__pill { color: var(--p-green); }
.pcrt-svc--active .pcrt-svc-card__icon { background: #e8f0fe; color: #1a73e8; }
.pcrt-svc--active .pcrt-svc-card__pill { color: #1a73e8; }
.pcrt-svc--warn  .pcrt-svc-card__icon { background: #fef9c3; color: #854d0e; }
.pcrt-svc--warn  .pcrt-svc-card__pill { color: #854d0e; }
.pcrt-svc--error .pcrt-svc-card__icon { background: var(--p-red-lt);   color: var(--p-red);   }
.pcrt-svc--error { border-color: #fca5a5; }
.pcrt-svc--error .pcrt-svc-card__pill { color: var(--p-red); }
.pcrt-svc--idle  .pcrt-svc-card__icon { background: #f1f5f9; color: #94a3b8; }

/* Status dots */
.pcrt-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--p-muted);
}
.pcrt-dot--ok     { background: var(--p-green); animation: pcrt-pulse 2.4s infinite; }
.pcrt-dot--active { background: #1a73e8; animation: pcrt-pulse 2.4s infinite; }
.pcrt-dot--warn   { background: #eab308; }
.pcrt-dot--error  { background: var(--p-red); }
.pcrt-dot--idle   { background: #cbd5e1; }

@keyframes pcrt-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

/* ============================================================
   Website check cards
   ============================================================ */
.pcrt-website-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pcrt-check-card {
    background: var(--p-white);
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    box-shadow: var(--p-shadow);
}

.pcrt-check-card__icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--p-navy-lt);
    color: var(--p-navy);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.pcrt-check-card__body { flex: 1; }

.pcrt-check-card__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--p-muted);
    margin-bottom: 4px;
}

.pcrt-check-card__value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--p-text);
    line-height: 1;
    margin-bottom: 4px;
}

.pcrt-check-card__sub {
    font-size: .75rem;
    color: var(--p-muted);
}
.pcrt-check-card__sub a { color: var(--p-orange); }

.pcrt-check-card__pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
}

.pcrt-check-card--ok    .pcrt-check-card__icon { background: var(--p-green-lt); color: var(--p-green); }
.pcrt-check-card--ok    .pcrt-check-card__pill { color: var(--p-green); }
.pcrt-check-card--error .pcrt-check-card__icon { background: var(--p-red-lt);   color: var(--p-red); }
.pcrt-check-card--error { border-color: #fca5a5; }
.pcrt-check-card--error .pcrt-check-card__pill { color: var(--p-red); }
.pcrt-check-card--warn  .pcrt-check-card__icon { background: #fef9c3; color: #854d0e; }
.pcrt-check-card--warn  .pcrt-check-card__pill { color: #854d0e; }
.pcrt-check-card--info  .pcrt-check-card__icon { background: #eff6ff; color: #2563eb; }

.pcrt-website-setup {
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
}

.pcrt-website-form {
    text-align: left;
    margin-top: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   Stub / Coming-soon pages
   ============================================================ */
.pcrt-stub-page {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: 16px 0;
}

.pcrt-stub-icon {
    width: 68px; height: 68px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.pcrt-stub-icon svg { width: 32px; height: 32px; }

.pcrt-stub-icon--cloud  { background: rgba(26,58,108,.08);  color: var(--p-navy); }
.pcrt-stub-icon--phone  { background: rgba(232,76,14,.1);   color: var(--p-orange); }
.pcrt-stub-icon--globe  { background: rgba(22,163,74,.1);   color: var(--p-green); }
.pcrt-stub-icon--email  { background: rgba(37,99,235,.1);   color: #2563eb; }

.pcrt-stub-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--p-navy);
    margin: 0 0 10px;
    letter-spacing: -.01em;
}

.pcrt-stub-desc {
    font-size: .9rem;
    color: var(--p-muted);
    line-height: 1.65;
    margin: 0 0 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.pcrt-stub-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    text-align: left;
    margin-bottom: 28px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.pcrt-stub-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .83rem;
    color: var(--p-text);
}

.pcrt-stub-feature svg { color: var(--p-green); flex-shrink: 0; }

/* Skeleton preview */
.pcrt-stub-preview {
    background: var(--p-white);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 16px 20px;
    margin-bottom: 28px;
    text-align: left;
    pointer-events: none;
    opacity: .55;
}

.pcrt-stub-preview__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pcrt-stub-preview__row:last-child { margin-bottom: 0; }

.pcrt-stub-preview__label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--p-muted);
    width: 110px;
    flex-shrink: 0;
}

.pcrt-stub-preview__bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.pcrt-stub-preview__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    animation: pcrt-shimmer 1.8s infinite;
}

@keyframes pcrt-shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(200%); }
}

.pcrt-stub-preview__pill {
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pcrt-stub-preview__pill--ok   { background: var(--p-green-lt); color: var(--p-green); }
.pcrt-stub-preview__pill--idle { background: #f1f5f9;           color: #94a3b8; }

.pcrt-stub-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   Email link cards
   ============================================================ */
.pcrt-email-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    max-width: 600px;
}

.pcrt-email-link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--p-white);
    border: 1.5px solid var(--p-border);
    border-radius: var(--p-radius);
    text-decoration: none;
    color: var(--p-text);
    box-shadow: var(--p-shadow);
    transition: box-shadow .15s, transform .12s, border-color .15s;
}

.pcrt-email-link-card:hover {
    box-shadow: var(--p-shadow-md);
    transform: translateY(-1px);
    border-color: var(--p-navy);
    color: var(--p-text);
}

.pcrt-email-link-card__icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--p-navy-lt);
    color: var(--p-navy);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.pcrt-email-link-card__title {
    font-weight: 700;
    font-size: .92rem;
    color: var(--p-navy);
    margin-bottom: 2px;
}

.pcrt-email-link-card__desc {
    font-size: .75rem;
    color: var(--p-muted);
}

.pcrt-email-link-card > svg:last-child {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--p-muted);
}

/* ============================================================
   Portal wrapper — updated for sidebar layout (no container)
   ============================================================ */
.ca-portal-wrap {
    min-height: calc(100vh - 72px);
    background: var(--p-bg);
    padding: 0;
}


/* ============================================================
   Client Area — Login Page (logged-out)
   ============================================================ */
.ca-login-page {
    display: flex;
    min-height: calc(100vh - 72px);
}

/* ---- Left brand panel ---- */
.ca-login-brand {
    flex: 0 0 42%;
    background: linear-gradient(145deg, var(--p-navy) 0%, #0e2148 100%);
    display: flex;
    align-items: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

.ca-login-brand::before,
.ca-login-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: #fff;
    pointer-events: none;
}
.ca-login-brand::before { width: 520px; height: 520px; top: -160px; right: -140px; }
.ca-login-brand::after  { width: 300px; height: 300px; bottom: -80px; left: -80px; }

.ca-login-brand__inner { position: relative; z-index: 1; }

.ca-login-brand__tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--p-orange);
    background: rgba(232,76,14,.12);
    border: 1px solid rgba(232,76,14,.3);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 20px;
}

.ca-login-brand__headline {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.08;
    letter-spacing: -.02em;
    margin: 0 0 18px;
}

.ca-login-brand__sub {
    font-size: .95rem;
    color: rgba(255,255,255,.58);
    line-height: 1.65;
    max-width: 340px;
    margin: 0 0 32px;
}

.ca-login-brand__features {
    list-style: none;
    margin: 0 0 36px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.ca-login-brand__features li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: .88rem;
    color: rgba(255,255,255,.72);
}

.ca-login-brand__features li::before {
    content: '';
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(232,76,14,.15) url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23e84c0e' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/13px no-repeat;
    border: 1.5px solid rgba(232,76,14,.4);
}

.ca-login-brand__contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: rgba(255,255,255,.4);
    flex-wrap: wrap;
}

.ca-login-brand__contact a {
    color: rgba(255,255,255,.65);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.ca-login-brand__contact a:hover { color: #fff; }

/* ---- Right form panel ---- */
.ca-login-col {
    flex: 1;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 44px;
}

.ca-login-box {
    width: 100%;
    max-width: 440px;
}

/* Status badge */
.ca-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(22,163,74,.1);
    border: 1px solid rgba(22,163,74,.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: #16a34a;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.ca-status__dot {
    width: 6px; height: 6px;
    background: #16a34a;
    border-radius: 50%;
    animation: ca-pulse 2s infinite;
}

@keyframes ca-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}

.ca-login-box__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -.02em;
    margin: 0 0 6px;
}

.ca-login-box__sub {
    font-size: .9rem;
    color: var(--p-muted);
    margin: 0 0 22px;
}

/* Form fields */
.ca-form { display: flex; flex-direction: column; gap: 16px; }


/* ============================================================
   Service Panels — shared styles for managed IT service tabs
   ============================================================ */
.pcrt-muted { color: #64748b; }

.pcrt-service-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
}
.pcrt-service-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pcrt-service-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    flex: 1;
}
.pcrt-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}
.pcrt-service-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.pcrt-stat {
    flex: 1;
    min-width: 120px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}
.pcrt-stat__label {
    font-size: .78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}
.pcrt-stat__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

/* Status badges */
.pcrt-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}
.pcrt-status-badge--ok      { background: #dcfce7; color: #166534; }
.pcrt-status-badge--warning  { background: #fef9c3; color: #854d0e; }
.pcrt-status-badge--error    { background: #fef2f2; color: #991b1b; }
.pcrt-status-badge--active   { background: #dbeafe; color: #1e40af; }
.pcrt-status-badge--idle     { background: #f1f5f9; color: #64748b; }

/* Degraded state */
.pcrt-service-degraded {
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    text-align: center;
}
.pcrt-service-degraded p { margin: 4px 0; }

/* Device grid (network tab) */
.pcrt-device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.pcrt-device-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
}
.pcrt-device-card__name { font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.pcrt-device-card__model { font-size: .82em; }
.pcrt-device-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* Backup history table */
.pcrt-backup-history {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.pcrt-backup-history th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}
.pcrt-backup-history td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.pcrt-backup-history tr:last-child td { border-bottom: none; }
.pcrt-backup-history tr:hover td { background: #f8fafc; }

@media (max-width: 640px) {
    .pcrt-service-stats { flex-direction: column; }
    .pcrt-stat { min-width: auto; }
    .pcrt-device-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   VoIP Dashboard
   ============================================================ */

/* KPI row — 4 cards */
.pcrt-voip-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.pcrt-voip-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
}

.pcrt-voip-kpi__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
}

.pcrt-voip-kpi__icon--ext  { background: #dbeafe; color: #1d4ed8; }
.pcrt-voip-kpi__icon--call { background: #dcfce7; color: #16a34a; }
.pcrt-voip-kpi__icon--vm   { background: #fef9c3; color: #a16207; }
.pcrt-voip-kpi__icon--trunk{ background: #f3e8ff; color: #7c3aed; }

.pcrt-voip-kpi__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--p-text, #1e2532);
    line-height: 1.2;
}

.pcrt-voip-kpi__label {
    font-size: .78rem;
    color: var(--p-muted, #5a6577);
    line-height: 1.3;
}

/* Extension grid */
.pcrt-voip-ext-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.pcrt-voip-ext-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
    transition: box-shadow .15s, border-color .15s;
}

.pcrt-voip-ext-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.pcrt-voip-ext-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pcrt-voip-ext-card__dot--ok      { background: #16a34a; }
.pcrt-voip-ext-card__dot--active   { background: #2563eb; animation: pcrt-pulse 1.5s infinite; }
.pcrt-voip-ext-card__dot--warning  { background: #eab308; animation: pcrt-pulse 1.5s infinite; }
.pcrt-voip-ext-card__dot--error    { background: #dc2626; }
.pcrt-voip-ext-card__dot--idle     { background: #94a3b8; }

@keyframes pcrt-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .4; }
}

.pcrt-voip-ext-card__num {
    font-weight: 700;
    font-size: .95rem;
    color: var(--p-navy, #1a3a6c);
    min-width: 40px;
}

.pcrt-voip-ext-card__name {
    flex: 1;
    font-size: .85rem;
    color: var(--p-text, #1e2532);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.pcrt-voip-ext-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.pcrt-voip-ext-card__vm {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .75rem;
    font-weight: 600;
    color: #a16207;
    background: #fef9c3;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Trunk grid */
.pcrt-voip-trunk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.pcrt-voip-trunk-card {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
}

.pcrt-voip-trunk-card__name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--p-text, #1e2532);
    margin-bottom: 4px;
}

.pcrt-voip-trunk-card__tech {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f3e8ff;
    color: #7c3aed;
}

.pcrt-voip-trunk-card__chan {
    font-size: .8rem;
    margin-top: 4px;
}

/* VoIP responsive */
@media (max-width: 768px) {
    .pcrt-voip-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .pcrt-voip-ext-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pcrt-voip-kpi-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CWP Hosting Dashboard (Website & Email tabs)
   ============================================================ */

/* Quota KPI row */
.pcrt-cwp-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.pcrt-cwp-quota-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
}

.pcrt-cwp-quota-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--p-navy-lt, #e8edf5);
    color: var(--p-navy, #1a3a6c);
    flex-shrink: 0;
}

.pcrt-cwp-quota-card__data {
    flex: 1;
    min-width: 0;
}

.pcrt-cwp-quota-card__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--p-text, #1e2532);
    line-height: 1.2;
}

.pcrt-cwp-quota-card__limit {
    font-size: .85rem;
    font-weight: 400;
    color: var(--p-muted, #5a6577);
}

.pcrt-cwp-quota-card__label {
    font-size: .78rem;
    color: var(--p-muted, #5a6577);
    line-height: 1.3;
    margin-top: 2px;
}

.pcrt-cwp-quota-card__bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.pcrt-cwp-quota-card__fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s ease;
}

.pcrt-cwp-quota-card__fill--ok      { background: var(--p-green, #16a34a); }
.pcrt-cwp-quota-card__fill--warning  { background: #eab308; }

/* Domain list */
.pcrt-cwp-domain-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pcrt-cwp-domain-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
    transition: border-color .15s;
}

.pcrt-cwp-domain-item:hover {
    border-color: #cbd5e1;
}

.pcrt-cwp-domain-item--sub {
    padding-left: 28px;
}

.pcrt-cwp-domain-item__icon {
    flex-shrink: 0;
    color: var(--p-navy, #1a3a6c);
}

.pcrt-cwp-domain-item__name {
    flex: 1;
    font-weight: 600;
    font-size: .9rem;
    color: var(--p-text, #1e2532);
}

.pcrt-cwp-domain-item__link {
    font-size: .8rem;
    color: var(--p-navy, #1a3a6c);
    text-decoration: none;
    white-space: nowrap;
}

.pcrt-cwp-domain-item__link:hover {
    text-decoration: underline;
}

.pcrt-cwp-domain-item__badge {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
}

/* CWP responsive */
@media (max-width: 768px) {
    .pcrt-cwp-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pcrt-cwp-kpi-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Mailcow Email Dashboard
   ============================================================ */

/* KPI row */
.pcrt-mc-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.pcrt-mc-kpi {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
}

.pcrt-mc-kpi__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
}

.pcrt-mc-kpi__icon--mbox  { background: #dbeafe; color: #1d4ed8; }
.pcrt-mc-kpi__icon--alias { background: #e0e7ff; color: #4338ca; }
.pcrt-mc-kpi__icon--quota { background: #fef9c3; color: #a16207; }
.pcrt-mc-kpi__icon--msgs  { background: #dcfce7; color: #16a34a; }

.pcrt-mc-kpi__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--p-text, #1e2532);
    line-height: 1.2;
}

.pcrt-mc-kpi__limit {
    font-size: .85rem;
    font-weight: 400;
    color: var(--p-muted, #5a6577);
}

.pcrt-mc-kpi__label {
    font-size: .78rem;
    color: var(--p-muted, #5a6577);
    line-height: 1.3;
    margin-top: 2px;
}

/* Mailbox list */
.pcrt-mc-mbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pcrt-mc-mbox-card {
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--p-border, #e2e8f0);
    background: var(--p-white, #fff);
    transition: border-color .15s, box-shadow .15s;
}

.pcrt-mc-mbox-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.pcrt-mc-mbox-card--inactive {
    opacity: .6;
}

.pcrt-mc-mbox-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.pcrt-mc-mbox-card__email {
    font-weight: 700;
    font-size: .95rem;
    color: var(--p-navy, #1a3a6c);
    word-break: break-all;
}

.pcrt-mc-mbox-card__name {
    font-size: .82rem;
    color: var(--p-muted, #5a6577);
    margin-top: 2px;
}

.pcrt-mc-mbox-card__badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Quota bar */
.pcrt-mc-mbox-card__quota {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pcrt-mc-mbox-card__bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.pcrt-mc-mbox-card__fill {
    height: 100%;
    border-radius: 6px;
    transition: width .3s ease;
}

.pcrt-mc-mbox-card__fill--ok      { background: var(--p-green, #16a34a); }
.pcrt-mc-mbox-card__fill--warning  { background: #eab308; }
.pcrt-mc-mbox-card__fill--error    { background: var(--p-red, #dc2626); }

.pcrt-mc-mbox-card__quota-text {
    font-size: .78rem;
    color: var(--p-muted, #5a6577);
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

/* Meta row */
.pcrt-mc-mbox-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: .78rem;
    color: var(--p-muted, #5a6577);
}

.pcrt-mc-mbox-card__protocols {
    display: flex;
    gap: 4px;
}

.pcrt-mc-proto {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f1f5f9;
    color: #64748b;
}

/* Mailcow responsive */
@media (max-width: 768px) {
    .pcrt-mc-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .pcrt-mc-mbox-card__quota {
        flex-direction: column;
        align-items: stretch;
    }
    .pcrt-mc-mbox-card__quota-text {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .pcrt-mc-kpi-row {
        grid-template-columns: 1fr;
    }
    .pcrt-mc-mbox-card__top {
        flex-direction: column;
    }
}

.ca-field { display: flex; flex-direction: column; gap: 5px; }

.ca-field label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--p-text);
}

.ca-field__wrap { position: relative; }

.ca-field input[type="text"],
.ca-field input[type="email"],
.ca-field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--p-border);
    border-radius: 9px;
    font-size: .95rem;
    font-family: inherit;
    color: var(--p-text);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.ca-field__wrap input { padding-right: 44px; }

.ca-field input:focus {
    border-color: var(--p-navy);
    box-shadow: 0 0 0 3px rgba(26,58,108,.1);
}

.ca-field input::placeholder { color: #b0b8c8; }

.ca-field__toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; color: #94a3b8;
    display: flex; padding: 4px;
    transition: color .15s;
}
.ca-field__toggle:hover { color: var(--p-navy); }

.ca-form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ca-form__remember {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    color: var(--p-muted);
    cursor: pointer;
    user-select: none;
}

.ca-form__remember input[type="checkbox"] {
    accent-color: var(--p-navy);
    cursor: pointer;
    width: 15px; height: 15px;
}

.ca-form__forgot {
    font-size: .82rem;
    font-weight: 600;
    color: var(--p-navy);
    text-decoration: none;
    transition: color .2s;
}
.ca-form__forgot:hover { color: var(--p-orange); }

.ca-form__submit {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: .98rem;
    margin-top: 4px;
}

/* Divider */
.ca-login-box__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--p-muted);
    margin: 20px 0 14px;
}
.ca-login-box__divider::before,
.ca-login-box__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--p-border);
}

/* Contact card */
.ca-login-box__contact {
    background: #fff;
    border: 1.5px solid var(--p-border);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: .83rem;
    color: var(--p-muted);
    line-height: 1.65;
}
.ca-login-box__contact strong { color: var(--p-text); }
.ca-login-box__contact a {
    color: var(--p-orange);
    font-weight: 600;
    text-decoration: none;
}
.ca-login-box__contact a:hover { text-decoration: underline; }

/* Remote support */
.ca-remote {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--p-border);
}

.ca-remote__hd {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    color: var(--p-muted);
    margin-bottom: 10px;
}
.ca-remote__hd strong { color: var(--p-text); font-size: .82rem; }

.ca-remote__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ca-remote__btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    background: #fff;
    border: 1.5px solid var(--p-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--p-text);
    transition: border-color .15s, box-shadow .15s, transform .12s, color .15s;
}
.ca-remote__btn:hover {
    border-color: var(--p-navy);
    box-shadow: 0 3px 10px rgba(26,58,108,.1);
    transform: translateY(-1px);
    color: var(--p-text);
}

.ca-remote__btn b {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
}
.ca-remote__btn small {
    display: block;
    font-size: .68rem;
    color: var(--p-muted);
    line-height: 1.2;
}

.ca-remote__logo {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800;
    flex-shrink: 0;
}
.ca-remote__logo--ad { background: #fde8ec; color: #e8003d; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
    .ca-login-page { flex-direction: column; min-height: auto; }
    .ca-login-brand { flex: 0 0 auto; padding: 36px 28px; }
    .ca-login-brand__sub,
    .ca-login-brand__features,
    .ca-login-brand__contact { display: none; }
    .ca-login-col { padding: 40px 24px; align-items: flex-start; }
    .ca-portal-wrap { padding: 28px 0 56px; }
}

@media (max-width: 520px) {
    .ca-login-col { padding: 28px 16px; }
    .ca-login-box { max-width: 100%; }
    .ca-remote__grid { grid-template-columns: 1fr; }
}
