/* ============================================
   Advisor Portal — portal.css
   Premium dark dashboard extending styles.css
   ============================================ */

/* --- Portal Navbar --- */
.portal-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  padding: 0 1.5rem;
  height: 64px;
}

.portal-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #f0f2f5;
}

.portal-logo .logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.portal-logo .logo-iw {
  color: #f0f2f5;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.portal-logo .logo-d {
  color: #c9a84c;
  font-weight: 700;
  font-size: 1rem;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.portal-top-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #8892a4;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
}

.portal-top-link:hover {
  color: #c9a84c;
}

/* --- Auth Section (split layout) --- */
.auth-section {
  padding-top: 64px;
  min-height: 100vh;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}

.auth-branding {
  background: linear-gradient(135deg, #0d1117 0%, #111827 50%, rgba(201, 168, 76, 0.06) 100%);
  border-right: 1px solid rgba(201, 168, 76, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-branding-content {
  max-width: 440px;
}

.auth-branding-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.5rem;
}

.auth-branding-badge span {
  color: #c9a84c;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: 'Inter', sans-serif;
}

.auth-branding h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #f0f2f5;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.auth-branding p {
  color: #8892a4;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 2rem;
}

.auth-branding-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.pending-section,
.dashboard-section {
  padding-top: 80px;
  min-height: 100vh;
  padding-bottom: 3rem;
}

/* --- Dashboard Hero --- */
.dash-hero {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.02));
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
}

.dash-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.dash-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: #f0f2f5;
  margin: 0 0 0.35rem;
}

.dash-hero p {
  margin: 0;
  font-size: 0.9rem;
}

.dash-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* --- Dashboard Stats --- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-stat-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s;
}

.dash-stat-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
}

.dash-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #f0f2f5;
  margin-bottom: 0.15rem;
}

.dash-stat-label {
  font-size: 0.75rem;
  color: #8892a4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* --- Portal Footer (enhanced) --- */
.portal-footer {
  border-top: 1px solid #1e293b;
  padding: 2.5rem 1.5rem 1.5rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.portal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.portal-footer-brand p {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #4a5568;
}

.logo-text-sm {
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1em;
}

.logo-text-sm .logo-iw {
  color: #6b7280;
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
}

.logo-text-sm .logo-d {
  color: #c9a84c;
  font-weight: 700;
  font-size: 0.8rem;
}

.portal-footer-links {
  display: flex;
  gap: 1.25rem;
}

.portal-footer-links a {
  color: #8892a4;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.portal-footer-links a:hover {
  color: #c9a84c;
}

.portal-footer .footer-sec-note {
  color: #4a5568;
  font-size: 0.7rem;
  text-align: center;
  border-top: 1px solid rgba(30, 41, 59, 0.5);
  padding-top: 1rem;
  margin: 0;
}

.portal-footer a {
  color: #c9a84c;
}

/* --- Auth Error Display --- */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: #f87171;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

/* --- Form Hint --- */
.form-hint {
  display: block;
  font-size: 0.75rem;
  color: #4a5568;
  margin-top: 0.25rem;
}

.optional-label {
  color: #4a5568;
  font-weight: 400;
}

/* --- Profile Header --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1e293b;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.08);
  border: 2px solid rgba(201, 168, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
}

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

.profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8892a4;
}

.profile-value {
  color: #f0f2f5;
  font-size: 0.9rem;
}

/* --- Portal Layout --- */
.portal-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: 80vh;
}

.portal-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1e293b;
}

.portal-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #c9a84c;
  margin: 0 0 0.5rem;
}

.portal-header p {
  color: #8892a4;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin: 0;
}

/* --- Auth Container --- */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 460px;
}

.auth-card h2 {
  font-family: 'Playfair Display', serif;
  color: #f0f2f5;
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

/* Auth Tabs (Login | Register toggle) */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #1e293b;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: none;
  border: none;
  color: #8892a4;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.auth-tab:hover {
  color: #f0f2f5;
}

.auth-tab.active {
  color: #c9a84c;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #c9a84c;
  border-radius: 1px;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #c0c8d8;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #f0f2f5;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #4a5568;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-group select {
  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='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #c9a84c, #b8943f);
  color: #0a0e17;
  width: 100%;
  padding: 0.8rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d4b85e, #c9a84c);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-outline {
  background: transparent;
  border: 1px solid #1e293b;
  color: #c0c8d8;
}

.btn-outline:hover {
  border-color: #c9a84c;
  color: #c9a84c;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.25);
}

.btn-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.btn-warning:hover {
  background: rgba(234, 179, 8, 0.25);
}

.btn-icon {
  padding: 0.4rem;
  background: transparent;
  border: none;
  color: #8892a4;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(201, 168, 76, 0.1);
  color: #c9a84c;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #8892a4;
}

.auth-switch a,
.auth-switch button {
  color: #c9a84c;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-switch a:hover,
.auth-switch button:hover {
  text-decoration: underline;
}

/* --- Portal Navigation --- */
.portal-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid #1e293b;
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Portal nav tab styles */
.portal-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  color: #8892a4;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s ease;
}

.portal-nav-tab:hover {
  color: #f0f2f5;
}

.portal-nav-tab.active {
  color: #c9a84c;
}

.portal-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #c9a84c;
}

.portal-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-user-info {
  font-size: 0.8rem;
  color: #8892a4;
}

.portal-user-info strong {
  color: #f0f2f5;
}

.portal-content {
  animation: portalFadeIn 0.3s ease;
}

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

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #f0f2f5;
  margin: 0;
}

.section-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f0f2f5;
  margin: 0;
}

/* --- Files List --- */
.files-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.file-row:hover {
  border-color: #2a3548;
  background: #151d2e;
  transform: translateX(2px);
}

.file-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
}

.file-icon.pdf { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.file-icon.doc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.file-icon.xls { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.file-icon.img { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.file-icon.zip { background: rgba(234, 179, 8, 0.15); color: #fbbf24; }
.file-icon.default { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.file-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #f0f2f5;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 0.75rem;
  color: #8892a4;
}

.file-size {
  font-size: 0.8rem;
  color: #8892a4;
  white-space: nowrap;
}

.file-date {
  font-size: 0.8rem;
  color: #8892a4;
  white-space: nowrap;
}

.file-download .btn {
  white-space: nowrap;
}

/* Category Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-compliance {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-marketing {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-forms {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-training {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-general {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Status Badges */
.badge-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-denied {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-disabled {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.files-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #8892a4;
}

.files-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.files-empty p {
  margin: 0;
  font-size: 0.95rem;
}

/* --- Files Table (alternate layout) --- */
.files-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.files-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8892a4;
  border-bottom: 1px solid #1e293b;
}

.files-table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #c0c8d8;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  vertical-align: middle;
}

.files-table tr:hover td {
  background: rgba(201, 168, 76, 0.03);
}

/* --- Admin Panel --- */
.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: #0d1117;
  border-radius: 10px;
  padding: 0.3rem;
  border: 1px solid #1e293b;
}

.admin-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: #8892a4;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.admin-tab:hover {
  color: #f0f2f5;
}

.admin-tab.active {
  background: #1e293b;
  color: #c9a84c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Advisors Table */
.advisors-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
}

.advisors-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8892a4;
  background: #0d1117;
  border-bottom: 1px solid #1e293b;
}

.advisors-table td {
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #c0c8d8;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
  vertical-align: middle;
}

.advisors-table tr:last-child td {
  border-bottom: none;
}

.advisors-table tr:hover td {
  background: rgba(201, 168, 76, 0.03);
}

.advisor-name {
  font-weight: 600;
  color: #f0f2f5;
}

.advisor-firm {
  color: #8892a4;
  font-size: 0.8rem;
}

.advisor-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* --- File Upload Form --- */
.file-upload-form {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
}

.file-upload-form h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #f0f2f5;
  margin: 0 0 1.25rem;
}

.upload-zone {
  border: 2px dashed #1e293b;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(13, 17, 23, 0.5);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #c9a84c;
  background: rgba(201, 168, 76, 0.05);
}

.upload-zone.dragover {
  transform: scale(1.01);
}

.upload-zone-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: #8892a4;
}

.upload-zone p {
  color: #8892a4;
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.upload-zone .upload-hint {
  font-size: 0.8rem;
  color: #4a5568;
}

.upload-zone .upload-browse {
  color: #c9a84c;
  font-weight: 500;
  cursor: pointer;
}

.upload-zone .upload-browse:hover {
  text-decoration: underline;
}

.upload-preview {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #0d1117;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #c0c8d8;
}

.upload-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

/* --- Downloads / Audit Log --- */
.downloads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
}

.downloads-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8892a4;
  background: #0d1117;
  border-bottom: 1px solid #1e293b;
}

.downloads-table td {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: #c0c8d8;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
}

.downloads-table tr:last-child td {
  border-bottom: none;
}

/* --- Alerts / Status Messages --- */
.alert {
  padding: 0.85rem 1.15rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  animation: alertSlideIn 0.3s ease;
}

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.alert-warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #fbbf24;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.35s ease;
  max-width: 360px;
}

.toast.toast-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(24px); }
}

.toast-success {
  background: #111827;
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.toast-error {
  background: #111827;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* --- Pending Approval State --- */
.pending-message {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 3rem 2rem;
}

.pending-message .pending-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  display: block;
  opacity: 0.8;
}

.pending-message h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #f0f2f5;
  margin: 0 0 0.75rem;
}

.pending-message p {
  color: #8892a4;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.pending-message .pending-detail {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  color: #fbbf24;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  animation: modalOverlayIn 0.2s ease;
}

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

.modal-content {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: modalContentIn 0.25s ease;
}

@keyframes modalContentIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #f0f2f5;
  margin: 0 0 0.75rem;
}

.modal-content p {
  color: #8892a4;
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #8892a4;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #f0f2f5;
}

/* --- Loading States --- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #1e293b;
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

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

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
  color: #8892a4;
  font-size: 0.9rem;
}

.skeleton-loader {
  background: linear-gradient(90deg, #1e293b 25%, #2a3548 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  height: 1rem;
}

.skeleton-loader.skeleton-title {
  width: 60%;
  height: 1.5rem;
  margin-bottom: 1rem;
}

.skeleton-loader.skeleton-line {
  width: 100%;
  height: 0.85rem;
  margin-bottom: 0.5rem;
}

.skeleton-loader.skeleton-line:last-child {
  width: 70%;
}

.skeleton-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.5rem;
}

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

/* --- Stat Cards (dashboard summary) --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: #c9a84c;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8892a4;
}

/* --- Search / Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.9rem 0.6rem 2.25rem;
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #f0f2f5;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  transition: border-color 0.25s ease;
}

.filter-bar .search-input:focus {
  outline: none;
  border-color: #c9a84c;
}

.filter-bar .search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-bar .search-wrapper::before {
  content: '\1F50D';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  opacity: 0.5;
}

.filter-bar select {
  padding: 0.6rem 2.25rem 0.6rem 0.9rem;
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #c0c8d8;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  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='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.filter-bar select:focus {
  outline: none;
  border-color: #c9a84c;
}

/* --- Profile Section --- */
.profile-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
}

.profile-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #f0f2f5;
  margin: 0 0 1.5rem;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8892a4;
}

.profile-field-value {
  color: #f0f2f5;
  font-size: 0.9rem;
}

/* --- Responsive (< 768px) --- */
@media (max-width: 768px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-branding {
    display: none;
  }

  .auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dash-hero {
    padding: 1.5rem;
  }

  .dash-hero h1 {
    font-size: 1.25rem;
  }

  .dash-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .dash-stats {
    grid-template-columns: 1fr;
  }

  .portal-nav {
    gap: 0;
  }

  .portal-nav-tab {
    font-size: 0.8rem;
    padding: 0.65rem 0.9rem;
  }

  .portal-nav-tab svg {
    display: none;
  }

  .portal-nav-right {
    display: none;
  }

  .portal-top-link svg {
    display: none;
  }

  .portal-top-link {
    font-size: 0.75rem;
  }

  .portal-navbar {
    height: 52px;
  }

  .portal-navbar .container {
    height: 52px;
  }

  .auth-section {
    padding-top: 52px;
  }

  .pending-section,
  .dashboard-section {
    padding-top: 68px;
  }

  .portal-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  /* File rows to card layout */
  .file-row {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.75rem;
    padding: 0.75rem;
  }

  .file-icon {
    grid-row: 1 / 3;
  }

  .file-name {
    grid-column: 2;
    font-size: 0.85rem;
  }

  .file-meta,
  .file-size,
  .file-date {
    grid-column: 2;
    font-size: 0.7rem;
  }

  .file-download {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .badge {
    font-size: 0.65rem;
  }

  /* Tables become card layouts */
  .advisors-table,
  .downloads-table {
    border: none;
    background: transparent;
  }

  .advisors-table thead,
  .downloads-table thead {
    display: none;
  }

  .advisors-table tbody,
  .downloads-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .advisors-table tr,
  .downloads-table tr {
    display: flex;
    flex-direction: column;
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 1rem;
  }

  .advisors-table td,
  .downloads-table td {
    padding: 0.25rem 0;
    border-bottom: none;
    font-size: 0.8rem;
  }

  .advisors-table td::before,
  .downloads-table td::before {
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8892a4;
    display: block;
    margin-bottom: 0.15rem;
  }

  .advisor-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #1e293b;
  }

  /* Admin tabs */
  .admin-tabs {
    flex-direction: column;
  }

  /* Upload form */
  .upload-form-fields {
    grid-template-columns: 1fr;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

  /* Stats */
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  /* Filter bar */
  .filter-bar {
    flex-direction: column;
  }

  /* Section header */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Modal */
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }

  /* Toast */
  .toast-container {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    max-width: none;
  }

  /* Profile */
  .profile-card {
    padding: 1.25rem;
  }

  .profile-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* --- Responsive (< 480px) --- */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .portal-header h1 {
    font-size: 1.25rem;
  }

  .pending-message {
    padding: 2rem 1.25rem;
  }

  .pending-message .pending-icon {
    font-size: 2.25rem;
  }
}

/* --- Utility --- */
.text-gold { color: #c9a84c; }
.text-muted { color: #8892a4; }
.text-white { color: #f0f2f5; }
.text-center { text-align: center; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
