:root {
  --primary: #185fa5;
  --primary-dark: #0c447c;
  --bg: #f4f5f3;
  --card-bg: #ffffff;
  --border: #e0e0da;
  --text: #2c2c2a;
  --text-muted: #5f5e5a;
  --danger: #a32d2d;
  --success: #3b6d11;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .brand { font-weight: 600; font-size: 17px; }
.topbar .role-badge {
  font-size: 12px;
  background: #e6f1fb;
  color: var(--primary-dark);
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 8px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box p.subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

label { display: block; font-size: 13px; margin: 14px 0 6px; color: var(--text-muted); }

input[type="email"], input[type="password"], input[type="text"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

button, .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 18px;
  width: 100%;
  text-align: center;
}

button:hover, .btn:hover { background: var(--primary-dark); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
}

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-danger { background: #fcebeb; color: var(--danger); }
.alert-success { background: #eaf3de; color: var(--success); }

.logout-link { font-size: 13px; color: var(--text-muted); }

/* Carta estilo FIFA del portero */
.gk-card {
  width: 280px; max-width: 100%; border-radius: 16px; padding: 18px 16px 20px;
  background: linear-gradient(160deg, #f9e6a0 0%, #d4a72c 45%, #f7dd85 100%);
  color: #3a2c05; position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.gk-card .rating { font-size: 46px; font-weight: 800; line-height: 1; }
.gk-card .pos { font-size: 16px; font-weight: 700; margin-top: 2px; letter-spacing: 1px; }
.gk-card .photo-wrap {
  position: absolute; top: 10px; right: 10px; width: 140px; height: 150px; border-radius: 10px;
  overflow: hidden; background: rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center;
}
.gk-card .photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.gk-card .flagclub { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; font-size: 24px; }
.gk-card .name-banner {
  text-align: center; font-size: 21px; font-weight: 800; letter-spacing: 1px; margin-top: 74px;
  border-top: 2px solid rgba(58,44,5,0.35); padding-top: 8px; text-transform: uppercase;
}
.gk-card .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; margin-top: 10px; font-size: 16px; font-weight: 700; }
.gk-card .stat-row { display: flex; justify-content: space-between; gap: 6px; }
.gk-card .stat-row span:last-child { font-weight: 600; opacity: 0.85; font-size: 13px; align-self: center; }
