/**
 * Ray-B Client Portal Styling (Glassmorphic Dark Theme)
 * Version: 1.0.3 - Cache busting and floating logo header overrides
 */

:root {
  --portal-bg: #07080b;
  --portal-card-bg: rgba(20, 22, 28, 0.45);
  --portal-border: rgba(255, 255, 255, 0.08);
  --portal-accent: #b49b85;
  --portal-accent-glow: rgba(180, 155, 133, 0.15);
  --portal-text-primary: #f3f4f6;
  --portal-text-secondary: #9ca3af;
}

.client-portal-wrapper {
  background-color: var(--portal-bg);
  min-height: 100vh;
  position: relative;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  color: var(--portal-text-primary);
  padding: 40px 0 80px 0;
  overflow-x: hidden;
}

.portal-noise {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.portal-dashboard-container {
  position: relative;
  z-index: 2;
}

/* Glassmorphic UI Helper */
.glass {
  background: var(--portal-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. LOGIN SCREEN */
.portal-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 30px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  max-width: 130px;
  height: auto;
  margin-bottom: 20px;
  filter: invert(1); /* Invert standard black logo to white */
}

.login-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--portal-text-secondary);
  line-height: 1.5;
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  color: #f87171;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Customizing default WP Login Form */
#rayb-login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#rayb-login-form label {
  font-size: 0.85rem;
  color: var(--portal-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

#rayb-login-form input[type="text"],
#rayb-login-form input[type="password"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
}

#rayb-login-form input[type="text"]:focus,
#rayb-login-form input[type="password"]:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 10px var(--portal-accent-glow);
  outline: none;
}

#rayb-login-form .login-remember {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

#rayb-login-form .login-remember label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

#rayb-login-form .login-submit {
  margin-top: 10px;
}

#rayb-login-form #wp-submit {
  width: 100%;
  background: var(--portal-accent);
  border: none;
  color: #111;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
}

#rayb-login-form #wp-submit:hover {
  background: #fff;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* 2. AUTHENTICATED HEADER BAR */
.portal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--portal-border);
  padding-bottom: 25px;
}

.company-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--portal-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.portal-header-bar h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #fff;
  letter-spacing: -0.7px;
}

.project-meta-row {
  display: flex;
  gap: 20px;
  align-items: center;
}

.meta-item {
  font-size: 0.85rem;
  color: var(--portal-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-item i {
  color: var(--portal-accent);
}

.quotation-text {
  color: #fff;
  font-weight: 600;
}

.btn-meta-edit {
  background: transparent;
  border: none;
  color: var(--portal-text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.3s;
}

.btn-meta-edit:hover {
  color: #fff;
}

.logout-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* 3. DUAL COLUMN LAYOUT */
.portal-dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.portal-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.card-header {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 15px;
}

.card-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.2px;
}

.card-header p.subtitle {
  font-size: 0.8rem;
  color: var(--portal-text-secondary);
  margin-top: 4px;
  margin-bottom: 0;
}

/* 4. PROGRESS RING CARD */
.progress-radial-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.6s ease-in-out;
}

.progress-percentage-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-percentage-label .percent-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.progress-percentage-label .percent-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--portal-text-secondary);
  margin-top: 4px;
}

.progress-summary-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

.summary-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  gap: 10px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.indicator-dot.done { background-color: #10b981; }
.indicator-dot.active { background-color: var(--portal-accent); }
.indicator-dot.pending { background-color: #4b5563; }

.summary-label {
  color: var(--portal-text-secondary);
  flex-grow: 1;
}

.summary-item strong {
  color: #fff;
}

/* 5. TIMELINE CARD */
.portal-timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 20px;
  flex-grow: 1;
}

.portal-timeline-steps::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 15px;
  bottom: 15px;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  z-index: 2;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.timeline-step.active {
  opacity: 1;
}

.timeline-step.completed {
  opacity: 0.8;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #14161c;
  border: 2px solid #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--portal-text-secondary);
  transition: all 0.3s;
}

.timeline-step.active .step-num {
  border-color: var(--portal-accent);
  background: var(--portal-accent);
  color: #111;
  box-shadow: 0 0 10px var(--portal-accent-glow);
}

.timeline-step.completed .step-num {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.step-text h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #fff;
}

.step-text p {
  font-size: 0.75rem;
  color: var(--portal-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* 6. ADMIN TOP PANEL & CONTROLS */
.admin-top-controls {
  padding: 15px 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
  background: rgba(180, 155, 133, 0.05);
  border-color: rgba(180, 155, 133, 0.15);
}

.admin-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
}

.admin-selector-wrapper label {
  color: var(--portal-accent);
  font-weight: 500;
}

#admin-project-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--portal-border);
  padding: 8px 16px;
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.admin-mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

/* Switch Slider styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #374151;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--portal-accent);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 22px;
}

.slider.round:before {
  border-radius: 50%;
}

.admin-only {
  display: none !important; /* Managed dynamically via Javascript when adminMode is checked */
}

/* Admin elements visible in admin mode */
body.admin-mode-active .admin-only {
  display: inline-block !important;
}
body.admin-mode-active td.admin-only,
body.admin-mode-active div.admin-only,
body.admin-mode-active flex.admin-only {
  display: flex !important;
}

.admin-timeline-selector {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.admin-timeline-selector label {
  font-size: 0.8rem;
  color: var(--portal-text-secondary);
  display: block;
  margin-bottom: 8px;
}

.admin-timeline-selector select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--portal-border);
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  width: 100%;
  font-size: 0.8rem;
}

/* 7. DELIVERABLES TABLE */
.deliverables-card {
  padding: 30px;
}

.deliverables-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.deliverables-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.deliverables-table th {
  padding: 12px 10px;
  border-bottom: 2px solid rgba(255,255,255,0.05);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--portal-text-secondary);
  font-weight: 600;
  vertical-align: middle;
}

.deliverables-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}

.camera-info-col {
  min-width: 140px;
}

.cam-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cam-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.82rem;
}

.edit-cam-actions {
  display: flex;
  gap: 8px;
}

.btn-icon-action {
  background: transparent;
  border: none;
  color: var(--portal-text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px;
  transition: color 0.3s;
}

.btn-icon-action:hover {
  color: #fff;
}

.btn-icon-action.delete-cam-btn:hover {
  color: #ef4444;
}

/* Phase 1 checkmark badge */
.phase1-badge-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 20px;
}

.phase1-badge-check.checked,
.phase1-badge-check.completed {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.phase1-badge-check.pending {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Revisions Slots (Thumbnails) */
.revision-slots-wrapper {
  display: flex;
  gap: 6px;
}

.revision-slot-item {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px dashed var(--portal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.revision-slot-item.has-img {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.2);
}

.revision-slot-item.has-img:hover {
  border-color: var(--portal-accent);
  box-shadow: 0 0 10px var(--portal-accent-glow);
  transform: scale(1.08);
}

.revision-slot-item.empty {
  background: rgba(255, 255, 255, 0.01);
  cursor: default;
}

body.admin-mode-active .revision-slot-item.empty {
  cursor: pointer;
}

body.admin-mode-active .revision-slot-item.empty:hover {
  border-color: var(--portal-accent);
  background: rgba(255, 255, 255, 0.03);
}

.slot-number {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4b5563;
}

.slot-overlay-edit {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 6px;
  font-size: 0.8rem;
}

.revision-slot-item:hover .slot-overlay-edit {
  opacity: 1;
}

/* Approvals Buttons */
.approvals-col {
  min-width: 170px;
}

.approval-button-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phase-mini-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--portal-text-secondary);
  font-weight: 500;
}

.btn-approval-status {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--portal-border);
  color: var(--portal-text-secondary);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  width: 100%;
  justify-content: center;
  transition: all 0.3s;
}

.btn-approval-status.pending:hover:not(:disabled) {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.05);
  color: #34d399;
}

.btn-approval-status.approved {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  cursor: default;
}

body.admin-mode-active .btn-approval-status.approved.admin-revert-approval {
  cursor: pointer !important;
  pointer-events: auto !important;
}

body.admin-mode-active .btn-approval-status.approved.admin-revert-approval:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
}

.btn-approval-status:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 8. INTERACTIVE ANNOTATION LIGHTBOX */
.portal-annotation-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.annotation-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 4, 6, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.annotation-modal-container {
  width: 100%;
  max-width: 1300px;
  height: 85vh;
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.annotation-modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.annotation-modal-header h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.annotation-modal-header p {
  font-size: 0.75rem;
  color: var(--portal-text-secondary);
  margin: 4px 0 0 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--portal-text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px;
  transition: color 0.3s;
}

.modal-close-btn:hover {
  color: #fff;
}

.annotation-modal-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex-grow: 1;
  overflow: hidden;
  height: calc(100% - 85px);
}

/* Image Canvas */
.annotation-canvas-column {
  background: #030406;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
  position: relative;
}

.canvas-zoom-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}

.annotation-image-wrapper {
  position: relative;
  display: inline-block;
  cursor: crosshair;
}

.annotation-image-wrapper img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Coordinate pin point */
.pin-point {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--portal-accent);
  border: 2px solid #fff;
  border-radius: 50%;
  color: #111;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.2s, background 0.2s;
}

.pin-point:hover, .pin-point.active {
  transform: translate(-50%, -50%) scale(1.2);
  background: #fff;
  color: #000;
  box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* Annotation Sidebar */
.annotation-sidebar-column {
  border-left: 1px solid var(--portal-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(14, 16, 21, 0.4);
}

.sidebar-comments-list-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow-y: auto;
  padding: 25px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sidebar-header h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.sidebar-header .badge {
  background: var(--portal-accent-glow);
  color: var(--portal-accent);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.sidebar-pins-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.empty-comments-state {
  padding: 40px 20px;
  color: var(--portal-text-secondary);
}

.empty-comments-state i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-comments-state p {
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Discussion Card item */
.discussion-card {
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.discussion-card:hover, .discussion-card.active {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.03) !important;
}

.discussion-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  margin-bottom: 8px;
  color: var(--portal-text-secondary);
}

.discussion-meta .pin-badge {
  background: var(--portal-accent);
  color: #111;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.discussion-meta .author-tag {
  font-weight: 600;
  color: #fff;
}

.discussion-meta .role-tag {
  font-size: 0.65rem;
  opacity: 0.8;
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.discussion-card p.comment-text {
  font-size: 0.8rem;
  color: #f3f4f6;
  margin: 0 0 10px 0;
  line-height: 1.4;
  word-wrap: break-word;
}

.ref-img-preview {
  margin-bottom: 10px;
}

.ref-img-preview img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
}

.ref-img-preview a {
  font-size: 0.7rem;
  color: var(--portal-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Replies timeline */
.pin-replies-section {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-item {
  font-size: 0.75rem;
  line-height: 1.4;
}

.reply-author {
  font-weight: 600;
  color: #fff;
  margin-right: 6px;
}

.reply-role {
  font-size: 0.6rem;
  color: var(--portal-text-secondary);
  opacity: 0.7;
}

.reply-text {
  color: #d1d5db;
}

/* Quick reply bar */
.reply-input-bar {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.reply-input-bar input {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--portal-border);
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.75rem;
  flex-grow: 1;
}

.reply-input-bar input:focus {
  outline: none;
  border-color: var(--portal-accent);
}

.reply-input-bar button {
  background: var(--portal-accent) !important;
  border: none !important;
  color: #000000 !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  cursor: pointer !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  transition: all 0.3s !important;
}

.reply-input-bar button:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

/* Floating annotation form panel (Inside Sidebar Bottom) */
.sidebar-editor-form {
  padding: 25px;
  border-top: 1px solid var(--portal-border);
  background: rgba(17, 24, 39, 0.95) !important;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.editor-header h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.btn-text-close {
  background: transparent;
  border: none;
  color: var(--portal-text-secondary);
  cursor: pointer;
  padding: 4px;
}

.form-control-portal {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--portal-border);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  font-family: inherit;
  font-size: 0.8rem;
  box-sizing: border-box;
}

.form-control-portal:focus {
  border-color: var(--portal-accent);
  outline: none;
}

/* File Upload button wrapper */
.file-upload-group input[type="file"] {
  display: none;
}

.custom-file-upload {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--portal-border);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--portal-text-secondary);
}

.custom-file-upload:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.file-name-preview {
  font-size: 0.65rem;
  color: var(--portal-text-secondary);
  margin-top: 5px;
  text-align: center;
}

.btn-primary {
  background: var(--portal-accent) !important;
  border: none !important;
  color: #000000 !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  font-size: 0.8rem !important;
  transition: all 0.3s !important;
  width: 100% !important;
}

.btn-primary:hover {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(255,255,255,0.15) !important;
}

/* 9. RESPONSIVE DESIGN */
@media (max-width: 991px) {
  .portal-dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .portal-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .logout-btn {
    width: 100%;
  }
  
  .annotation-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 320px;
    height: calc(100% - 75px);
  }
  
  .annotation-sidebar-column {
    border-left: none;
    border-top: 1px solid var(--portal-border);
  }
  
  .annotation-image-wrapper img {
    max-height: 45vh;
  }
}

@media (max-width: 576px) {
  .client-portal-wrapper {
    padding: 20px 0 40px 0;
  }
  
  .portal-header-bar h2 {
    font-size: 1.6rem;
  }
  
  .project-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .deliverables-table th {
    padding: 10px;
    font-size: 0.7rem;
  }
  
  .deliverables-table td {
    padding: 12px 10px;
  }
  
  .revision-slots-wrapper {
    gap: 4px;
  }
  
  .revision-slot-item {
    width: 34px;
    height: 34px;
  }
}

/* 13. PORTAL NEW FEATURES & STYLING */

/* Progress Circle Color */
.progress-ring-circle {
  stroke: url(#portal-progress-gradient) !important;
}

/* Section Grouping Header in Deliverables Table */
.section-title-row {
  background: rgba(255, 255, 255, 0.02) !important;
}

.section-title-cell {
  padding: 12px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--portal-accent) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  letter-spacing: 0.5px !important;
  text-align: left;
}

/* Admin settings inline form inside controls */
.admin-project-settings-form {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
  width: 100%;
}

.admin-project-settings-form h5 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--portal-accent);
}

.settings-inputs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.setting-field label {
  font-size: 0.75rem;
  color: var(--portal-text-secondary);
}

.setting-field input[type="text"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--portal-border);
  padding: 8px 12px;
  color: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  width: 100%;
}

.setting-field.checkbox-field {
  flex-direction: row;
  align-items: center;
  height: 38px;
  min-width: 160px;
}

.setting-field.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #fff;
}

#adminSaveSettingsBtn {
  width: auto;
  padding: 8px 20px;
  height: 38px;
}

/* Direct layouts for approval icons */
.approval-button-status {
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-approval-status {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* 14. INTERACTIVE MODELADO TOGGLE & FIXED HEADER FOR PORTAL */

.btn-toggle-phase1 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-toggle-phase1.pending {
  color: #e67e22 !important;
  background: rgba(230, 126, 34, 0.1) !important;
}

.btn-toggle-phase1.pending:hover {
  background: rgba(230, 126, 34, 0.2) !important;
}

.btn-toggle-phase1.checked,
.btn-toggle-phase1.completed {
  color: #2ecc71 !important;
  background: rgba(46, 204, 113, 0.1) !important;
}

.btn-toggle-phase1.checked:hover,
.btn-toggle-phase1.completed:hover {
  background: rgba(46, 204, 113, 0.2) !important;
}

/* Section Title layout styling */
.section-title-wrapper {
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.section-title-text {
  font-weight: 700;
}

/* Hide site menu components on client page */
#fullscreen-menu,
.menu-close-btn {
  display: none !important;
}

/* Completely hide theme site-header on portal page to avoid menu tracking / scrolling overlays */
.site-header {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Custom Minimal Floating logo header for Client Portal */
.portal-fixed-logo-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999 !important;
}

.portal-logo-link {
  display: block;
}

.portal-logo-link img {
  height: 26px;
  width: auto;
  display: block;
}

/* Shift main content container down so it isn't covered by our custom minimal logo header */
.page-template-page-cliente .client-portal-wrapper {
  padding-top: 135px !important;
}

/* Phase 1: En Proceso (In Progress) State Badge */
.btn-toggle-phase1.in_progress,
.phase1-badge-check.in_progress {
  color: #3498db !important;
  background: rgba(52, 152, 219, 0.1) !important;
}

.btn-toggle-phase1.in_progress:hover {
  background: rgba(52, 152, 219, 0.2) !important;
}

/* Custom Centered Modal Dialogs (Alert & Confirm Replacements) */
.portal-custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-custom-modal {
  width: 90%;
  max-width: 400px;
  background: rgba(20, 22, 28, 0.95) !important;
  border: 1px solid rgba(180, 155, 133, 0.25) !important;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes modalScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-custom h4 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--portal-accent);
}

.modal-body-custom p {
  font-size: 0.85rem;
  color: #c5c5c7;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.modal-footer-custom {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal-footer-custom button {
  padding: 8px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
  min-width: 100px;
}

.modal-footer-custom .btn-primary {
  background: var(--portal-accent) !important;
  border: 1px solid var(--portal-accent) !important;
  color: #000 !important;
}

.modal-footer-custom .btn-primary:hover {
  background: #fff !important;
  border-color: #fff !important;
}

.modal-footer-custom .btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.modal-footer-custom .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Hide client-only elements in admin mode */
body.admin-mode-active .client-only {
  display: none !important;
}

/* Styling for Add Section & Add Camera buttons in portal (Ensure premium visibility) */
#addSectionBtn,
.add-camera-to-sec-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  padding: 8px 16px !important;
  font-size: 0.8rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#addSectionBtn:hover,
.add-camera-to-sec-btn:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

.add-camera-to-sec-btn {
  padding: 6px 12px !important;
  font-size: 0.75rem !important;
}

/* Premium Synology Download Button States */
.synology-download-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 20px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

/* Disabled State: Lead / plomo color */
.synology-download-btn.disabled {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Active State: Green letters and border (Vibrant approved emerald green) */
.synology-download-btn.active {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important; /* Strong emerald green approved color */
  cursor: pointer !important;
  pointer-events: auto !important;
}

.synology-download-btn.active:hover {
  background: #34d399 !important;
  border-color: #34d399 !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

/* Header logout right-side controls container */
.header-logout {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 12px !important;
}

/* Green Color Palette for Interactive Annotations Zone */
.portal-annotation-modal .btn-primary,
.portal-annotation-modal .reply-input-bar button {
  background: #34d399 !important; /* Vibrant emerald green approved color */
  border: none !important;
  color: #000000 !important; /* Pure black text for maximum contrast */
  font-weight: 700 !important;
  box-shadow: 0 4px 10px rgba(52, 211, 153, 0.2) !important;
}

.portal-annotation-modal .btn-primary:hover,
.portal-annotation-modal .reply-input-bar button:hover {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.4) !important;
}

.portal-annotation-modal .sidebar-editor-form {
  background: rgba(20, 24, 33, 0.98) !important;
  border-top: 1px solid rgba(52, 211, 153, 0.2) !important;
}

.portal-annotation-modal .form-control-portal:focus {
  border-color: #34d399 !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.2) !important;
}

.portal-annotation-modal .custom-file-upload:hover {
  border-color: #34d399 !important;
  color: #34d399 !important;
}

/* Highlighted Annotation Pins and Badges inside the lightbox area */
.portal-annotation-modal .pin-badge {
  background: #ffffff !important; /* Default white background */
  color: #000000 !important; /* Black text */
  font-weight: 700 !important;
  width: 20px !important;
  height: 20px !important;
  line-height: 20px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  aspect-ratio: 1/1 !important;
  box-sizing: border-box !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15) !important;
  transition: all 0.25s ease !important;
}

/* Default state for pins on image canvas: White background, black text */
.portal-annotation-modal .pin-point {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  transition: all 0.25s ease !important;
}

/* Hover and Active highlights: Vibrant approved green (#34d399) */
.portal-annotation-modal .pin-badge.hovered,
.portal-annotation-modal .pin-badge.active,
.portal-annotation-modal .discussion-card:hover .pin-badge,
.portal-annotation-modal .discussion-card.active .pin-badge,
.portal-annotation-modal .pin-point:hover,
.portal-annotation-modal .pin-point.hovered,
.portal-annotation-modal .pin-point.active {
  background: #34d399 !important; /* Approved Green */
  color: #000000 !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6) !important;
}

/* Discussion Card Hover synchronization highlight styling */
.portal-annotation-modal .discussion-card.hovered {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.03) !important;
}
.portal-annotation-modal .discussion-card.hovered .pin-badge {
  background: #34d399 !important;
  color: #000000 !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6) !important;
}

/* Pulsing Radar/Wave Effect for Pins on Image */
.portal-annotation-modal .pin-point {
  position: absolute;
}

.portal-annotation-modal .pin-point::after,
.portal-annotation-modal .pin-point::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  pointer-events: none;
  animation: pinPulse 2.5s infinite ease-out;
  box-sizing: border-box;
}

/* Offset delay for second wave */
.portal-annotation-modal .pin-point::before {
  animation-delay: 1.25s !important;
}

/* Green Pulsing Ring when Hovered or Active (Two Green Waves) */
.portal-annotation-modal .pin-point.hovered::after,
.portal-annotation-modal .pin-point.hovered::before,
.portal-annotation-modal .pin-point:hover::after,
.portal-annotation-modal .pin-point:hover::before,
.portal-annotation-modal .pin-point.active::after,
.portal-annotation-modal .pin-point.active::before {
  border-color: #34d399 !important;
  animation: pinPulseGreen 1.8s infinite ease-out;
}

/* Offset delay for second green wave */
.portal-annotation-modal .pin-point.hovered::before,
.portal-annotation-modal .pin-point:hover::before,
.portal-annotation-modal .pin-point.active::before {
  animation-delay: 0.9s !important;
}

/* Soft constant scaling pulse for the active/hovered pin itself */
.portal-annotation-modal .pin-point.hovered,
.portal-annotation-modal .pin-point:hover,
.portal-annotation-modal .pin-point.active {
  animation: activePinScalePulse 1.8s infinite ease-in-out !important;
}

@keyframes activePinScalePulse {
  0% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes pinPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes pinPulseGreen {
  0% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
    box-shadow: 0 0 0 12px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

/* ========================================== */
/* 10. MULTI-PROJECT SELECTOR DASHBOARD       */
/* ========================================== */
.portal-project-dashboard {
  margin-top: 40px;
  margin-bottom: 60px;
}

.dashboard-welcome {
  margin-bottom: 30px;
  text-align: center;
}

.dashboard-welcome h2 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #fff 30%, #a9b388 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-welcome p {
  color: var(--portal-text-secondary);
  font-size: 1rem;
  margin: 0;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 20px;
  justify-content: center;
}

.project-card {
  width: 100%;
  max-width: 360px;
  padding: 25px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.3) !important;
  box-shadow: 0 8px 30px rgba(52, 211, 153, 0.08) !important;
}

.project-card-header h4 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
}

.company-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  color: var(--portal-text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.project-card-progress {
  margin: 20px 0;
}

.project-card-progress .progress-bar-wrapper {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.project-card-progress .progress-bar-fill {
  background: linear-gradient(90deg, var(--portal-accent) 0%, #34d399 100%);
  height: 100%;
  border-radius: 3px;
}

.project-card-progress .progress-text {
  font-size: 0.75rem;
  color: var(--portal-text-secondary);
  font-weight: 600;
}

.project-card-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}


/* ========================================== */
/* 11. ACCESS & INVITATIONS MANAGER          */
/* ========================================== */
.client-manager-modal .annotation-modal-container {
  display: flex;
  flex-direction: column;
}

.manager-tabs {
  display: flex;
  gap: 10px;
  padding: 0 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.manager-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--portal-text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.manager-tab-btn:hover {
  color: #fff;
}

.manager-tab-btn.active {
  color: #34d399;
  border-bottom-color: #34d399;
}

.manager-tab-content {
  display: none;
  flex-grow: 1;
  padding: 0 25px 25px 25px;
  overflow-y: auto;
}

.manager-tab-content.active {
  display: flex;
  flex-direction: column;
}

.manager-split-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  height: 100%;
  min-height: 0;
}

.manager-panel-form {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 25px;
}

.manager-panel-form h5,
.manager-panel-list h5,
.manager-users-layout h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 15px 0;
  border-left: 3px solid #34d399;
  padding-left: 10px;
}

.project-checkboxes-list {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
}

.checkbox-label:hover span {
  color: #34d399 !important;
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.manager-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--portal-text-secondary);
  padding: 8px 10px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.manager-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.manager-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.copy-invite-token:hover {
  color: #fff !important;
}

.user-projects-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 768px) {
  .manager-split-layout {
    grid-template-columns: 1fr;
  }
  .manager-panel-form {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 25px;
  }
}

/* User Profile Widget & Edit Modal */
.user-profile-widget {
  transition: background-color 0.2s, border-color 0.2s;
}

.user-profile-widget:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(180, 155, 133, 0.3) !important;
}

.btn-edit-profile-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s;
}

.btn-edit-profile-name:hover {
  color: var(--portal-accent) !important;
  transform: scale(1.15);
}

.profile-edit-modal .annotation-modal-container {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(180, 155, 133, 0.2);
}

/* Finished project card styling */
.finished-project-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.finished-project-card:hover {
  border-color: rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.08) !important;
}

.finished-project-card .btn-primary:hover {
  background: #34d399 !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3) !important;
  border-color: #34d399 !important;
}

/* Fix select focus background white flash */
.admin-timeline-selector select:focus,
select:focus,
select:active,
select option {
  background-color: #11141a !important;
  color: #fff !important;
  outline: none !important;
  border-color: var(--portal-accent) !important;
  box-shadow: 0 0 10px var(--portal-accent-glow) !important;
}

/* Admin Editable Fields Pulsing Glow Animation */
@keyframes admin-pulse-glow {
  0% {
    box-shadow: 0 0 6px rgba(180, 155, 133, 0.15);
    border-color: rgba(180, 155, 133, 0.25);
  }
  50% {
    box-shadow: 0 0 14px rgba(180, 155, 133, 0.5);
    border-color: rgba(180, 155, 133, 0.7);
  }
  100% {
    box-shadow: 0 0 6px rgba(180, 155, 133, 0.15);
    border-color: rgba(180, 155, 133, 0.25);
  }
}

body.admin-mode-active #addSectionBtn,
body.admin-mode-active .add-camera-to-sec-btn {
  animation: admin-pulse-glow 2.5s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.admin-mode-active #addSectionBtn:hover,
body.admin-mode-active .add-camera-to-sec-btn:hover {
  animation: none !important;
  border-color: var(--portal-accent) !important;
  box-shadow: 0 0 15px var(--portal-accent-glow) !important;
}

/* Center table headers and cells for F1, F2, F3 and approvals */
.deliverables-table th:nth-child(2),
.deliverables-table td:nth-child(2),
.deliverables-table th:nth-child(3),
.deliverables-table td:nth-child(3),
.deliverables-table th:nth-child(4),
.deliverables-table td:nth-child(4),
.deliverables-table th:nth-child(5),
.deliverables-table td:nth-child(5),
.deliverables-table th:nth-child(6),
.deliverables-table td:nth-child(6) {
  text-align: center;
}

/* Center flex content inside columns */
.deliverables-table td:nth-child(2) .phase1-badge-check {
  margin: 0 auto;
}

.deliverables-table td:nth-child(3) .revision-slots-wrapper,
.deliverables-table td:nth-child(5) .revision-slots-wrapper {
  justify-content: center;
}

.deliverables-table td:nth-child(4) .approval-button-status,
.deliverables-table td:nth-child(6) .approval-button-status {
  align-items: center;
}

/* ========================================== */
/* 15. BUSINESS WORKSPACE ACCORDIONS & TOOLS  */
/* ========================================== */

.business-accordion-header:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.business-accordion-item.active .accordion-arrow {
  transform: rotate(180deg);
}

/* Portal Table and Grid UI */
.portal-table th {
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(180, 155, 133, 0.2);
}

.portal-table td {
  padding: 12px 10px;
  font-size: 0.8rem;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Glass Status Badges */
.badge-glass {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-glass.paid {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #34d399;
}

.badge-glass.unpaid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.badge-glass.subject-yes {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.badge-glass.subject-no {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.badge-glass.withdrawal-retirable {
  background: rgba(180, 155, 133, 0.15);
  border: 1px solid rgba(180, 155, 133, 0.3);
  color: #b49b85;
}

/* Quote Builder Inputs */
#quotationBuilderForm .form-control-portal {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.3);
}

#quotationBuilderForm .form-control-portal:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 8px var(--portal-accent-glow);
}

.q-concept-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: 8px;
}

.btn-remove-row {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 6px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-remove-row:hover {
  opacity: 1;
}

/* Mini Cards for Projects Accordion */
.project-mini-card:hover {
  border-color: rgba(180, 155, 133, 0.3) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ========================================== */
/* 16. PRINT STYLESHEET FOR QUOTATIONS        */
/* ========================================== */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  /* Hide all main page content */
  body > * {
    display: none !important;
  }
  
  /* Only show print container */
  body > #printQuotationModal {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    padding: 0 !important;
  }
  
  #printQuotationModal .annotation-modal-backdrop,
  #printQuotationModal .modal-print-toolbar {
    display: none !important;
  }
  
  #printQuotationModal .annotation-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    overflow: visible !important;
    border: none !important;
    padding: 0 !important;
  }
  
  #rayb-printable-document {
    padding: 0 !important;
    width: 100% !important;
    background: #fff !important;
    color: #000 !important;
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .print-page.cover-page {
    background: #000 !important;
    color: #fff !important;
    width: 100% !important;
    height: 297mm !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-page.details-page {
    padding: 15mm 20mm !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #000 !important;
    width: 100% !important;
  }
  
  /* Standard Print Page break configurations */
  .page-break {
    page-break-before: always;
  }

  #rayb-printable-document,
  #rayb-printable-document * {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
  }
}

/* ==================================================== */
/* 16. DYNAMIC ADMIN MODE WORKSPACE VISIBILITY TOGGLES   */
/* ==================================================== */

/* Hide admin-only workspace tools by default when admin mode is inactive */
.admin-actions-wrapper,
.admin-business-panel {
  display: none !important;
}

/* Show admin-only workspace tools when admin mode is active */
body.admin-mode-active .admin-actions-wrapper,
body.admin-mode-active .admin-business-panel {
  display: flex !important;
}

/* Hide client-only project workspace (details/viewer) when admin mode is active */
body.admin-mode-active:not(.viewing-project) .client-project-viewer {
  display: none !important;
}

#rayb-printable-document,
#rayb-printable-document * {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* FTP Deploy Trigger: 1.2.8 */

/* Drag and Drop visual styles */
.project-mini-card {
  cursor: grab;
  user-select: none;
}
.project-mini-card:active {
  cursor: grabbing;
}
.project-mini-card.dragging {
  opacity: 0.4;
  border: 1px dashed var(--portal-accent) !important;
  background: rgba(255, 255, 255, 0.01) !important;
}
.projects-dropzone {
  transition: all 0.2s ease;
}
.projects-dropzone.drag-over {
  background: rgba(180, 155, 133, 0.08) !important;
  outline: 2px dashed rgba(180, 155, 133, 0.4);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Custom scrollbars for a cleaner, darker and more premium aesthetic */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(180, 155, 133, 0.25);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 155, 133, 0.45);
}

/* Firefox scrollbar compatibility */
.deliverables-table-wrapper,
.users-table-wrapper,
.accordion-projects-list,
.projects-dropzone {
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 155, 133, 0.25) rgba(0, 0, 0, 0.15);
}

/* Quotation Builder Dynamic Concepts Responsive Layout */
.q-concept-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.q-concept-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.q-concept-row .q-item-desc {
  flex: 3;
  min-width: 150px;
}

.q-concept-row-inputs {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1.5;
  justify-content: flex-end;
}

.q-concept-row-inputs .q-item-qty {
  width: 60px;
  text-align: center;
}

.q-concept-row-inputs .q-item-price {
  width: 90px;
  text-align: right;
}

.q-concept-row-inputs .q-row-total {
  font-weight: 600;
  color: #fff;
  width: 85px;
  text-align: right;
  display: inline-block;
}

.q-concept-row-inputs .btn-remove-row {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.q-concept-row-inputs .btn-remove-row:hover {
  opacity: 1;
}

.q-concept-details-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 10px;
}

.q-subconcepts-wrapper {
  flex: 1.2;
  min-width: 180px;
}

.q-observation-wrapper {
  flex: 1;
  min-width: 180px;
}

.q-subconcepts-wrapper label,
.q-observation-wrapper label {
  display: block;
  font-size: 0.65rem;
  color: #aaa;
  margin-bottom: 4px;
}

.q-item-subconcepts {
  height: 60px;
  min-height: 60px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  width: 100%;
  line-height: 1.4;
  padding: 6px 10px;
}

.q-item-observation {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
}

/* Print Preview Mobile Scrolling Override */
#printQuotationModal .annotation-modal-container {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Media Queries (Viewports under 576px) */
@media (max-width: 576px) {
  .q-concept-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px !important;
  }
  
  .q-concept-row .q-item-desc {
    width: 100% !important;
    flex: none !important;
  }
  
  .q-concept-row-inputs {
    width: 100% !important;
    flex: none !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: 4px;
  }
  
  .q-concept-row-inputs .q-item-qty {
    flex: 1 !important;
    width: auto !important;
    max-width: 60px;
  }
  
  .q-concept-row-inputs .q-item-price {
    flex: 2 !important;
    width: auto !important;
  }
  
  .q-concept-row-inputs .q-row-total {
    flex: 1.5 !important;
    width: auto !important;
    text-align: right;
  }
  
  .q-concept-details-row {
    flex-direction: column;
    gap: 10px !important;
  }
  
  .q-subconcepts-wrapper,
  .q-observation-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    flex: none !important;
  }
  
  #rayb-printable-document {
    padding: 20px 15px !important;
  }
}

/* Quotation Builder Layout Classes */
.quotations-section-wrapper {
  padding: 20px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.q-builder-left-col {
  flex: 1.5;
  min-width: 350px;
}

.q-builder-right-col {
  flex: 1;
  min-width: 280px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 20px;
}

@media (max-width: 768px) {
  .quotations-section-wrapper {
    padding: 10px !important;
    gap: 20px !important;
  }
  .q-builder-left-col {
    min-width: 0 !important;
    width: 100% !important;
  }
  .q-builder-right-col {
    min-width: 0 !important;
    width: 100% !important;
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 20px !important;
  }
}

/* Invoices Header Actions & Filters Styling */
.invoices-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
  flex-wrap: wrap;
}

.invoices-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .invoices-header-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
  }
  
  .invoices-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  #invoiceSearchInput {
    grid-column: span 2 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  #invoicePaidFilter {
    grid-column: span 2 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  #invoiceYearFilter,
  #invoiceMonthFilter {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  #btnOpenNewInvoiceModal {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
  }
}




