/* ══════════════════════════════════════════════════════
   SahiHisab Assistant Portal — Complete Stylesheet
   Aligned to portal.js class names
   Mobile-first (375px base), Warm Darkroom dark theme
   Font: Outfit (display) + DM Sans (body)
   ══════════════════════════════════════════════════════ */

/* ══ Google Fonts Import ══ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ══ CSS Variables ══ */
:root {
  /* Colors */
  --p-bg:               #0F1419;
  --p-surface:          #1A2332;
  --p-surface-deep:     #141B22;
  --p-border:           rgba(42, 53, 68, 0.25);
  --p-border-solid:     #2A3544;
  --p-text-primary:     #F5F0E8;
  --p-text-secondary:   #7B8A9E;
  --p-blue:             #0ea5e9;
  --p-amber:            #E8A838;
  --p-green:            #10b981;
  --p-orange:           #f59e0b;
  --p-red:              #ef4444;

  /* Gradient Backgrounds */
  --p-grad-card:        linear-gradient(135deg, #1E2D3D 0%, #1A2332 100%);
  --p-grad-blue:        linear-gradient(135deg, #0c2d4a 0%, #1A2332 100%);
  --p-grad-green:       linear-gradient(135deg, #1B3A2A 0%, #1A2332 100%);
  --p-grad-blue-btn:    linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);

  /* Typography */
  --p-font-display:     'Outfit', sans-serif;
  --p-font-body:        'DM Sans', sans-serif;

  /* Spacing */
  --p-space-xs:         4px;
  --p-space-sm:         8px;
  --p-space-md:         16px;
  --p-space-lg:         24px;
  --p-space-xl:         32px;

  /* Radius */
  --p-radius-sm:        8px;
  --p-radius-md:        12px;
  --p-radius-lg:        16px;
  --p-radius-xl:        20px;
  --p-radius-full:      9999px;

  /* Shadows */
  --p-shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.3);
  --p-shadow-md:        0 4px 16px rgba(0, 0, 0, 0.4);
  --p-shadow-lg:        0 8px 32px rgba(0, 0, 0, 0.5);
  --p-shadow-blue:      0 0 0 1px rgba(14, 165, 233, 0.25), 0 4px 20px rgba(14, 165, 233, 0.12);
  --p-shadow-green:     0 0 0 1px rgba(16, 185, 129, 0.25), 0 4px 20px rgba(16, 185, 129, 0.10);
  --p-shadow-amber:     0 0 0 1px rgba(232, 168, 56, 0.25);
  --p-shadow-nav:       0 -6px 24px rgba(14, 165, 233, 0.08), 0 4px 16px rgba(0, 0, 0, 0.38);

  /* Transitions */
  --p-transition:       0.18s ease;
}

/* ══ Animations ══ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ══ Base Reset ══ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background-color: var(--p-bg);
  color: var(--p-text-primary);
  font-family: var(--p-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--p-font-body);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  font-family: var(--p-font-body);
  font-size: 16px;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ══ Material Symbols — Filled, weight 500 ══ */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-size: inherit;
  vertical-align: middle;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Contextual icon sizing */
.pnav-icon,
.psb-nav-icon {
  font-size: 24px;
}

.ptd-info-icon {
  font-size: 20px;
  width: 24px;
  color: var(--p-amber);
}

.tcm-icon {
  font-size: 15px;
  vertical-align: -2px;
  margin-right: 2px;
  opacity: 0.7;
}

.tcar-icon {
  font-size: 16px;
  vertical-align: -3px;
}

.ppb-icon {
  font-size: 20px;
  color: var(--p-amber);
}

.ppb-arrow {
  font-size: 20px;
  margin-left: auto;
}

.pe-icon .material-symbols-rounded {
  font-size: 44px;
  opacity: 0.5;
}

.pci-btn-icon {
  font-size: 22px;
}

.pci-task-icon {
  font-size: 16px;
  vertical-align: -3px;
  opacity: 0.6;
}

.pci-map-arrow {
  font-size: 14px;
  vertical-align: -2px;
}

.pp-info-icon {
  font-size: 20px;
  width: 24px;
  color: var(--p-amber);
}

.ptd-money-title-icon {
  font-size: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.ptd-contract-icon {
  font-size: 28px;
  color: var(--p-blue);
}

.ptd-countered-icon {
  font-size: 20px;
}

.pep-stat-icon .material-symbols-rounded {
  font-size: 22px;
}

/* ══ 375px Overflow Protection ══ */
.portal-home,
.portal-tasks-page,
.portal-earnings-page,
.portal-checkin-page,
.portal-profile-page,
.portal-task-detail {
  max-width: 100vw;
  overflow-x: hidden;
}

.ptd-money-row {
  flex-wrap: wrap;
}

.ptd-counter-values {
  flex-wrap: wrap;
  gap: 8px 16px;
}

.portal-toast {
  white-space: normal;
  text-align: center;
  max-width: calc(100vw - 40px);
}

.pep-hero-amount {
  word-break: break-word;
}

.pec-amount {
  word-break: break-word;
}

.task-card-meta {
  overflow: hidden;
}

.tcm-date,
.tcm-venue,
.tcm-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.ptd-info-value {
  word-break: break-word;
}

.pci-map-address {
  word-break: break-word;
}

/* ══ App Root ══ */
#portalApp {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  background-color: var(--p-bg);
}

@media (min-width: 600px) and (max-width: 1023px) {
  #portalApp {
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--p-border-solid);
    min-height: 100dvh;
  }
}

/* ══ portal-view: scrollable content area ══ */
.portal-view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 100px;
  -webkit-overflow-scrolling: touch;
}

.portal-view::-webkit-scrollbar {
  display: none;
}

/* ══ Shared page padding ══ */
.portal-home,
.portal-tasks-page,
.portal-earnings-page,
.portal-checkin-page,
.portal-profile-page,
.portal-task-detail {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.25s ease both;
}

/* ══ portal-header ══ */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 4px;
}

.portal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-greeting {
  font-family: var(--p-font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.portal-name {
  font-family: var(--p-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1.2;
}

.portal-logo-small {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--p-grad-blue-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p-font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* ══ portal-avatar ══ */
.portal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.portal-avatar-fallback {
  background: var(--p-grad-blue-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ══ portal-earnings-card (home hero) ══ */
.portal-earnings-card {
  background: var(--p-grad-blue);
  border-radius: var(--p-radius-xl);
  padding: 20px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: var(--p-shadow-blue);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pec-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.pec-amount {
  font-family: var(--p-font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--p-text-primary);
  letter-spacing: -1px;
  line-height: 1.1;
}

.pec-sub {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
}

.pec-sub-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pec-sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pec-sub-dot.green {
  background: var(--p-green);
}

.pec-sub-dot.amber {
  background: var(--p-amber);
}

/* ══ portal-stats-row + portal-stat-box (psb) ══ */
.portal-stats-row {
  display: flex;
  gap: 10px;
}

.portal-stat-box {
  flex: 1;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  transition: background var(--p-transition);
}

.portal-stat-box:active {
  background: rgba(14, 165, 233, 0.1);
}

.portal-stat-box.good {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
}

.portal-stat-box.warn {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.05);
}

.portal-stat-box.bad {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

.psb-value {
  font-family: var(--p-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1;
}

.psb-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--p-text-secondary);
  line-height: 1.2;
}

/* ══ portal-pending-banner (ppb) ══ */
.portal-pending-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(232, 168, 56, 0.1);
  border: 1px solid rgba(232, 168, 56, 0.25);
  border-radius: var(--p-radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--p-transition);
  min-height: 44px;
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-amber);
  -webkit-tap-highlight-color: transparent;
}

.portal-pending-banner:active {
  background: rgba(232, 168, 56, 0.18);
}

/* ppb-icon and ppb-arrow are now Material Symbols, sized via contextual rules above */

/* ══ portal-section ══ */
.portal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-section-title {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--p-amber);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* ══ portal-page-title (tasks, earnings, profile) ══ */
.portal-page-title {
  font-family: var(--p-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--p-text-primary);
  padding-top: 20px;
  line-height: 1.2;
}

/* ══ portal-footer-spacer ══ */
.portal-footer-spacer {
  height: 24px;
  flex-shrink: 0;
}

/* ══ portal-back-bar ══ */
.portal-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 4px;
  min-height: 60px;
}

.portal-back-btn {
  min-height: 44px;
  padding: 0 16px;
  background: var(--p-surface);
  border: 1px solid var(--p-border-solid);
  border-radius: var(--p-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--p-text-primary);
  font-family: var(--p-font-body);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.portal-back-btn:active {
  background: rgba(14, 165, 233, 0.1);
}

.portal-back-title {
  font-family: var(--p-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══ portal-empty (pe) ══ */
.portal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 12px;
}

.pe-icon {
  font-size: 44px;
  line-height: 1;
}

.pe-text {
  font-family: var(--p-font-body);
  font-size: 15px;
  color: var(--p-text-secondary);
  font-weight: 500;
}

/* ══════════════════════════════
   TASK CARD (task-card*, tca-*, tcm-*, tcar-*)
   ══════════════════════════════ */

.task-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--p-border-solid);
  transition: border-color var(--p-transition), box-shadow var(--p-transition);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.task-card:active {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* BEM modifiers — status variants */
.task-card--pending {
  border-color: rgba(232, 168, 56, 0.25);
}

.task-card--accepted {
  border-color: rgba(16, 185, 129, 0.25);
}

.task-card--countered {
  border-color: rgba(232, 168, 56, 0.25);
}

.task-card--declined {
  border-color: rgba(239, 68, 68, 0.15);
  opacity: 0.7;
}

.task-card--withdrawn {
  border-color: rgba(123, 138, 158, 0.15);
  opacity: 0.6;
}

.task-card--completed {
  border-color: rgba(14, 165, 233, 0.15);
}

.task-card--cancelled {
  border-color: rgba(239, 68, 68, 0.12);
  opacity: 0.65;
}

/* task-card-top: title + badge row */
.task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-card-title {
  font-family: var(--p-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--p-text-primary);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* task-card-meta: date / venue / role */
.task-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tcm-date,
.tcm-venue,
.tcm-role {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
  line-height: 1.4;
  display: block;
}

/* task-card-money: offer / advance row */
.task-card-money {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tcm-money-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tcm-money-label {
  font-family: var(--p-font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.tcm-money-value {
  font-family: var(--p-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1;
}

.tcm-money-value.green {
  color: var(--p-green);
}

.tcm-money-value.amber {
  color: var(--p-amber);
}

.tcm-money-value.blue {
  color: var(--p-blue);
}

/* task-card-actions: accept / counter / decline buttons (tca-*) */
.task-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* tca-btn: base for all 3 action buttons */
.tca-btn {
  min-height: 44px;
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition), color var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  padding: 0 14px;
}

.tca-btn:active {
  transform: scale(0.97);
}

.tca-accept {
  flex: 1;
  background: var(--p-green);
  color: #fff;
  border: none;
}

.tca-accept:active {
  background: #0d9e6e;
}

.tca-counter {
  flex: 1;
  background: transparent;
  color: var(--p-amber);
  border: 1.5px solid var(--p-amber);
}

.tca-counter:active {
  background: rgba(232, 168, 56, 0.1);
}

.tca-decline {
  width: 44px;
  flex-shrink: 0;
  background: transparent;
  color: rgba(239, 68, 68, 0.65);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  padding: 0;
}

.tca-decline:active {
  color: var(--p-red);
  border-color: var(--p-red);
}

/* task-card-accepted-row (tcar-*) */
.task-card-accepted-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--p-border);
}

.tcar-contract {
  font-family: var(--p-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--p-blue);
}

.tcar-checkin {
  min-height: 36px;
  padding: 0 14px;
  background: var(--p-grad-blue-btn);
  color: #fff;
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: box-shadow var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.tcar-checkin:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.2);
}

/* ══ portal-badge (acceptance status) ══ */
.portal-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--p-radius-full);
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--p-orange);
}

.badge-accepted {
  background: rgba(16, 185, 129, 0.15);
  color: var(--p-green);
}

.badge-countered {
  background: rgba(232, 168, 56, 0.15);
  color: var(--p-amber);
}

.badge-declined {
  background: rgba(239, 68, 68, 0.12);
  color: var(--p-red);
}

.badge-withdrawn {
  background: rgba(123, 138, 158, 0.12);
  color: var(--p-text-secondary);
}

.badge-default {
  background: rgba(123, 138, 158, 0.1);
  color: var(--p-text-secondary);
}

/* ══ portal-status-badge (task status) ══ */
.portal-status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--p-radius-full);
  font-family: var(--p-font-body);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.sbadge-pending {
  background: rgba(123, 138, 158, 0.12);
  color: var(--p-text-secondary);
}

.sbadge-inprogress {
  background: rgba(14, 165, 233, 0.12);
  color: var(--p-blue);
}

.sbadge-completed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--p-green);
}

.sbadge-cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: var(--p-red);
}

.sbadge-default {
  background: rgba(123, 138, 158, 0.1);
  color: var(--p-text-secondary);
}

/* ══════════════════════════════
   TASK DETAIL PAGE (ptd-*)
   ══════════════════════════════ */

.portal-task-detail {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp 0.22s ease both;
}

/* ptd-header-card */
.ptd-header-card {
  background: var(--p-grad-blue);
  border-radius: var(--p-radius-xl);
  padding: 20px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: var(--p-shadow-blue);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ptd-title {
  font-family: var(--p-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1.2;
}

.ptd-role {
  font-family: var(--p-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--p-blue);
}

.ptd-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ptd-info-grid */
.ptd-info-grid {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  overflow: hidden;
  border: 1px solid var(--p-border-solid);
  display: flex;
  flex-direction: column;
}

.ptd-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--p-border);
}

.ptd-info-row:last-child {
  border-bottom: none;
}

.ptd-info-row.clickable {
  cursor: pointer;
  transition: background var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.ptd-info-row.clickable:active {
  background: rgba(14, 165, 233, 0.06);
}

/* ptd-info-icon is now a Material Symbol — sized in contextual rules above */

.ptd-info-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.3;
}

.ptd-info-value {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text-primary);
  line-height: 1.4;
  margin-top: 2px;
}

/* ptd-money-card */
.ptd-money-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  padding: 18px;
  border: 1px solid var(--p-border-solid);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ptd-money-title {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--p-amber);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.ptd-money-row {
  display: flex;
  gap: 10px;
}

.ptd-money-item {
  flex: 1;
  background: rgba(15, 20, 25, 0.5);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ptd-money-label {
  font-family: var(--p-font-body);
  font-size: 10px;
  color: var(--p-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ptd-money-value {
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1;
}

.ptd-money-value.blue  { color: var(--p-blue); }
.ptd-money-value.green { color: var(--p-green); }
.ptd-money-value.amber { color: var(--p-amber); }

/* ptd-counter-row */
.ptd-counter-row {
  padding-top: 12px;
  border-top: 1px solid var(--p-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ptd-counter-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--p-amber);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ptd-counter-values {
  display: flex;
  gap: 16px;
  font-family: var(--p-font-body);
  font-size: 14px;
  color: var(--p-text-primary);
}

.ptd-counter-values strong {
  color: var(--p-amber);
}

.ptd-counter-reason {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
  font-style: italic;
  line-height: 1.4;
}

/* ptd-contract-badge */
.ptd-contract-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--p-radius-md);
  padding: 14px 16px;
}

.ptd-contract-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.ptd-contract-title {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--p-blue);
}

.ptd-contract-hash {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--p-text-secondary);
  margin-top: 2px;
  word-break: break-all;
}

/* ptd-actions: pending task buttons */
.ptd-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-accept-task {
  width: 100%;
  min-height: 52px;
  background: var(--p-green);
  color: #fff;
  border-radius: 14px;
  font-family: var(--p-font-body);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-accept-task:active {
  background: #0d9e6e;
  transform: scale(0.98);
}

.btn-accept-task:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-counter-task {
  width: 100%;
  min-height: 48px;
  background: transparent;
  color: var(--p-amber);
  border: 1.5px solid var(--p-amber);
  border-radius: 14px;
  font-family: var(--p-font-body);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-counter-task:active {
  background: rgba(232, 168, 56, 0.1);
  transform: scale(0.98);
}

.btn-decline-task {
  width: 100%;
  min-height: 44px;
  background: transparent;
  color: rgba(239, 68, 68, 0.6);
  border: none;
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: color var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-decline-task:active {
  color: var(--p-red);
}

.btn-decline-task:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ptd-accepted-actions */
.ptd-accepted-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-checkin-task {
  width: 100%;
  min-height: 56px;
  background: var(--p-grad-blue-btn);
  color: #fff;
  border-radius: 16px;
  font-family: var(--p-font-display);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
  transition: box-shadow var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  border: none;
}

.btn-checkin-task:active {
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
  transform: scale(0.98);
}

/* ptd-countered-info */
.ptd-countered-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(232, 168, 56, 0.08);
  border: 1px solid rgba(232, 168, 56, 0.2);
  border-radius: var(--p-radius-md);
  padding: 14px 16px;
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-amber);
}

.ptd-countered-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* btn-complete-task (Kaam Ho Gaya) */
.btn-complete-task {
  width: 100%;
  min-height: 56px;
  background: var(--p-green);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-family: var(--p-font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-complete-task:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.btn-complete-task:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* btn-checkout-link (secondary after check-in) */
.btn-checkout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--p-border);
  border-radius: 12px;
  color: var(--p-muted);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.btn-checkout-link:active {
  border-color: var(--p-blue);
  color: var(--p-blue);
}

/* ptd-completed-banner */
.ptd-completed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--p-radius-md);
  padding: 16px;
}
.ptd-completed-icon {
  font-size: 28px;
  color: var(--p-green);
  flex-shrink: 0;
}
.ptd-completed-title {
  font-family: var(--p-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--p-green);
}
.ptd-completed-time {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-muted);
  margin-top: 2px;
}

/* History button */
.ptd-history-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-md);
  background: var(--p-border);
  color: var(--p-muted);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  transition: background 0.15s, color 0.15s;
}
.ptd-history-btn:active {
  background: var(--p-surface);
  color: var(--p-text);
}

/* ══════════════════════════════
   TASKS LIST PAGE
   ══════════════════════════════ */

.portal-tasks-page {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp 0.22s ease both;
}

/* portal-filter-tabs (pft-*) */
.portal-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portal-filter-tabs::-webkit-scrollbar {
  display: none;
}

.pft-tab {
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--p-radius-full);
  font-family: var(--p-font-body);
  font-size: 13px;
  font-weight: 600;
  background: var(--p-surface);
  color: var(--p-text-secondary);
  border: 1px solid var(--p-border-solid);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--p-transition), color var(--p-transition), border-color var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.pft-tab.active {
  background: var(--p-blue);
  color: #fff;
  border-color: var(--p-blue);
}

.pft-tab:active {
  opacity: 0.8;
}

/* portal-task-list */
.portal-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ══════════════════════════════
   EARNINGS PAGE (pep-*)
   ══════════════════════════════ */

.portal-earnings-page {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.22s ease both;
}

/* pep-hero-card */
.pep-hero-card {
  background: var(--p-grad-green);
  border-radius: var(--p-radius-xl);
  padding: 24px 20px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: var(--p-shadow-green);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  align-items: center;
}

.pep-hero-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--p-green);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.pep-hero-amount {
  font-family: var(--p-font-display);
  font-size: 42px;
  font-weight: 800;
  color: var(--p-text-primary);
  letter-spacing: -2px;
  line-height: 1;
}

.pep-hero-sub {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
}

/* pep-stats-row */
.pep-stats-row {
  display: flex;
  gap: 10px;
}

.pep-stat-card {
  flex: 1;
  background: var(--p-surface);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  align-items: center;
  border: 1px solid var(--p-border-solid);
}

.pep-stat-card.green {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
}

.pep-stat-card.amber {
  border-color: rgba(232, 168, 56, 0.2);
  background: rgba(232, 168, 56, 0.05);
}

.pep-stat-icon {
  font-size: 20px;
  line-height: 1;
}

.pep-stat-card.green .pep-stat-icon { color: var(--p-green); }
.pep-stat-card.amber .pep-stat-icon { color: var(--p-amber); }

.pep-stat-amount {
  font-family: var(--p-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1;
}

.pep-stat-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--p-text-secondary);
}

/* pep-breakdown-list */
.pep-breakdown-list {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  overflow: hidden;
  border: 1px solid var(--p-border-solid);
}

.pep-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--p-border);
}

.pep-breakdown-row:last-child {
  border-bottom: none;
}

.pep-bd-type {
  font-family: var(--p-font-body);
  font-size: 14px;
  color: var(--p-text-secondary);
  font-weight: 500;
}

.pep-bd-amount {
  font-family: var(--p-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--p-text-primary);
}

/* pep-history-row (completed task list) */
.pep-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-border);
}

.pep-history-row:first-child {
  border-radius: 14px 14px 0 0;
}

.pep-history-row:last-child {
  border-radius: 0 0 14px 14px;
  border-bottom: none;
}

.pep-history-row:only-child {
  border-radius: 14px;
  border-bottom: none;
}

.pep-history-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.pep-history-title {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pep-history-date {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-text-secondary);
}

.pep-history-rating {
  font-size: 14px;
  margin-top: 2px;
}

.pep-history-amount {
  font-family: var(--p-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--p-green);
  flex-shrink: 0;
}

/* pep-powered */
.pep-powered {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-text-secondary);
  text-align: center;
  padding: 8px 0 4px;
  opacity: 0.6;
}

/* ══════════════════════════════
   CHECK-IN PAGE (pci-*)
   ══════════════════════════════ */

.portal-checkin-page {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp 0.22s ease both;
}

/* pci-task-card */
.pci-task-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  padding: 18px;
  border: 1px solid var(--p-border-solid);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pci-task-title {
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1.2;
}

.pci-task-date {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
  font-weight: 500;
}

/* pci-map-card */
.pci-map-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  padding: 16px;
  border: 1px solid var(--p-border-solid);
  display: flex;
  align-items: center;
  gap: 14px;
}

.pci-map-card.clickable {
  cursor: pointer;
  transition: background var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.pci-map-card.clickable:active {
  background: rgba(14, 165, 233, 0.06);
}

.pci-map-icon {
  flex-shrink: 0;
  color: var(--p-blue);
}

.pci-map-icon .material-symbols-rounded {
  font-size: 28px;
}

.pci-map-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pci-map-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pci-map-address {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text-primary);
  line-height: 1.4;
}

.pci-map-tap {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-blue);
  font-weight: 500;
}

/* Selfie capture area */
.pci-selfie-area {
  padding: 0 16px;
  margin-bottom: 16px;
}
.pci-selfie-label {
  font-family: var(--p-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pci-selfie-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 220px;
  border-radius: var(--p-radius-md);
  background: var(--p-surface);
  border: 2px dashed var(--p-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.pci-selfie-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--p-muted);
  font-size: 13px;
}
.pci-selfie-icon {
  font-size: 48px !important;
  opacity: 0.3;
}
.pci-selfie-video,
.pci-venue-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--p-radius-md);
  display: none;
}
.pci-selfie-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--p-radius-md);
}
.pci-selfie-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: var(--p-radius-md);
  background: var(--p-blue);
  color: #fff;
  font-family: var(--p-font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.pci-selfie-btn:active {
  opacity: 0.85;
}

/* pci-action-area */
.pci-action-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-do-checkin {
  width: 100%;
  min-height: 60px;
  background: var(--p-grad-blue-btn);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
  transition: box-shadow var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-do-checkin:active {
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  transform: scale(0.98);
}

.btn-do-checkin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-do-checkout,
.pci-checkout-btn {
  width: 100%;
  min-height: 52px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--p-green);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  font-family: var(--p-font-display);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-do-checkout:active,
.pci-checkout-btn:active {
  background: rgba(16, 185, 129, 0.18);
  transform: scale(0.98);
}

.btn-do-checkout:disabled,
.pci-checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* pci-btn-icon is now a Material Symbol — sized in contextual rules above */

/* pci-status-area */
.pci-status-area {
  min-height: 0;
}

.pci-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-family: var(--p-font-body);
  font-size: 14px;
  color: var(--p-text-secondary);
  font-weight: 500;
}

.pci-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--p-green);
  text-align: center;
}

.pci-success-time {
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text-primary);
  margin-top: 2px;
}

.pci-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-red);
  text-align: center;
}

/* pci-note */
.pci-note {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-text-secondary);
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
  opacity: 0.7;
}

/* ══════════════════════════════
   PROFILE PAGE (pp-*)
   ══════════════════════════════ */

.portal-profile-page {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.22s ease both;
}

/* pp-header: avatar + name centered */
.pp-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0 8px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar-fallback {
  background: var(--p-grad-blue-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p-font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}

.pp-name {
  font-family: var(--p-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--p-text-primary);
  text-align: center;
  line-height: 1.2;
}

.pp-role {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-text-secondary);
  text-align: center;
}

.pp-type-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-radius: var(--p-radius-full);
  font-family: var(--p-font-body);
  font-size: 12px;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.12);
  color: var(--p-blue);
}

/* pp-info-card */
.pp-info-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  overflow: hidden;
  border: 1px solid var(--p-border-solid);
}

.pp-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--p-border);
}

.pp-info-row:last-child {
  border-bottom: none;
}

/* pp-info-icon is now a Material Symbol — sized in contextual rules above */

.pp-info-label {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pp-info-value {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text-primary);
  margin-top: 2px;
}

/* pp-stats-grid */
.pp-stats-grid {
  display: flex;
  gap: 10px;
}

.pp-stat-item {
  flex: 1;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.pp-stat-val {
  font-family: var(--p-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--p-text-primary);
  line-height: 1;
}

.pp-stat-lbl {
  font-family: var(--p-font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--p-text-secondary);
}

/* pp-rating-card */
.pp-rating-card {
  background: var(--p-surface);
  border-radius: var(--p-radius-lg);
  padding: 18px;
  border: 1px solid var(--p-border-solid);
  display: flex;
  align-items: center;
  gap: 16px;
}

.pp-rating-pct {
  font-family: var(--p-font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.pp-rating-pct.green { color: var(--p-green); }
.pp-rating-pct.amber { color: var(--p-amber); }
.pp-rating-pct.red   { color: var(--p-red); }

.pp-rating-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-rating-up {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-green);
}

.pp-rating-down {
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--p-red);
}

.pp-rating-total {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-text-secondary);
}

/* pp-powered */
.pp-powered {
  font-family: var(--p-font-body);
  font-size: 12px;
  color: var(--p-text-secondary);
  text-align: center;
  padding: 8px 0 4px;
  opacity: 0.6;
}

/* ══════════════════════════════
   FLOATING NAV (pnav-*)
   getNavHTML() outputs:
     <nav class="portal-nav">
       <a class="pnav-item" ...>
         <span class="pnav-icon">...</span>
         <span class="pnav-label">...</span>
       </a>
       ...
     </nav>
   .portal-nav IS the pill — no inner wrapper.
   ══════════════════════════════ */

/* Gradient fade behind the pill */
.portal-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--p-bg) 55%, transparent);
  pointer-events: none;
  z-index: -1;
}

.portal-nav {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 60px;
  border-radius: 30px;
  background: rgba(20, 27, 34, 0.94);
  border: 1.5px solid rgba(14, 165, 233, 0.19);
  box-shadow: var(--p-shadow-nav);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
}

/* Each nav item is an <a> rendered by getNavHTML() */
.pnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-height: 44px;
  cursor: pointer;
  border-radius: 20px;
  padding: 6px 4px;
  transition: background var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.pnav-item:active {
  background: rgba(14, 165, 233, 0.08);
}

.pnav-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--p-text-secondary);
  transition: color var(--p-transition);
}

.pnav-label {
  font-family: var(--p-font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--p-text-secondary);
  line-height: 1;
  transition: color var(--p-transition), font-weight var(--p-transition);
}

.pnav-item.active .pnav-icon {
  color: var(--p-amber);
}

.pnav-item.active .pnav-label {
  color: var(--p-amber);
  font-weight: 700;
}

/* ══════════════════════════════
   COUNTER OFFER MODAL (pm-*)
   ══════════════════════════════ */

.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 max(16px, env(safe-area-inset-bottom));
  animation: overlayIn 0.2s ease;
}

@media (min-width: 600px) {
  .portal-modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.portal-modal {
  background: var(--p-surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.28s ease;
  border: 1px solid var(--p-border-solid);
  border-bottom: none;
  overflow: hidden;
}

@media (min-width: 600px) {
  .portal-modal {
    border-radius: 20px;
    max-width: 380px;
    border-bottom: 1px solid var(--p-border-solid);
  }
}

/* pm-header */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.pm-title {
  font-family: var(--p-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--p-text-primary);
}

.pm-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(123, 138, 158, 0.12);
  color: var(--p-text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--p-transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  border: none;
}

.pm-close:active {
  background: rgba(239, 68, 68, 0.12);
  color: var(--p-red);
}

/* pm-body */
.pm-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-current-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(14, 165, 233, 0.07);
  border-radius: var(--p-radius-md);
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.pm-co-label {
  font-family: var(--p-font-body);
  font-size: 13px;
  color: var(--p-text-secondary);
  font-weight: 500;
}

.pm-co-amount {
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--p-blue);
}

/* pm-field */
.pm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-label {
  font-family: var(--p-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.pm-input-wrap {
  display: flex;
  align-items: center;
  background: var(--p-bg);
  border: 1.5px solid var(--p-border-solid);
  border-radius: var(--p-radius-md);
  overflow: hidden;
  transition: border-color var(--p-transition);
}

.pm-input-wrap:focus-within {
  border-color: var(--p-blue);
}

.pm-rupee {
  padding: 0 12px;
  font-family: var(--p-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--p-text-secondary);
  flex-shrink: 0;
  line-height: 1;
}

.pm-input {
  flex: 1;
  height: 48px;
  background: transparent;
  border: none;
  padding: 0 12px 0 0;
  color: var(--p-text-primary);
  font-family: var(--p-font-display);
  font-size: 20px;
  font-weight: 600;
  outline: none;
  min-width: 0;
}

.pm-input::placeholder {
  color: var(--p-text-secondary);
  font-size: 15px;
  font-family: var(--p-font-body);
  font-weight: 400;
}

.pm-textarea {
  width: 100%;
  background: var(--p-bg);
  border: 1.5px solid var(--p-border-solid);
  border-radius: var(--p-radius-md);
  padding: 12px 14px;
  color: var(--p-text-primary);
  font-family: var(--p-font-body);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color var(--p-transition);
}

.pm-textarea:focus {
  border-color: var(--p-blue);
}

.pm-textarea::placeholder {
  color: var(--p-text-secondary);
}

/* pm-footer */
.pm-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px 20px;
}

.pm-btn-cancel {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  background: transparent;
  color: var(--p-text-secondary);
  border: 1px solid var(--p-border-solid);
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--p-transition), color var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.pm-btn-cancel:active {
  border-color: var(--p-blue);
  color: var(--p-blue);
}

.pm-btn-submit {
  flex: 1;
  min-height: 48px;
  background: var(--p-amber);
  color: #0F1419;
  border: none;
  border-radius: var(--p-radius-md);
  font-family: var(--p-font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition);
  -webkit-tap-highlight-color: transparent;
}

.pm-btn-submit:active {
  background: #d4922e;
  transform: scale(0.98);
}

/* ══════════════════════════════
   TOAST (portal-toast--)
   ══════════════════════════════ */

.portal-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--p-surface);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--p-radius-full);
  padding: 12px 20px;
  font-family: var(--p-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-text-primary);
  box-shadow: var(--p-shadow-md);
  z-index: 1001;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

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

.portal-toast--success {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--p-green);
}

.portal-toast--danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--p-red);
}

.portal-toast--warning {
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--p-orange);
}

.portal-toast--info {
  border-color: rgba(14, 165, 233, 0.3);
  color: var(--p-blue);
}

/* ══════════════════════════════
   LOADING SPINNER (shared)
   ══════════════════════════════ */

.portal-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.portal-spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid var(--p-border-solid);
  border-top-color: var(--p-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ══ Shimmer skeleton ══ */
.portal-shimmer {
  background: linear-gradient(
    90deg,
    var(--p-surface) 25%,
    rgba(42, 53, 68, 0.6) 50%,
    var(--p-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--p-radius-md);
}

/* ══ Clickable utility ══ */
.clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ══ Color utility classes used on dynamic elements ══ */
.green { color: var(--p-green); }
.amber { color: var(--p-amber); }
.blue  { color: var(--p-blue); }
.red   { color: var(--p-red); }
.orange { color: var(--p-orange); }

/* ══ Safe area padding for fixed-bottom elements ══ */
.portal-safe-bottom {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* ══════════════════════════════════════════════════════
   DESKTOP SIDEBAR (psb-*) — hidden on mobile
   ══════════════════════════════════════════════════════ */

.portal-sidebar {
  display: none;
}

.portal-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ══════════════════════════════════════════════════════
   TABLET BREAKPOINT (600px — 1023px)
   ══════════════════════════════════════════════════════ */

@media (min-width: 600px) {
  .portal-home,
  .portal-tasks-page,
  .portal-earnings-page,
  .portal-checkin-page,
  .portal-profile-page,
  .portal-task-detail {
    padding: 0 24px;
  }

  .portal-stats-row,
  .pep-stats-row,
  .pp-stats-grid {
    gap: 14px;
  }

  .portal-task-list {
    gap: 12px;
  }

  .ptd-money-row {
    gap: 14px;
  }

  .pec-amount {
    font-size: 40px;
  }

  .pep-hero-amount {
    font-size: 48px;
  }
}

/* ══════════════════════════════════════════════════════
   DESKTOP BREAKPOINT (1024px+)
   Sidebar nav + wide content + two-column grids
   ══════════════════════════════════════════════════════ */

@media (min-width: 1024px) {

  /* ── Remove phone-frame constraint ── */
  #portalApp {
    max-width: none;
    box-shadow: none;
    flex-direction: row;
    min-height: 100dvh;
  }

  /* ── Show sidebar, hide floating nav ── */
  .portal-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    min-width: 240px;
    height: 100dvh;
    position: sticky;
    top: 0;
    background: var(--p-surface-deep);
    border-right: 1px solid var(--p-border-solid);
    padding: 28px 16px 20px;
    z-index: 50;
    flex-shrink: 0;
  }

  .portal-nav {
    display: none;
  }

  /* ── Sidebar internals ── */
  .psb-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--p-border);
    margin-bottom: 20px;
  }

  .psb-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--p-grad-blue-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--p-font-display);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
  }

  .psb-brand {
    font-family: var(--p-font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--p-text-primary);
    letter-spacing: -0.3px;
  }

  .psb-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  .psb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--p-radius-md);
    color: var(--p-text-secondary);
    font-family: var(--p-font-body);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--p-transition), color var(--p-transition);
    min-height: 44px;
    cursor: pointer;
  }

  .psb-nav-item:hover {
    background: rgba(14, 165, 233, 0.06);
    color: var(--p-text-primary);
  }

  .psb-nav-item.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--p-blue);
    font-weight: 600;
  }

  .psb-nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
  }

  .psb-nav-text {
    line-height: 1.2;
  }

  .psb-footer {
    font-family: var(--p-font-body);
    font-size: 11px;
    color: var(--p-text-secondary);
    opacity: 0.5;
    padding: 12px 8px 0;
    border-top: 1px solid var(--p-border);
  }

  /* ── Main content area ── */
  .portal-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .portal-view {
    padding-bottom: 40px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
  }

  .portal-home,
  .portal-tasks-page,
  .portal-earnings-page,
  .portal-checkin-page,
  .portal-profile-page,
  .portal-task-detail {
    padding: 0 32px;
    gap: 20px;
  }

  /* ── Home: header bigger ── */
  .portal-name {
    font-size: 24px;
  }

  .pec-amount {
    font-size: 44px;
  }

  .portal-earnings-card {
    padding: 28px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }

  /* ── Stats row: 4 cards fit ── */
  .portal-stats-row {
    gap: 16px;
  }

  .portal-stat-box {
    padding: 18px 14px;
  }

  .psb-value {
    font-size: 26px;
  }

  /* ── Task cards: 2 column grid ── */
  .portal-task-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .portal-task-list .portal-empty {
    grid-column: 1 / -1;
  }

  /* ── Home sections: task cards in grid too ── */
  .portal-section .task-card {
    width: 100%;
  }

  /* ── Task detail: two column (info + money) ── */
  .portal-task-detail {
    gap: 24px;
  }

  .ptd-header-card {
    padding: 28px;
  }

  .ptd-title {
    font-size: 26px;
  }

  .ptd-info-grid {
    max-width: 600px;
  }

  .ptd-money-card {
    max-width: 600px;
  }

  .ptd-actions {
    flex-direction: row;
    gap: 14px;
    max-width: 600px;
  }

  .btn-accept-task {
    flex: 2;
  }

  .btn-counter-task {
    flex: 1;
  }

  .btn-decline-task {
    width: auto;
    flex: 0 0 auto;
    padding: 0 24px;
  }

  /* ── Earnings: bigger hero ── */
  .pep-hero-card {
    padding: 32px 28px;
  }

  .pep-hero-amount {
    font-size: 52px;
  }

  .pep-stats-row {
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
  }

  .pep-stat-card {
    padding: 20px 16px;
  }

  .pep-stat-amount {
    font-size: 24px;
  }

  /* ── Earnings history: two column ── */
  .pep-breakdown-list {
    max-width: 600px;
  }

  /* ── Check-in page: center content ── */
  .portal-checkin-page {
    max-width: 500px;
    margin: 0 auto;
  }

  .btn-do-checkin {
    max-width: 400px;
    margin: 0 auto;
  }

  .btn-do-checkout,
  .pci-checkout-btn {
    max-width: 400px;
    margin: 0 auto;
  }

  /* ── Profile: wider stats ── */
  .pp-stats-grid {
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
  }

  .pp-rating-card {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }

  .pp-info-card {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 24px;
  }

  .profile-avatar-fallback {
    font-size: 36px;
  }

  .pp-name {
    font-size: 28px;
  }

  /* ── Back bar: hover on desktop ── */
  .portal-back-btn:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.3);
  }

  /* ── Task card: hover on desktop ── */
  .task-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.1);
  }

  /* ── Buttons: hover states ── */
  .tca-accept:hover {
    background: #0d9e6e;
  }

  .tca-counter:hover {
    background: rgba(232, 168, 56, 0.08);
  }

  .tca-decline:hover {
    color: var(--p-red);
    border-color: rgba(239, 68, 68, 0.4);
  }

  .tcar-checkin:hover {
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
  }

  .btn-accept-task:hover {
    background: #0d9e6e;
  }

  .btn-counter-task:hover {
    background: rgba(232, 168, 56, 0.08);
  }

  .btn-checkin-task:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  }

  .btn-do-checkin:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
  }

  .psb-nav-item:hover .psb-nav-icon {
    color: var(--p-blue);
  }

  .portal-pending-banner:hover {
    background: rgba(232, 168, 56, 0.15);
  }

  /* ── Modal: centered on desktop ── */
  .portal-modal {
    max-width: 420px;
  }

  /* ── Page titles bigger ── */
  .portal-page-title {
    font-size: 28px;
    padding-top: 28px;
  }

  /* ── Footer spacer smaller (no floating nav) ── */
  .portal-footer-spacer {
    height: 16px;
  }

  /* ── Toast position adjusted (no floating nav) ── */
  .portal-toast {
    bottom: 40px;
  }
}

/* ══════════════════════════════════════════════════════
   WIDE DESKTOP (1280px+) — extra breathing room
   ══════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  .portal-sidebar {
    width: 260px;
    min-width: 260px;
    padding: 32px 20px 24px;
  }

  .psb-top {
    padding: 0 10px 28px;
    margin-bottom: 24px;
  }

  .psb-logo {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .psb-brand {
    font-size: 18px;
  }

  .psb-nav-item {
    padding: 14px 16px;
    font-size: 15px;
  }

  .portal-view {
    max-width: 960px;
  }

  .portal-home,
  .portal-tasks-page,
  .portal-earnings-page,
  .portal-profile-page,
  .portal-task-detail {
    padding: 0 40px;
  }

  .portal-login-card { max-width: 400px; }
}

/* ══ Login Screen ══ */
.portal-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--p-bg);
}
.portal-login-card {
  width: 100%;
  max-width: 340px;
  background: var(--p-surface);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}
.pl-logo {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--p-blue); color: #fff;
  border-radius: 14px; font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
.pl-title {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 1.3rem; color: var(--p-text-primary); margin: 0 0 4px;
}
.pl-desc {
  color: var(--p-text-secondary); font-size: 0.85rem; margin: 0 0 20px;
}
.pl-field {
  text-align: left; margin-bottom: 14px;
}
.pl-field label {
  display: block; font-size: 0.8rem; color: var(--p-text-secondary);
  margin-bottom: 6px; font-weight: 500;
}
.pl-field input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--p-border-solid); background: var(--p-bg);
  color: var(--p-text-primary); font-size: 1rem;
  font-family: 'DM Sans', sans-serif; box-sizing: border-box;
}
.pl-field input:focus {
  outline: none; border-color: var(--p-blue);
}
.pl-btn {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: var(--p-blue); color: #fff; font-size: 1rem;
  font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin-top: 6px; min-height: 48px;
}
.pl-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.pl-error {
  color: var(--p-red); font-size: 0.85rem; margin-top: 12px;
}
.pl-hint {
  color: var(--p-text-secondary); font-size: 0.78rem; margin-top: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ Logout Button ══ */
/* ══ Profile Edit Sections ══ */
.pp-edit-section {
  margin-top: var(--p-space-md);
}
.pp-sec-icon {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-right: 4px;
  color: var(--p-amber);
}
.pp-edit-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border-solid);
  border-radius: var(--p-radius-md);
  padding: var(--p-space-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pp-edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-edit-label {
  font-family: var(--p-font-body);
  font-size: 0.82rem;
  color: var(--p-text-secondary);
  font-weight: 500;
}
.pp-edit-input {
  background: var(--p-bg);
  border: 1px solid var(--p-border-solid);
  border-radius: var(--p-radius-sm);
  color: var(--p-text-primary);
  font-family: var(--p-font-body);
  font-size: 1rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}
.pp-edit-input:focus {
  border-color: var(--p-blue);
}
.pp-edit-input::placeholder {
  color: var(--p-text-secondary);
  opacity: 0.6;
}
.pp-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237B8A9E' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.pp-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.4;
}
.pp-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--p-grad-blue-btn);
  color: #fff;
  font-family: var(--p-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--p-radius-sm);
  padding: 0 16px;
  min-height: 44px;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.pp-edit-btn:active {
  opacity: 0.85;
}
.pp-edit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pp-edit-btn--pwd {
  background: linear-gradient(135deg, var(--p-amber) 0%, #d4952e 100%);
  color: #0F1419;
}
.pp-edit-msg {
  font-family: var(--p-font-body);
  font-size: 0.85rem;
  min-height: 0;
  transition: all 0.2s;
}
.pp-edit-msg:empty {
  display: none;
}
.pp-edit-msg--success {
  color: var(--p-green);
}
.pp-edit-msg--error {
  color: var(--p-red);
}

.pp-logout-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px; margin: 16px 0 0;
  border: 1.5px solid var(--p-border-solid); border-radius: 10px;
  background: transparent; color: var(--p-red);
  font-size: 0.9rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
}
.pp-logout-btn:active { background: rgba(239, 68, 68, 0.1); }

/* ══════════════════════════════════════════════════════
   CALENDAR VIEW
   ══════════════════════════════════════════════════════ */

.portal-calendar {
  padding: var(--p-space-md);
  animation: fadeInUp 0.3s ease;
}

/* -- Header with month + nav arrows -- */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--p-space-md);
}
.cal-header-title {
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--p-text-primary);
  margin: 0;
}
.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--p-surface);
  border: 1px solid var(--p-border-solid);
  color: var(--p-text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--p-transition), color var(--p-transition);
}
.cal-nav-btn:hover {
  background: var(--p-blue);
  color: #fff;
  border-color: var(--p-blue);
}
.cal-nav-btn:active {
  transform: scale(0.92);
}

/* -- Week strip grid -- */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: var(--p-space-lg);
  transition: opacity 0.2s ease;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: var(--p-radius-md);
  cursor: pointer;
  transition: background var(--p-transition), transform var(--p-transition), box-shadow var(--p-transition);
  border: 2px solid transparent;
  min-height: 68px;
  justify-content: center;
}
.cal-day:hover {
  background: rgba(255, 255, 255, 0.05);
}
.cal-day:active {
  transform: scale(0.93);
}

/* Today: accent border */
.cal-day.today {
  border-color: var(--p-blue);
  background: rgba(14, 165, 233, 0.06);
}

/* Selected day: filled background + glow */
.cal-day.selected {
  background: var(--p-blue);
  border-color: var(--p-blue);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.35), 0 4px 12px rgba(14, 165, 233, 0.2);
}
.cal-day.selected .cal-day-name,
.cal-day.selected .cal-day-num {
  color: #fff;
}
/* When today IS selected, override text color */
.cal-day.today.selected .cal-day-name,
.cal-day.today.selected .cal-day-num {
  color: #fff;
}

.cal-day-name {
  font-size: 10px;
  font-family: var(--p-font-body);
  font-weight: 500;
  color: var(--p-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}
.cal-day-num {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--p-font-display);
  margin: 4px 0 3px;
  color: var(--p-text-primary);
  line-height: 1;
}

/* -- Task indicator dots -- */
.cal-dots {
  display: flex;
  gap: 4px;
  height: 6px;
  align-items: center;
  justify-content: center;
}
.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.cal-dot.accepted {
  background: var(--p-green);
}
.cal-dot.pending {
  background: var(--p-amber);
}
/* Dots should stay visible even on selected state */
.cal-day.selected .cal-dot.accepted {
  background: #6ee7b7;
}
.cal-day.selected .cal-dot.pending {
  background: #fcd34d;
}

/* -- Day view header -- */
.cal-day-header {
  font-family: var(--p-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--p-text-primary);
  margin-bottom: var(--p-space-md);
  padding-bottom: var(--p-space-sm);
  border-bottom: 1px solid var(--p-border-solid);
}

/* -- Day view task list -- */
.cal-day-view {
  min-height: 120px;
}
.cal-day-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--p-space-sm);
}

/* Staggered fade-in animation for task cards */
@keyframes calTaskFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cal-task-anim {
  animation: calTaskFadeIn 0.35s ease forwards;
  opacity: 0;
}

/* -- Empty state -- */
.cal-empty {
  text-align: center;
  padding: 48px var(--p-space-md);
  color: var(--p-text-secondary);
}
.cal-empty .pe-icon {
  font-size: 2.5rem;
  margin-bottom: var(--p-space-sm);
  opacity: 0.5;
}
.cal-empty .pe-text {
  font-size: 0.95rem;
  font-family: var(--p-font-body);
}

/* -- Desktop: wider week strip -- */
@media (min-width: 1024px) {
  .portal-calendar {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--p-space-lg);
  }
  .cal-day {
    padding: 10px 6px;
    min-height: 76px;
  }
  .cal-day-num {
    font-size: 20px;
  }
  .cal-header-title {
    font-size: 1.25rem;
  }
}

/* ─── VIP + Shots Tabs ─── */
.ptd-vip-shots-section { margin-top: 16px; }
.ptd-tabs { display: flex; gap: 4px; padding: 0 4px; margin-bottom: 12px; }
.ptd-tab { flex: 1; padding: 10px; border: none; background: var(--p-surface); color: var(--p-text-muted); font-size: 0.82rem; font-weight: 600; font-family: inherit; cursor: pointer; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.ptd-tab .material-symbols-rounded { font-size: 1rem; }
.ptd-tab.active { background: var(--p-blue); color: white; }

/* VIP List (Dark Theme) */
.vip-group-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--p-text-muted); padding: 16px 16px 6px; }
.vip-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--p-border); }
.vip-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.vip-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--p-surface); color: var(--p-text-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.vip-info { flex: 1; min-width: 0; }
.vip-name { font-weight: 600; font-size: 0.92rem; color: var(--p-text-primary); }
.vip-relation { font-size: 0.78rem; color: var(--p-text-muted); }
.vip-notes { font-size: 0.75rem; color: var(--p-text-muted); margin-top: 2px; font-style: italic; }

/* Shots Gallery (Dark Theme) */
.shots-progress { text-align: center; padding: 12px; font-size: 0.85rem; font-weight: 600; color: var(--p-green); }
.shots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 16px; }
.shot-card { background: var(--p-surface); border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--p-border); }
.shot-card.done { opacity: 0.6; }
.shot-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.shot-thumb-empty { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--p-border); color: var(--p-text-muted); }
.shot-thumb-empty .material-symbols-rounded { font-size: 2rem; }
.shot-info { padding: 8px 10px; }
.shot-title { font-size: 0.78rem; font-weight: 600; color: var(--p-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-category { font-size: 0.65rem; color: var(--p-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.shot-done-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.5); border: none; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; min-height: 44px; }
.shot-done-btn .material-symbols-rounded { font-size: 1.2rem; }
.shot-card.done .shot-done-btn { color: var(--p-green); }
