/* ============================================================
   Fussballmanager – Shared Stylesheet
   Modern, fresh, football-themed design
   ============================================================ */

/* --- CSS Variables ---------------------------------------- */
:root {
  --clr-bg:         #0d1117;
  --clr-bg2:        #161b22;
  --clr-bg3:        #1c2333;
  --clr-border:     #30363d;
  --clr-border-hi:  #3b4a5c;

  --clr-primary:    #238636;   /* pitch green */
  --clr-primary-hi: #2ea043;
  --clr-accent:     #f78166;   /* warm coral */
  --clr-accent-hi:  #ff9580;
  --clr-gold:       #e3b341;   /* trophy gold */
  --clr-teal:       #79c0ff;
  --clr-success:    #3fb950;
  --clr-danger:     #f85149;

  --clr-text:       #e6edf3;
  --clr-text-muted: #8b949e;
  --clr-text-dim:   #6e7681;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.6);

  --transition: .18s ease;
}

/* --- Reset / Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

/* --- Header / Navigation ---------------------------------- */
header {
  background: var(--clr-bg2);
  border-bottom: 1px solid var(--clr-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

header h1 .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--clr-primary);
  border-radius: 50%;
  font-size: 1rem;
  flex-shrink: 0;
}

header h1 .logo-text {
  background: linear-gradient(90deg, var(--clr-primary-hi), var(--clr-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

nav a {
  color: var(--clr-text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

nav a:hover {
  color: var(--clr-text);
  background: var(--clr-bg3);
}

nav a.active {
  color: var(--clr-text);
  background: var(--clr-primary);
}

nav a.active:hover {
  background: var(--clr-primary-hi);
}

.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.nav-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-user-name .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.btn-logout {
  color: var(--clr-danger) !important;
  padding: 5px 12px !important;
  background: rgba(248, 81, 73, .1) !important;
  border: 1px solid rgba(248, 81, 73, .25) !important;
  border-radius: var(--radius-md) !important;
  font-size: .82rem !important;
  transition: background var(--transition), border-color var(--transition) !important;
}

.btn-logout:hover {
  background: rgba(248, 81, 73, .2) !important;
  border-color: var(--clr-danger) !important;
}

/* --- Main / Container ------------------------------------- */
main {
  flex: 1;
}

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

/* --- Page Heading ----------------------------------------- */
h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 20px;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.container h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--clr-primary);
  border-radius: 2px;
}

/* --- Filter Bar ------------------------------------------- */
.filter-bar {
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-bar a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  background: var(--clr-bg2);
  color: var(--clr-text-muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--clr-border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-bar a.active,
.filter-bar a:hover {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

/* --- Tables ----------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--clr-bg2);
}

th {
  background: var(--clr-bg3);
  padding: 11px 14px;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--clr-border);
}

th.center { text-align: center; }

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--clr-border);
  font-size: .9rem;
  color: var(--clr-text);
}

td.center { text-align: center; }
td.right  { text-align: right; }

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover td { background: var(--clr-bg3); }

/* --- Stat / Info Cards ------------------------------------ */
.stat-card {
  background: var(--clr-bg2);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  border: 1px solid var(--clr-border);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-teal));
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat-card:hover {
  border-color: var(--clr-border-hi);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--clr-text);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: .8rem;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
}

/* --- Strength Bar ----------------------------------------- */
.bar-wrap {
  background: var(--clr-bg);
  border-radius: 999px;
  width: 120px;
  height: 6px;
  display: inline-flex;
  vertical-align: middle;
  overflow: hidden;
}

.bar-fill {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-teal));
}

/* --- Badges ----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  font-size: .75rem;
  font-weight: 600;
}

.badge-green  { background: rgba(63,185,80,.15);  color: var(--clr-success); }
.badge-red    { background: rgba(248,81,73,.15);   color: var(--clr-danger); }
.badge-gold   { background: rgba(227,179,65,.15);  color: var(--clr-gold); }
.badge-blue   { background: rgba(121,192,255,.15); color: var(--clr-teal); }
.badge-gray   { background: rgba(139,148,158,.15); color: var(--clr-text-muted); }

/* --- Misc helpers ----------------------------------------- */
.empty {
  color: var(--clr-text-muted);
  padding: 24px 0;
  font-style: italic;
}

.text-red    { color: var(--clr-danger); }
.text-teal   { color: var(--clr-teal); }
.text-green  { color: var(--clr-success); }
.text-yellow { color: var(--clr-gold); }
.text-orange { color: #f0883e; }
.text-muted  { color: var(--clr-text-muted); }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

.btn-primary:hover {
  background: var(--clr-primary-hi);
  border-color: var(--clr-primary-hi);
}

.btn-danger {
  background: var(--clr-danger);
  color: #fff;
  border-color: var(--clr-danger);
}

/* --- Auth forms ------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--clr-bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(35,134,54,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(121,192,255,.06) 0%, transparent 60%);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--clr-bg2);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .ball {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--clr-primary), #1b5e20);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(35,134,54,.4);
}

.auth-logo h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0;
}

.auth-logo p {
  font-size: .85rem;
  color: var(--clr-text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}

.form-group input {
  width: 100%;
  padding: 10px 13px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(35,134,54,.2);
}

.form-group input::placeholder { color: var(--clr-text-dim); }

.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: var(--clr-primary-hi);
  transform: translateY(-1px);
}

.error-msg {
  color: var(--clr-danger);
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: .88rem;
}

.success-msg {
  color: var(--clr-success);
  background: rgba(63,185,80,.1);
  border: 1px solid rgba(63,185,80,.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: .88rem;
}

.success-msg a { color: var(--clr-teal); text-decoration: none; }
.success-msg a:hover { text-decoration: underline; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .85rem;
  color: var(--clr-text-muted);
}

.auth-footer a {
  color: var(--clr-teal);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

.divider {
  height: 1px;
  background: var(--clr-border);
  margin: 20px 0;
}

/* --- Footer ----------------------------------------------- */
footer {
  background: var(--clr-bg2);
  border-top: 1px solid var(--clr-border);
  padding: 16px 24px;
  text-align: center;
  font-size: .8rem;
  color: var(--clr-text-dim);
}

footer a {
  color: var(--clr-text-muted);
  text-decoration: none;
}

footer a:hover { color: var(--clr-teal); }

/* --- Responsive adjustments ------------------------------- */
@media (max-width: 640px) {
  header { padding: 0 16px; gap: 12px; }
  .container { margin: 20px auto; padding: 0 14px; }
  nav a { padding: 5px 10px; font-size: .85rem; }
  .auth-box { padding: 28px 20px; }
}

