/* ══════════════════════════════════════
   CLIENT PORTAL — Styles
   Inherits: /css/base.css (fonts, vars, reset)
             /css/sidebar.css (sidebar layout)
   ══════════════════════════════════════ */

/* ── Main area (mirrors hero.css — not imported in portal) ── */
.main {
  margin-left: var(--sidebar-collapsed);
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: margin-left var(--sidebar-transition);
}

.main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.10), rgba(0,0,0,0.10)),
    url('/assets/backgrounds/bg.webp');
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  overflow-wrap: break-word;
  word-break: break-word;
}

a { color: var(--ll-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   PANEL SWITCHING (auth vs portal content)
   ══════════════════════════════════════ */
.portal-panel { display: none; }
.portal-panel--active { display: block; }

/* ══════════════════════════════════════
   PORTAL VIEWS
   ══════════════════════════════════════ */
.portal-view { display: none; }
.portal-view--active { display: block; }


/* ══════════════════════════════════════
   YOUR PROJECTS — Split-pane layout
   ══════════════════════════════════════ */
.projects-split {
  display: flex;
  height: calc(100vh - 80px);
  min-height: 400px;
}

/* Left sidebar — project list */
.projects-sidebar {
  width: 300px;
  min-width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  border-left: 3px solid rgba(255, 180, 0, 0.25);
  overflow: hidden;
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Project rows */
.proj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.15s;
}

.proj-row:hover {
  background: rgba(255, 180, 0, 0.04);
}

.proj-row--active {
  background: rgba(255, 180, 0, 0.08);
  border-left: 3px solid var(--ll-gold);
  padding-left: 17px;
}

.proj-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.proj-row__title {
  font-family: "Electrolize", "Rajdhani", sans-serif;
  font-size: 1.1rem;
  color: var(--ll-off-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-row__meta {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

.proj-row__badge {
  flex-shrink: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.proj-row__badge--active {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.proj-row__badge--paused {
  color: var(--ll-amber);
  background: rgba(255, 180, 0, 0.10);
  border: 1px solid rgba(255, 180, 0, 0.20);
}

.proj-row__badge--complete {
  color: #90caf9;
  background: rgba(144, 202, 249, 0.10);
  border: 1px solid rgba(144, 202, 249, 0.20);
}

.proj-row__badge--pending {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Right pane — project detail */
.projects-viewer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 12, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.projects-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-family: "Share Tech Mono", monospace;
  font-size: 1.1rem;
}

/* Billing placeholder */
.billing-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 120px);
  gap: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-family: "Share Tech Mono", monospace;
  font-size: 1.1rem;
}

/* Project detail content */
.projects-detail {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Detail tab bar */
.pd-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
  flex-shrink: 0;
}

.pd-tab {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s;
}

.pd-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.pd-tab--active {
  color: var(--ll-amber);
  border-bottom-color: var(--ll-amber);
}

/* Tab content panels */
.pd-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.pd-tab-content--active {
  display: block;
}

.pd-empty-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.25);
  font-family: "Share Tech Mono", monospace;
  font-size: 1rem;
}

.pd-empty-tab .material-symbols-outlined {
  font-size: 48px;
  opacity: 0.3;
}

.pd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.pd-header-title {
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: fit-content;
  max-width: 50%;
  text-align: center;
}

.pd-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
}

.pd-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.pd-desc {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Progress section in detail */
.pd-progress {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.pd-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pd-progress-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pd-progress-pct {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.1rem;
  color: var(--ll-amber);
}

.pd-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pd-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ll-gold), var(--ll-amber));
  transition: width 0.4s ease;
}

/* Dates — inline with title */
.pd-dates {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

.pd-date-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 16px;
}

.pd-date-item .material-symbols-outlined {
  font-size: 18px;
  color: rgba(255, 180, 0, 0.5);
}

/* Mobile back button — hidden on desktop, shown in mobile media query */
.mobile-back-btn { display: none; }

@media (max-width: 768px) {
  /* ── Projects: list / detail swap ── */
  .projects-split {
    flex-direction: column;
    height: calc(100vh - 80px);
  }
  .projects-sidebar {
    width: 100% !important;
    min-width: 0;
    flex: 1;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  .projects-viewer {
    display: none;
    min-width: 0;
    min-height: 0;
    border: none;
    border-radius: 0;
  }

  /* When a project is selected, swap list for detail */
  .projects-split.mobile-detail-open .projects-sidebar { display: none; }
  .projects-split.mobile-detail-open .projects-viewer {
    display: flex;
    flex: 1;
  }

  .projects-detail { padding: 20px 16px; }
  .pd-header {
    flex-direction: column;
    gap: 12px;
  }
  .pd-header-title {
    max-width: 100%;
  }
  .pd-dates {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .pd-tab {
    font-size: 0.88rem;
    padding: 8px 12px;
  }
  .pd-title { font-size: 1.5rem; }

  /* Show mobile back button */
  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--ll-gold);
    font-family: "Share Tech Mono", monospace;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0 12px;
    margin-right: auto;
  }
  .mobile-back-btn .material-symbols-outlined { font-size: 20px; }

  /* Projects font-size bumps */
  .proj-row__meta  { font-size: 0.88rem; }
  .proj-row__badge { font-size: 0.85rem; }
}


/* ══════════════════════════════════════
   MOBILE — Menu button, overlay, layout
   ══════════════════════════════════════ */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.92);
  backdrop-filter: blur(12px);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ll-amber);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.mobile-overlay.active { display: block; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }

  .mobile-menu-btn.menu-open {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
    width: var(--sidebar-expanded);
  }

  .sidebar.sidebar--open .nav-label { opacity: 1; }
  .sidebar.sidebar--open .sidebar-profile .nav-label { opacity: 1; }

  .main {
    margin-left: 0 !important;
  }

  .main::before {
    background-size: cover;
  }

  .content {
    padding: 70px 16px 40px !important;
  }
}

