/* Portal landing — uses the dashboard's CSS vars from styles.css */

.portal-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Subtle layered gradient + glow background */
.portal-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 30% 0%, rgba(255,138,53,0.12), transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(96,165,250,0.10), transparent 70%),
    linear-gradient(180deg, #0a1428 0%, #050a18 100%);
}

.portal-wrap {
  width: 100%;
  max-width: 980px;
  padding: 48px 28px;
  text-align: center;
}

.portal-hero { margin-bottom: 48px; }
.portal-logo {
  max-width: 260px; height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.5));
}
.portal-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
  display: block;
}
.portal-tag {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  letter-spacing: 0.2px;
}

.portal-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 760px;
  margin: 0 auto 48px;
  justify-items: stretch;
}
@media (max-width: 720px) {
  .portal-tiles { grid-template-columns: 1fr; max-width: 420px; }
}

.portal-tile {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  text-align: left;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.portal-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  opacity: 0.9;
}
.portal-tile-hardware::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-vivid));
  box-shadow: 0 0 18px rgba(255,138,53,0.5);
}
.portal-tile-helpdesk::before {
  background: linear-gradient(90deg, var(--info), #93c5fd);
  box-shadow: 0 0 18px rgba(96,165,250,0.5);
}
.portal-tile-users::before {
  background: linear-gradient(90deg, var(--purple), #d8b4fe);
  box-shadow: 0 0 18px rgba(192,132,252,0.5);
}
.portal-tile-po::before {
  background: linear-gradient(90deg, var(--ok), var(--ok-vivid));
  box-shadow: 0 0 18px rgba(52,211,153,0.5);
}

.portal-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent);
  text-decoration: none;
}
.portal-tile-helpdesk:hover { border-color: var(--info); }

.portal-tile-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-tile-hardware .portal-tile-icon {
  background: var(--accent-soft);
  color: var(--accent-vivid);
  border: 1px solid rgba(255,138,53,0.4);
}
.portal-tile-helpdesk .portal-tile-icon {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid rgba(96,165,250,0.4);
}
.portal-tile-users .portal-tile-icon {
  background: var(--purple-soft);
  color: var(--purple);
  border: 1px solid rgba(192,132,252,0.4);
}
.portal-tile-po .portal-tile-icon {
  background: var(--ok-soft);
  color: var(--ok-vivid);
  border: 1px solid rgba(52,211,153,0.4);
}
.portal-tile-helpdesk:hover { border-color: var(--info); }
.portal-tile-users:hover    { border-color: var(--purple); }
.portal-tile-po:hover       { border-color: var(--ok); }

.portal-tile-body { flex: 1; min-width: 0; }
.portal-tile-body h2 {
  font-size: 18px;
  margin: 2px 0 8px;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.portal-tile-body p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.portal-footer {
  color: var(--muted-soft);
  font-size: 12px;
  margin-top: 32px;
}

/* ============================ MOBILE PASS ============================== */

/* Tablets and below — already collapses to 1 col at this breakpoint */
@media (max-width: 720px) {
  .portal-wrap { padding: 28px 18px; }
  .portal-hero { margin-bottom: 28px; }
  .portal-logo { max-width: 220px; margin-bottom: 18px; }
  .portal-hero h1 { font-size: 26px; }
  .portal-tag { font-size: 14px; }
  .portal-tile { padding: 20px 18px; gap: 14px; }
  .portal-tile-body h2 { font-size: 17px; }
}

/* Phones — single column already; tighten further + bigger tap targets */
@media (max-width: 480px) {
  .portal-wrap { padding: 22px 14px; }
  .portal-hero { margin-bottom: 20px; }
  .portal-logo { max-width: 180px; margin-bottom: 14px; }
  .portal-hero h1 { font-size: 22px; letter-spacing: -0.3px; }
  .portal-tag { font-size: 13px; line-height: 1.4; }

  .portal-tiles { gap: 14px; max-width: 100%; }
  .portal-tile {
    padding: 18px 16px;
    border-radius: 12px;
    min-height: 90px;          /* easy thumb target */
  }
  .portal-tile-icon { width: 52px; height: 52px; border-radius: 10px; }
  .portal-tile-icon svg { width: 34px; height: 34px; }
  .portal-tile-body h2 { font-size: 16px; margin: 0 0 6px; }
  .portal-tile-body p { font-size: 12px; }

  .portal-footer { font-size: 11px; margin-top: 24px; }
}

/* Very small phones (≤360px wide) */
@media (max-width: 360px) {
  .portal-wrap { padding: 18px 10px; }
  .portal-tile { padding: 14px 12px; gap: 10px; }
  .portal-tile-icon { width: 44px; height: 44px; }
  .portal-tile-icon svg { width: 28px; height: 28px; }
  .portal-hero h1 { font-size: 20px; }
}

/* Landscape phones — short viewport: compress vertical spacing */
@media (max-height: 480px) and (orientation: landscape) {
  .portal-shell { align-items: flex-start; }
  .portal-wrap { padding: 16px; }
  .portal-hero { margin-bottom: 14px; }
  .portal-logo { max-width: 160px; margin-bottom: 8px; }
  .portal-hero h1 { font-size: 18px; margin-bottom: 4px; }
  .portal-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .portal-tile { padding: 12px 14px; }
  .portal-footer { display: none; }
}
