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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* --- Login page (centered card) --- */
body:has(.card:only-child) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.logo { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.subtitle { color: #666; margin-bottom: 32px; font-size: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: #106ebe; }
.btn svg { width: 20px; height: 20px; fill: #fff; }

.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
}

/* --- Portal page --- */
header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { font-size: 20px; font-weight: 700; }

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #555;
}

.logout {
  color: #0078d4;
  text-decoration: none;
  font-weight: 500;
}
.logout:hover { text-decoration: underline; }

main {
  max-width: 800px;
  margin: 48px auto;
  padding: 0 24px;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lead {
  color: #666;
  font-size: 15px;
  margin-bottom: 36px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.app-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.app-card:hover {
  border-color: #0078d4;
  box-shadow: 0 4px 16px rgba(0,120,212,0.12);
}

.app-icon {
  width: 48px;
  height: 48px;
  background: #e8f4fd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #0078d4;
}
.app-icon svg { width: 24px; height: 24px; }

.app-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.app-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}
