@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === Variables === */
:root {
  --blue:       #093FB4;
  --blue-dark:  #072f88;
  --red:        #BF4646;
  --green:      #16a34a;
  --orange:     #ea580c;
  --text:       #111;
  --gray:       #888;
  --gray-light: #ddd;
  --bg:         #f5f5f5;
  --white:      #fff;
  --shadow:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.12);
  --radius:     8px;
  --radius-lg:  12px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; }

/* === Layout === */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px;  margin: 0 auto; padding: 0 20px; }
.page-content { padding-top: 40px; padding-bottom: 60px; }

/* === Navbar === */
.navbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 50px !important;
}
.navbar-brand:hover { text-decoration: none; opacity: 0.85; }
.navbar-brand .brand-icon { font-size: 22px; width: 30px !important;height: 30px !important; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.navbar-links a {
  padding: 7px 13px;
  border-radius: var(--radius);
  color: #444;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap; 
}
.navbar-links a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.navbar-links a.active { color: var(--blue); background: #eef2ff; font-weight: 600;}

.navbar-auth { display: flex; align-items: center; gap: 6px; }
.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: white;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.navbar-user span {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
}
.navbar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius);
  color: #555;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-logout:hover {
  background: #fee2e2;
  color: var(--red);
  text-decoration: none;
}

.navbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.navbar-hamburger:hover { background: var(--bg); }
/* Mobile menu */
.navbar-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px 16px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.navbar-mobile.open { display: flex; }
.navbar-mobile a:not(.btn) {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.navbar-mobile a:not(.btn):hover { background: var(--bg); text-decoration: none; }
.navbar-mobile .mobile-auth {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); text-decoration: none; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn i { font-size: 15px; line-height: 1; }

.btn-primary   { background: var(--blue);   color: white; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-secondary { background: transparent;   color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: #eef2ff; }
.btn-danger    { background: var(--red);    color: white; border-color: var(--red); }
.btn-danger:hover { background: #a83a3a; border-color: #a83a3a; }
.btn-success   { background: var(--green);  color: white; border-color: var(--green); }
.btn-success:hover { background: #128a3e; border-color: #128a3e; }
.btn-warning   { background: var(--orange); color: white; border-color: var(--orange); }
.btn-warning:hover { background: #c94d09; border-color: #c94d09; }
.btn-gray      { background: #f0f0f0;       color: #444; border-color: #e0e0e0; }
.btn-gray:hover { background: #e4e4e4; }
.btn-sm  { padding: 5px 13px; font-size: 13px; }
.btn-sm i { font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-lg i { font-size: 17px; }

/* Buttons sobre fons blau (hero, cta) */
.hero .btn-primary,
.cta-section .btn-primary {
  background: white;
  color: var(--blue);
  border-color: white;
}
.hero .btn-primary:hover,
.cta-section .btn-primary:hover {
  background: rgba(255,255,255,0.92);
  border-color: white;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hero .btn-secondary,
.cta-section .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.75);
}
.hero .btn-secondary:hover,
.cta-section .btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* === Forms === */
.form-group  { margin-bottom: 18px; }
.form-label  { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 5px; }
.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--blue); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-hint  { font-size: 12px; color: var(--gray); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red);  margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* === Alerts === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.alert-success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }

/* === Cards === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.card-title { font-size: 17px; font-weight: 700; }

/* === Tables === */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrapper table { min-width: 600px; }
.table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
table td {
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: #fafcff; }

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f0f0f0; color: #555; }
.badge-blue    { background: #eef2ff; color: var(--blue); }

/* === Admin Layout === */
.admin-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  background: white;
  border-right: 1px solid var(--gray-light);
  padding: 24px 0 40px;
}
.admin-sidebar-section { margin-bottom: 28px; }
.admin-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  padding: 0 20px 8px;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 14px;
  color: #444;
  transition: background 0.12s;
  text-decoration: none;
}
.admin-sidebar a:hover { background: var(--bg); color: var(--text); }
.admin-sidebar a.active { color: var(--blue); background: #eef2ff; font-weight: 700; }
.admin-main { padding: 32px; background: var(--bg); min-width: 0; }
.admin-main h1 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #1a5bd4 100%);
  color: white;
  padding: 72px 0;
  text-align: center;
}
.hero-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 16px; }
.hero h1 { font-size: 44px; font-weight: 800; margin-bottom: 16px; line-height: 1.15; }
.hero p { font-size: 18px; opacity: 0.85; margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* === Section === */
.section { padding: 60px 0; }
.section-white { background: white; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.section-sub { font-size: 16px; color: var(--gray); margin-bottom: 40px; }

/* === Stats === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number { font-size: 34px; font-weight: 800; color: var(--blue); }
.stat-label  { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* === Services cards === */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.service-icon { font-size: 32px; margin-bottom: 14px; color: var(--blue); }
.service-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: 14px; color: var(--gray); line-height: 1.6; }

/* === News === */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-card-img { width: 100%; height: 180px; object-fit: cover; background: #eef2ff; }
.news-card-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #eef2ff, #dbeafe); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-date  { font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.news-card-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.news-card-excerpt { font-size: 13px; color: var(--gray); line-height: 1.5; flex: 1; }
.news-card-link { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--blue); }

/* === Lema del club === */
.lema-club {
  margin: 18px auto 30px;
  max-width: 480px;
  border: none;
  padding: 0;
}
.lema-club p {
  color: white;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}
.lema-club p:first-child::before {
  content: '\201C';
  font-family: Georgia, serif;
}
.lema-club p:nth-child(2) {
  font-weight: 600;
  opacity: 0.95;
}
.lema-club p:last-child {
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  opacity: 1;
  margin-top: 0;
}
.lema-club p:last-child::after {
  content: '\201D';
  font-family: Georgia, serif;
}

/* === CTA Section === */
.cta-section {
  background:
    linear-gradient(rgba(9,63,180,0.72), rgba(9,63,180,0.82)),
    url('/assets/images/ctabanner.jpg') center 80%/cover no-repeat;
  color: white; padding: 56px 0; text-align: center;
}
.cta-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.cta-section p  { font-size: 16px; opacity: 0.85; margin-bottom: 28px; }
.cta-section .btn-secondary { border-color: rgba(255,255,255,0.6); color: white; }
.cta-section .btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* === Sobre nosotros === */
.sobre-eyebrow {
  font-size: 12px; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.sobre-h2 {
  font-size: 28px; font-weight: 800; margin-bottom: 20px;
  line-height: 1.2; color: var(--text);
}
.sobre-two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.sobre-photo {
  width: 100%; border-radius: 12px; object-fit: cover; display: block;
}
.master-features {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; align-content: start;
}
@media (max-width: 767px) {
  .sobre-two-col { grid-template-columns: 1fr; gap: 28px; }
  .master-features { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 479px) {
  .master-features { grid-template-columns: 1fr; }
}

/* Hero variants */
.hero-sm { padding: 56px 0; }
.hero-with-photo {
  background:
    linear-gradient(rgba(9,63,180,0.62), rgba(9,63,180,0.75)),
    url('/assets/images/heroinicio.jpg') center/cover no-repeat;
}
.hero-sobre {
  background:
    linear-gradient(rgba(9,63,180,0.82), rgba(9,63,180,0.90)),
    url('/assets/images/fotoequipo1.jpg') center/cover no-repeat;
}

/* === Auth Pages === */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo    { text-align: center; font-size: 44px; margin-bottom: 12px; color: var(--blue); }
.auth-title   { font-size: 22px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-sub     { font-size: 14px; color: var(--gray); text-align: center; margin-bottom: 28px; }
.auth-divider { border: none; border-top: 1px solid #f0f0f0; margin: 24px 0; }
.auth-footer  { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray); }

/* === Marks === */
.marks-section { margin-bottom: 32px; }
.marks-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.mark-time { font-size: 16px; font-weight: 700; color: var(--blue); font-family: monospace; }

/* === Ranking === */
.rank-pos { font-size: 16px; font-weight: 800; color: var(--gray); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rank-pos.top1 { color: #d97706; }
.rank-pos.top2 { color: #9ca3af; }
.rank-pos.top3 { color: #b45309; }

/* === Filters bar === */
.filters-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: white;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid #e8e8e8;
  box-shadow: var(--shadow);
}
.filters-bar .form-group { margin-bottom: 0; min-width: 150px; }

/* Panel soci header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Form dins de filters-bar (ranking) */
.filters-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  width: 100%;
}
.filters-form .form-group { margin-bottom: 0; min-width: 150px; }

/* === Calculadora === */
.calc-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.calc-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray);
  transition: all 0.15s;
  font-family: inherit;
}
.calc-tab.active {
  background: white;
  color: var(--blue);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-result { display: none; margin-top: 28px; }
.calc-result.visible { display: block; }
.calc-puntos-big { font-size: 52px; font-weight: 800; color: var(--blue); line-height: 1; }
.calc-puntos-big span { font-size: 22px; font-weight: 400; color: var(--gray); margin-left: 4px; }
.calc-percent-big { font-size: 48px; font-weight: 800; }
.calc-percent-big.good { color: var(--green); }
.calc-percent-big.warn { color: var(--orange); }
.calc-percent-big.bad  { color: var(--red); }
.calc-badge {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.calc-badge.met { background: #d1fae5; color: #065f46; }
.calc-badge.not { background: #f5f5f5; color: #888; }
.calc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.calc-meta-item label { font-size: 12px; color: var(--gray); font-weight: 600; display: block; margin-bottom: 2px; }
.calc-meta-item span  { font-size: 15px; font-weight: 700; font-family: monospace; }

/* Parciales */
.parciales-table tr.fast td { background: #f0fdf4; }
.parciales-table tr.slow td { background: #fff7ed; }
.parciales-table td.accent  { font-weight: 700; color: var(--blue); font-family: monospace; }

/* === Pagination === */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 28px; justify-content: center; }
.pagination a, .pagination span {
  padding: 7px 13px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--gray-light);
  color: var(--text);
  background: white;
  text-decoration: none;
}
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination .current { background: var(--blue); color: white; border-color: var(--blue); }

/* === Calendar === */
.calendar-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #e8e8e8;
}

/* === Password toggle === */
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-control { padding-right: 44px; }
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 18px;
  padding: 0;
  line-height: 1;
}
.toggle-password:hover { color: var(--text); }

/* === Footer === */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand-name { color: white; font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-col h4 { color: white; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 8px; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: #64748b; font-size: 13px; }
.footer-links a:hover { color: white; text-decoration: none; }

/* === Utilities === */
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--gray); }
.text-blue    { color: var(--blue); }
.text-red     { color: var(--red); }
.text-green   { color: var(--green); }
.text-sm      { font-size: 13px; }
.fw-bold      { font-weight: 700; }
.w-100        { width: 100%; }

/* === Modals === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border: none; background: none; cursor: pointer;
  font-size: 20px; color: #888; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* === Responsive === */
@media (max-width: 991px) {
  .navbar-links { display: none; }
  .navbar-auth  { display: none; }
  .navbar-hamburger { display: flex; }
  .admin-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: hidden; }
  .admin-sidebar {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    min-width: 0;
    gap: 4px;
    padding: 10px 16px;
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar-section { display: contents; }
  .admin-sidebar-title { display: none; }
  .admin-sidebar a { padding: 7px 12px; font-size: 13px; white-space: nowrap; border-radius: var(--radius); }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .news-grid    { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
  .footer { padding: 32px 0 20px; margin-top: 40px; }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 767px) {
  .news-grid    { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .calc-meta    { grid-template-columns: 1fr; }
  .filters-bar  { display: block; }
  .filters-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters-form .form-group { min-width: 0; }
  table th, table td { padding: 9px 12px; }
  .admin-main   { padding: 20px 16px; }
  .hero         { padding: 48px 0; }
  .hero h1      { font-size: 26px; }
}
@media (max-width: 479px) {
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .auth-card    { padding: 24px 20px; }
  .calc-tabs    { flex-direction: column; }
}
