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

html { scroll-behavior: smooth; }

:root {
  --celeste: #74ACDF;
  --celeste-light: #8FC4ED;
  --celeste-dark: #5A8FC4;
  --negro: #0a0a0a;
  --negro-puro: #000000;
  --gris-oscuro: #141414;
  --gris-medio: #1e1e1e;
  --gris-claro: #2a2a2a;
  --blanco: #ffffff;
  
  --bg: var(--negro);
  --card-bg: var(--gris-oscuro);
  --card-border: rgba(116, 172, 223, 0.2);
  --text-primary: var(--blanco);
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.55);
  --accent: var(--celeste);
  --accent-hover: var(--celeste-light);
  
  --radius: 10px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --kilombo-blue: var(--celeste);
  --kilombo-black: var(--negro);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, system-ui, sans-serif;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(116, 172, 223, 0.15);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.04);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.card-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  text-rendering: optimizeLegibility;
}


.navbar {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 560px;
  z-index: 1000;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.navbar-inner:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.navbar-brand .navbar-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(116, 172, 223, 0.15);
  border: 1px solid rgba(116, 172, 223, 0.2);
  color: var(--accent);
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.brand-text {
  color: var(--text-primary);
  font-weight: 600;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.navbar-link-active {
  color: var(--accent);
  background: rgba(116, 172, 223, 0.12);
  border: 1px solid rgba(116, 172, 223, 0.2);
}

.navbar-link-logout {
  color: rgba(239, 68, 68, 0.95);
}

.navbar-link-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.footer-public {
  margin-top: auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.footer-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-copy {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .navbar {
    width: calc(100% - 1rem);
    max-width: none;
  }

  .navbar-inner {
    padding: 0.5rem 1rem;
  }

  .navbar-brand .navbar-logo {
    height: 32px;
  }

  .navbar-menu {
    gap: 0.35rem;
  }

  .navbar-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .navbar-link span {
    display: none;
  }

  .footer-inner {
    gap: 0.35rem;
    font-size: 0.7rem;
  }

  .panel-sidebar {
    margin: 0;
    height: 100vh;
    border-radius: 0;
    border-left: none;
    border-top: none;
    top: 0;
    left: 0;
  }

  .panel-sidebar--guest {
    height: auto;
    max-height: 100vh;
  }

  .panel-main {
    margin-left: 260px;
    padding: 0 0.75rem;
  }

  .panel-header {
    margin-top: 0.75rem;
  }

  .panel-content {
    padding: 1rem 0 1.5rem;
  }

  .panel-footer {
    margin-bottom: 0.75rem;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-main);
  background: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  border: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 600;
}

body {
  background: #0a0a0a;
}

body.panel-page {
  min-height: 100vh;
}

.panel-layout {
  display: flex;
  min-height: 100vh;
  background: transparent;
  overflow-x: hidden;
}

.panel-sidebar {
  width: 260px;
  flex-shrink: 0;
  margin: 0;
  height: calc(100vh - 2rem);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: fixed;
  overflow-y: auto;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  box-sizing: border-box;
}

.panel-sidebar--guest {
  height: auto;
  max-height: calc(100vh - 2rem);
}

.panel-sidebar--guest .sidebar-nav {
  flex: 0 1 auto;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-header .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-header .brand:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

.sidebar-header .brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #0a0a0a;
  padding: 9px;
  box-sizing: border-box;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 1.25rem 1.25rem;
  min-height: 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
  text-align: center;
}

.nav-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.75rem 0.75rem 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
}

.nav-item.active {
  background: rgba(116, 172, 223, 0.1);
  color: var(--accent);
  border-color: rgba(116, 172, 223, 0.2);
  font-weight: 600;
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  opacity: 0.9;
}
.nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--accent, #4a9eff);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.panel-sidebar .sidebar-nav .nav-section:only-child .nav-item {
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.panel-main {
  flex: 1;
  margin-left: 276px;
  min-width: 0;
  overflow-x: hidden;
  background: transparent;
  padding: 0 1rem;
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.panel-header {
  max-width: 1200px;
  margin: 0 auto 0.5rem;
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 99;
  box-sizing: border-box;
}

.panel-header-center .header-content {
  justify-content: center;
}

.panel-header-center .panel-header-title {
  text-align: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}

.panel-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 200px;
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.user-info:hover .user-avatar {
  border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(116, 172, 223, 0.15);
  border: 1px solid rgba(116, 172, 223, 0.2);
  color: #74ACDF;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  text-align: center;
}

.user-name-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.username {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-rank {
  color: #74ACDF;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 600;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  color: #000000;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.panel-content {
  flex: 1;
  padding: 0 0 3rem;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  background: transparent;
}

.panel-footer {
  padding: 1.25rem 0;
  margin: 0 auto 1.5rem;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.panel-footer .footer-message {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.panel-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.panel-footer .footer-copy {
  color: rgba(255, 255, 255, 0.55);
}

.panel-footer .footer-copy strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.panel-footer .footer-sep {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

.panel-footer .footer-credit {
  color: rgba(255, 255, 255, 0.55);
}

.panel-footer .footer-link,
.panel-footer .footer-link-credit {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.panel-footer .footer-link:hover,
.panel-footer .footer-link-credit:hover {
  color: var(--accent);
}

.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-header-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  color: var(--accent);
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  font-size: 0.9375rem;
  margin: 0 0 1.5rem 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.6);
  flex-direction: column;
}

.loading i {
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
  color: rgba(255, 255, 255, 0.5);
}

.loading p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-full {
  min-height: 400px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-control {
  padding: 0.8rem 1.2rem;
  background: var(--gris-medio);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--azul-celeste);
  box-shadow: 0 0 0 3px rgba(116, 172, 223, 0.2);
  background: var(--gris-claro);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--gris-medio);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236CB4EE' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control:focus {
  background-color: var(--gris-claro);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236CB4EE' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 12px;
}

select.form-control option {
  background: #000000 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.75rem;
}

select.form-control option:hover,
select.form-control option:focus {
  background: rgba(116, 172, 223, 0.2) !important;
  color: #74ACDF !important;
}

select.form-control option:checked {
  background: rgba(116, 172, 223, 0.3) !important;
  color: #74ACDF !important;
}

select.form-control option:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

.form-help {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.alert-success {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}
