/* SmartBorder Portal – Kachel-Startseite */

.portal-body {
  min-height: 100vh;
  background: #eef1f8;
  background-image: linear-gradient(160deg, #e8ecf7 0%, #f4f6fb 45%, #eef1f8 100%);
}

.portal-home {
  padding-top: 8px;
}

.portal-home-lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.portal-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.portal-hero {
  text-align: center;
  margin-bottom: 36px;
}

.portal-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
}

.portal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(30, 58, 138, 0.28);
}

.portal-home-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.portal-home-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.2);
}

.portal-home-brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.portal-home-brand-sub {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.portal-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.portal-hero .muted { font-size: 1rem; }

.portal-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.85rem;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.portal-user strong { color: #0f172a; }

.portal-login-card {
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.portal-login-card h2 {
  margin: 0 0 20px;
  font-size: 1.2rem;
  text-align: center;
}

.portal-login-card label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.portal-login-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  font: inherit;
  margin-bottom: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-login-card input:focus {
  outline: none;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.portal-login-card .btn-login {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  transition: transform 0.12s, box-shadow 0.15s;
}

.portal-login-card .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(79, 70, 229, 0.45);
}

.portal-err {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  text-align: center;
}

.portal-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  text-align: center;
}

.portal-auth-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.portal-tab {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}
.portal-tab.active { background: #fff; color: #4f46e5; box-shadow: 0 2px 8px rgba(15,23,42,0.08); }
.portal-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.portal-hint { font-size: 0.85rem; margin-bottom: 12px; }
.portal-link-row { text-align: center; margin-top: 12px; font-size: 0.88rem; }
.portal-link-row a { color: #4f46e5; font-weight: 600; }
.user-chip .user-role { display: block; font-size: 0.68rem; font-weight: 600; color: #94a3b8; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
  border-color: #c7d2fe;
  color: inherit;
}

.tile-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  border-radius: 12px;
  margin-bottom: 4px;
}

.tile-icon.purple { background: #f5f3ff; }
.tile-icon.blue { background: #eff6ff; }
.tile-icon.green { background: #ecfdf5; }
.tile-icon.gray { background: #f8f9fc; }
.tile-icon.indigo { background: #eef2ff; }
.tile-icon.orange { background: #fff7ed; }
.tile-icon.teal { background: #f0fdfa; }

.tile strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.tile span {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.portal-footer a {
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-logout {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #64748b;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-logout:hover { background: #f8f9fc; }

.portal-top-link {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4f46e5;
}

.portal-body { position: relative; }

@media (max-width: 520px) {
  .tile-grid { grid-template-columns: 1fr; }
  .portal-wrap { padding: 24px 16px 40px; }
}
