@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
  --green:       #006633;
  --green-mid:   #008744;
  --green-light: #e6f2eb;
  --red:         #CC0000;
  --gold:        #D4A017;
  --gold-light:  #fdf6e3;
  --bg:          #f4f4f0;
  --bg-card:     #ffffff;
  --text:        #1a1a1a;
  --text-muted:  #666;
  --border:      #ddd;
  --nav-bg:      #003d1f;
  --shadow:      0 1px 6px rgba(0,0,0,0.08);
  --shadow-md:   0 3px 14px rgba(0,0,0,0.11);
  --r:           6px;
  --r-lg:        10px;
}

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

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAV ── */
.topbar {
  background: #002b15;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.topbar a { color: rgba(255,255,255,0.6); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: 0.3; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .user-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px; padding: 2px 10px;
  font-size: 12px; color: #fff;
}
.topbar .role-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 10px;
}
.role-admin    { background: var(--red);   color: #fff; }
.role-treinador{ background: var(--green); color: #fff; }
.role-arbitro  { background: var(--gold);  color: #003d1f; }
.role-publico  { background: #555;         color: #fff; }

.nav {
  background: var(--nav-bg);
  display: flex;
  align-items: stretch;
  padding: 0 2rem;
  position: sticky;
  top: 0; z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  text-decoration: none;
  margin-right: 20px;
}
.nav-logo img { height: 36px; }
.nav-logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 17px; font-weight: 700;
  color: #fff; letter-spacing: .5px;
  line-height: 1.2;
}
.nav-logo-text span { color: var(--gold); display: block; font-size: 11px; letter-spacing: 1.5px; font-weight: 400; }
.nav-links { display: flex; flex: 1; }
.nav-links a, .nav-drop-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 0 14px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
  cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'Source Sans 3', sans-serif;
  white-space: nowrap;
}
.nav-links a:hover, .nav-drop-btn:hover, .nav-links a.active { color: #fff; border-bottom-color: var(--gold); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 10px 0; }

/* Dropdown */
.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r) var(--r);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  z-index: 999;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 9px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--green-light); color: var(--green); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--r);
  font-family: 'Oswald', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  cursor: pointer; border: none; text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-mid); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover  { background: #a00; }
.btn-gold      { background: var(--gold); color: #002b15; }
.btn-gold:hover    { background: #b8880f; }
.btn-outline   { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover   { border-color: var(--green); color: var(--green); }
.btn-sm        { padding: 6px 14px; font-size: 12px; }
.btn-full      { width: 100%; }
.btn:disabled  { opacity: .5; cursor: not-allowed; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}
.card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem; font-weight: 600; letter-spacing: .3px;
  color: var(--green);
  margin-bottom: .9rem;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
}
.card-title .ico {
  width: 26px; height: 26px; background: var(--green-light);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* ── FORMS ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-muted); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-family: 'Source Sans 3', sans-serif; font-size: 14px;
  color: var(--text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(0,135,68,.12);
}
.form-group input.error { border-color: var(--red); }
.form-error { font-size: 12px; color: var(--red); margin-top: 3px; }
.form-group textarea { resize: vertical; min-height: 75px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(135deg, var(--nav-bg) 0%, var(--green) 100%);
  padding: 2.2rem 2rem 1.8rem;
  color: #fff;
  position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute;
  right: -80px; top: -80px;
  width: 300px; height: 300px;
  border-radius: 50%; border: 60px solid rgba(255,255,255,.04);
}
.page-header h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem; font-weight: 700; letter-spacing: .5px;
  position: relative;
}
.page-header p { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 4px; position: relative; }
.breadcrumb { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 6px; position: relative; }
.breadcrumb a { color: rgba(255,255,255,.55); text-decoration: none; }
.breadcrumb a:hover { color: rgba(255,255,255,.85); }

/* ── MAIN ── */
.main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }

/* ── TABLES ── */
.table-wrap { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: #fff; }
thead tr { background: var(--nav-bg); color: #fff; }
thead th {
  padding: 10px 14px; text-align: left;
  font-family: 'Oswald', sans-serif; font-size: 12px;
  font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
}
tbody tr { border-bottom: 1px solid #f0f0ec; transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafaf7; }
tbody td { padding: 10px 14px; font-size: 14px; }

/* ── STATUS ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-green    { background: #e6f2eb; color: #006633; }
.badge-red      { background: #fdecea; color: #a00; }
.badge-gold     { background: #fdf6e3; color: #7a5a00; }
.badge-blue     { background: #e8f0fb; color: #1a3a8f; }
.badge-gray     { background: #f0f0ec; color: #555; }

/* ── STATS ── */
.stat-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.2rem;
  border-top: 3px solid var(--green);
}
.stat-val  { font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700; color: var(--green); line-height: 1; }
.stat-lbl  { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: 0; }
.tab {
  padding: 9px 18px; font-family: 'Oswald', sans-serif;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  cursor: pointer; border: none; background: none;
  color: var(--text-muted); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .15s;
}
.tab:hover { color: var(--green); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── ALERTS ── */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r);
  font-size: 13px; margin-bottom: 1rem;
}
.alert-success { background: #e6f2eb; border: 1px solid #a8d5b8; color: #004d22; }
.alert-danger  { background: #fdecea; border: 1px solid #f5b8b4; color: #7a1010; }
.alert-info    { background: #e8f0fb; border: 1px solid #a8c0f0; color: #1a3a8f; }
.alert-warning { background: #fdf6e3; border: 1px solid #f0d070; color: #7a5a00; }

/* ── DIVIDER ── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }

/* ── ESCALAO CHIPS ── */
.escalao-sel { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.esc-chip {
  padding: 5px 13px; border: 2px solid var(--border);
  border-radius: 20px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .15s;
  background: #fff; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .3px;
}
.esc-chip.on { background: var(--green); border-color: var(--green); color: #fff; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--r-lg);
  width: 100%; max-width: 480px; margin: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.modal-header {
  background: var(--nav-bg); color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.modal-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 1.4rem; }
.modal-footer { padding: 12px 1.4rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── SCHEDULE ── */
.schedule-campo { margin-bottom: 1.4rem; }
.schedule-campo-head {
  background: var(--green); color: #fff;
  padding: 8px 14px; border-radius: var(--r) var(--r) 0 0;
  font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: space-between;
}
.schedule-games { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--r) var(--r); background: #fff; }
.schedule-row {
  display: grid; grid-template-columns: 58px 1fr 36px 1fr 80px 28px;
  align-items: center; gap: 6px;
  padding: 9px 14px; border-bottom: 1px solid #f0f0ec;
  font-size: 13px;
}
.schedule-row:last-child { border-bottom: none; }
.schedule-row:hover { background: #fafaf7; }
.s-time { font-family: 'Oswald', sans-serif; font-weight: 600; color: var(--green); }
.s-team { font-weight: 600; }
.s-vs   { text-align: center; font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.s-esc  { text-align: right; }

/* ── FIELD VISUAL ── */
.field-card {
  background: #1a5c24;
  border: 3px solid rgba(255,255,255,.2);
  border-radius: var(--r);
  padding: 14px; color: #fff; position: relative;
  min-height: 90px; display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px;
}
.field-card::after {
  content: ''; position: absolute;
  left: 50%; top: 12px; bottom: 12px;
  width: 1px; background: rgba(255,255,255,.25);
}
.field-num {
  font-family: 'Oswald', sans-serif; font-size: 3rem; font-weight: 700;
  color: rgba(255,255,255,.25); line-height: 1;
}
.field-name { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 600; flex: 1; text-align: center; position: relative; z-index: 1; }

/* ── STANDINGS TABLE ── */
.standings-pos { font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--text-muted); }
.standings-pos.top3 { color: var(--green); }
.standings-club { font-weight: 600; }
.standings-pts { font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 700; color: var(--green); }

/* ── PUBLIC COMPETITION CARD ── */
.comp-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
  cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.comp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.comp-card-stripe { height: 5px; background: var(--green); }
.comp-card-stripe.red { background: var(--red); }
.comp-card-stripe.gold { background: var(--gold); }
.comp-card-body { padding: 1.1rem 1.3rem; }
.comp-card-title { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.comp-card-meta  { font-size: 12px; color: var(--text-muted); }

/* ── UTILITY ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-1   { margin-top: .5rem; }
.mt-2   { margin-top: 1rem; }
.mt-3   { margin-top: 1.5rem; }
.mb-1   { margin-bottom: .5rem; }
.mb-2   { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 12px; }
.font-oswald { font-family: 'Oswald', sans-serif; }

@media(max-width:768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .form-row,.form-row-3   { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .main { padding: 1rem; }
}
