:root {
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.portal {
  max-width: 900px;
  width: 100%;
}

.portal-header {
  text-align: center;
  margin-bottom: 3rem;
  color: #ffffff;
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.portal-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.portal-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  font-weight: 400;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  max-width: 320px;
  margin: 0 auto;
}

.brand-card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-color, #667eea);
  transition: height 0.3s ease;
}

.brand-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.brand-card:hover::before {
  height: 6px;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: color-mix(in srgb, var(--brand-color, #667eea) 10%, transparent);
  border-radius: 16px;
  color: var(--brand-color, #667eea);
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-icon {
  transform: scale(1.08);
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--brand-color, #667eea);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.01em;
  margin-top: auto;
}

.brand-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.portal-footer {
  text-align: center;
  margin-top: 2.5rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  body {
    align-items: flex-start;
    padding: 1.5rem 1rem;
  }

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

  .brands-grid {
    grid-template-columns: 1fr;
  }
}
