/* ============================================================
   GLC Dashboard — Premium applicant portal (dashboard.html)
   ============================================================ */

.page-dashboard {
  background: var(--gray-100);
  overflow-x: clip;
}

/* --- Welcome hero --- */
.dash-hero {
  position: relative;
  background: linear-gradient(135deg, #0d2818 0%, #1a5c2a 50%, #124020 100%);
  color: #fff;
  padding: clamp(32px, 5vw, 48px) 0 clamp(56px, 8vw, 80px);
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(245, 168, 0, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(56, 160, 90, 0.3) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 60px 60px;
  pointer-events: none;
}
.dash-hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}
.dash-hero__orb--1 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(245, 168, 0, 0.2) 0%, transparent 70%);
  top: -60px;
  right: 8%;
  animation: dashOrbFloat 12s ease-in-out infinite;
}
.dash-hero__orb--2 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 160, 90, 0.25) 0%, transparent 70%);
  bottom: -40px;
  left: 15%;
  animation: dashOrbFloat 10s ease-in-out infinite reverse;
}
@keyframes dashOrbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -16px); }
}

.dash-hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.dash-hero__user {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: dashFadeIn .6s var(--ease-out, ease) both;
}
@keyframes dashFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold) 0%, #ffc94d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  box-shadow: 0 8px 24px rgba(245, 168, 0, 0.35);
  flex-shrink: 0;
}

.dash-hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}
.dash-hero h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.25;
}
.dash-hero__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: dashFadeIn .6s var(--ease-out, ease) .1s both;
}
.dash-hero__actions .btn-gold {
  box-shadow: 0 4px 20px rgba(245, 168, 0, 0.35);
}
.dash-hero__actions .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.dash-hero__actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* --- Stats strip (overlaps hero) --- */
.dash-stats {
  margin-top: -40px;
  position: relative;
  z-index: 10;
  margin-bottom: 32px;
}
.dash-stats__inner {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(26, 92, 42, 0.08);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.dash-stat {
  padding: 24px 28px;
  border-right: 1px solid var(--gray-200);
  transition: background .2s ease;
  position: relative;
}
.dash-stat:last-child { border-right: none; }
.dash-stat:hover { background: var(--gray-100); }

.dash-stat__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.dash-stat--total .dash-stat__icon { background: #e8f0fa; }
.dash-stat--progress .dash-stat__icon { background: var(--gold-light); }
.dash-stat--review .dash-stat__icon { background: #fff3cd; }
.dash-stat--approved .dash-stat__icon { background: var(--green-light); }

.dash-stat__value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.dash-stat--total .dash-stat__value {
  background: linear-gradient(135deg, #1557a3, #2a7ad4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dash-stat--progress .dash-stat__value {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--orange);
}
.dash-stat--review .dash-stat__value {
  color: var(--orange);
}
.dash-stat--approved .dash-stat__value {
  background: linear-gradient(135deg, #155c2c, #2a7d3e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-stat__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

/* --- Main content grid --- */
.dash-content {
  padding-bottom: 48px;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.dash-sidebar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-width: 0;
}
.dash-panel {
  min-width: 0;
}

/* --- Premium panels --- */
.dash-panel {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .25s ease;
}
.dash-panel:hover {
  box-shadow: var(--shadow-md);
}
.dash-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #fafbfc 0%, var(--white) 100%);
}
.dash-panel__header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-panel__header .badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
}
.dash-panel__body { padding: 0; }
.dash-panel__footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-500);
  background: var(--gray-100);
}

/* --- Action alert banner --- */
.dash-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
  border: 1px solid rgba(245, 168, 0, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(245, 168, 0, 0.12);
}
.dash-alert__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 168, 0, 0.3);
}
.dash-alert__body h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.dash-alert__body p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 10px;
}
.dash-alert__body .btn { font-size: 13px; }

/* --- Enhanced table --- */
.dash-table-wrap {
  width: 100%;
}

.dash-panel .dash-table {
  width: 100%;
}

.dash-panel .dash-table thead tr {
  background: linear-gradient(180deg, #f8f9fb 0%, #f0f2f5 100%);
}
.dash-panel .dash-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: 12px 16px;
  white-space: nowrap;
}
.dash-panel .dash-table td {
  padding: 14px 16px;
  vertical-align: middle;
}
.dash-panel .dash-table th:nth-child(3),
.dash-panel .dash-table td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
}

/* Actions column — inner flex wrapper (never flex the <td> itself) */
.dash-panel .dash-table th.dash-actions-col,
.dash-panel .dash-table td.dash-actions {
  width: 280px;
  min-width: 280px;
  text-align: right;
  vertical-align: middle;
}

.dash-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.dash-row-actions .btn {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 6px 12px;
  white-space: nowrap;
  position: relative;
  overflow: visible;
  transform: none;
}

.dash-row-actions .btn:hover {
  transform: none;
}

.dash-row-actions .btn::after {
  display: none;
}

.dash-panel .dash-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
}
.dash-panel .dash-table tbody tr:last-child { border-bottom: none; }

.dash-panel .dash-table tbody tr:hover {
  background: var(--green-light);
  box-shadow: none;
}

.dash-app-id {
  font-weight: 700;
  color: var(--green);
  font-size: 12px;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  white-space: nowrap;
}
.dash-app-id:hover { text-decoration: underline; }

.dash-row--action {
  background: linear-gradient(90deg, rgba(245, 168, 0, 0.06) 0%, transparent 100%) !important;
  border-left: 4px solid var(--gold);
  box-shadow: none !important;
}
.dash-row--action:hover {
  background: linear-gradient(90deg, rgba(245, 168, 0, 0.1) 0%, transparent 100%) !important;
}
.dash-action-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  margin-top: 4px;
}

/* --- Sidebar: quick links --- */
.dash-quick-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.dash-quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: all .2s ease;
}
.dash-quick-link:hover {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.dash-quick-link__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--gray-100);
  flex-shrink: 0;
  transition: background .2s;
}
.dash-quick-link:hover .dash-quick-link__icon {
  background: rgba(26, 92, 42, 0.12);
}
.dash-quick-link__text h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--gray-900);
}
.dash-quick-link__text p {
  font-size: 12px;
  color: var(--gray-500);
  margin: 0;
}
.dash-quick-link__arrow {
  margin-left: auto;
  color: var(--gray-400);
  font-size: 16px;
  transition: transform .2s, color .2s;
}
.dash-quick-link:hover .dash-quick-link__arrow {
  color: var(--green);
}

/* --- Notifications --- */
.dash-notifications { padding: 0; }
.dash-notification {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  transition: background .15s ease;
  align-items: flex-start;
}
.dash-notification:last-child { border-bottom: none; }
.dash-notification:hover { background: var(--gray-100); }
.dash-notification--unread {
  background: linear-gradient(90deg, var(--green-light) 0%, var(--white) 100%);
  border-left: 3px solid var(--green);
}
.dash-notification--unread:hover {
  background: linear-gradient(90deg, #dceee3 0%, var(--gray-100) 100%);
}


.dash-notification__body { flex: 1; min-width: 0; }
.dash-notification__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1.35;
}
.dash-notification__text {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 8px;
}
.dash-notification__time {
  font-size: 11px;
  color: var(--gray-500);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}
.dash-notification__action {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.dash-notification__action:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .dash-stats__inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-stat:nth-child(2) { border-right: none; }
  .dash-stat:nth-child(1),
  .dash-stat:nth-child(2) { border-bottom: 1px solid var(--gray-200); }
  .dash-hero .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-panel .dash-table th:nth-child(5),
  .dash-panel .dash-table td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 768px) {
  .dash-sidebar {
    grid-template-columns: 1fr;
  }
  .dash-panel .dash-table th:nth-child(3),
  .dash-panel .dash-table td:nth-child(3) {
    display: none;
  }
  .dash-panel .dash-table th.dash-actions-col,
  .dash-panel .dash-table td.dash-actions {
    width: auto;
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .dash-stats__inner { grid-template-columns: 1fr; }
  .dash-stat {
    border-right: none !important;
    border-bottom: 1px solid var(--gray-200);
  }
  .dash-stat:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-hero__orb--1,
  .dash-hero__orb--2,
  .dash-hero__user,
  .dash-hero__actions {
    animation: none;
  }
  .dash-quick-link:hover { transform: none; }
}
