/* Amazonas Cup - admin theme + mobile */
:root {
  --ac-green-dark: #0c2e22;
  --ac-green: #147a4a;
  --ac-green-mid: #1f8a56;
  --ac-lime: #c6e377;
  --ac-gold: #e0b422;
  --ac-bg: #eef4ef;
  --ac-card: #ffffff;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ac-bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(20, 122, 74, 0.08), transparent 28%),
    radial-gradient(circle at 88% 92%, rgba(12, 46, 34, 0.08), transparent 32%);
  padding-top: 62px;
  padding-bottom: 24px;
  color: #1c2b24;
}

img {
  max-width: 100%;
}

.navbar-inverse {
  background: linear-gradient(180deg, #0f3a2b 0%, #0c2e22 100%) !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(12, 46, 34, 0.35);
}

.admin-navbar {
  background: linear-gradient(180deg, #0f3a2b 0%, #0c2e22 100%) !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(12, 46, 34, 0.35);
  min-height: 56px;
}

.admin-navbar .navbar-brand,
.navbar-inverse .navbar-brand {
  color: #f4fbe8 !important;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.admin-navbar .navbar-brand .glyphicon {
  color: var(--ac-lime);
  margin-right: 6px;
}

.admin-navbar .navbar-nav > li > a,
.navbar-inverse .navbar-nav > li > a {
  color: #d9eadc !important;
  font-weight: 600;
}

.admin-navbar .navbar-nav > li > a:hover,
.admin-navbar .navbar-nav > .active > a,
.admin-navbar .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .open > a {
  background: rgba(198, 227, 119, 0.16) !important;
  color: #fff !important;
}

.admin-navbar .dropdown-menu {
  background: #12382b;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.admin-navbar .dropdown-menu > li > a {
  color: #e7f5ea;
  padding: 10px 18px;
}

.admin-navbar .dropdown-menu > li > a:hover {
  background: var(--ac-green);
  color: #fff;
}

.admin-navbar .dropdown-menu .divider {
  background: rgba(255, 255, 255, 0.12);
}

.navbar-logout-form {
  margin: 8px 0 0;
}

.navbar-logout {
  color: #f4fbe8 !important;
  text-decoration: none !important;
  font-weight: 600;
  padding: 8px 12px !important;
}

.navbar-toggle {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.navbar-inverse .navbar-toggle .icon-bar {
  background: #fff !important;
}

.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
  border-color: rgba(255, 255, 255, 0.08);
}

.container {
  width: auto;
  max-width: 1140px;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
}

.btn-primary {
  background: var(--ac-green);
  border-color: #0f6840;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #0f6840;
  border-color: #0c5534;
}

.btn-success {
  background: #1aa05c;
  border-color: #15864c;
}

.form-control:focus {
  border-color: var(--ac-green) !important;
  box-shadow: 0 0 0 0.2rem rgba(20, 122, 74, 0.22) !important;
}

.darkgreenbox {
  background: linear-gradient(90deg, #147a4a, #1f8a56) !important;
  color: #fff !important;
}

.table-bordered > thead > tr > th {
  border-color: #0f6840;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Dashboard */
.admin-hero {
  background: linear-gradient(135deg, #0f3a2b 0%, #147a4a 60%, #1aa05c 100%);
  color: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 10px 28px rgba(12, 46, 34, 0.25);
}

.admin-hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
}

.admin-hero p {
  margin: 0;
  opacity: 0.9;
}

.stats-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card,
.module-card,
.panel {
  background: var(--ac-card);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(12, 46, 34, 0.08);
}

.stat-card {
  padding: 16px 12px;
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--ac-green);
}

.stat-label {
  color: #5b6d64;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.module-card {
  padding: 20px;
  text-align: left;
}

.module-card .module-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(20, 122, 74, 0.12);
  color: var(--ac-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.module-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.module-desc {
  color: #66786f;
  min-height: 40px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 14px;
  color: #0c2e22;
}

.team-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #edf3ee;
}

.team-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.team-badge {
  display: inline-block;
  background: #e7f5ea;
  color: #0f3a2b;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  margin-right: 4px;
}

.panel-heading {
  background: linear-gradient(90deg, #147a4a, #1f8a56) !important;
  color: #fff !important;
  border: 0;
  border-radius: 14px 14px 0 0;
  font-weight: 700;
}

@media (max-width: 991px) {
  .admin-navbar .navbar-nav .open .dropdown-menu {
    background: #12382b;
  }
  .admin-navbar .navbar-nav .open .dropdown-menu > li > a {
    color: #e7f5ea;
    padding: 12px 20px;
  }
  .navbar-logout-form {
    margin: 0;
    padding: 8px 15px 16px;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 56px;
  }
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .admin-hero {
    padding: 16px;
    border-radius: 12px;
  }
  .admin-hero h1 {
    font-size: 20px;
  }
  .form-inline .form-group,
  .form-inline .btn,
  .form-inline .form-control {
    display: block;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 10px;
  }
  .form-inline select.form-control,
  .form-inline input.form-control {
    max-width: 100% !important;
  }
  .btn {
    min-height: 40px;
  }
  .table,
  table.table {
    font-size: 12px;
  }
  .table td,
  .table th {
    white-space: nowrap;
  }
  .container .table,
  .panel-body .table,
  .row .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navbar-brand {
    font-size: 16px !important;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pull-right {
    float: none !important;
    width: 100%;
    margin-top: 8px;
  }
  .pull-right .btn {
    display: inline-block;
    margin-bottom: 6px;
  }
}

/* Portada pública */
body.public-home {
  padding-top: 56px;
  background: #071a28 url('../img/login-fondo.png') center center / cover no-repeat fixed;
  color: #1c2b24;
}

body.public-home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(7, 26, 40, 0.78) 0%, rgba(12, 46, 34, 0.62) 48%, rgba(12, 46, 70, 0.52) 100%);
}

body.public-home .main-container,
body.public-home .container {
  position: relative;
  z-index: 1;
}
