/* ============================================================
   AGUSTIN APP — Estilos temática Minecraft
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --mc-grass:    #5d9e3f;
  --mc-dirt:     #8b5e3c;
  --mc-stone:    #7f7f7f;
  --mc-wood:     #a0522d;
  --mc-sky:      #5b9bd5;
  --mc-gold:     #ffd700;
  --mc-diamond:  #4dd9e8;
  --mc-redstone: #e03030;
  --mc-dark:     #1a1a2e;
  --mc-panel:    #2d2d2d;
  --mc-border:   #555555;
  --mc-text:     #f0f0f0;
  --mc-green:    #44cc44;
  --mc-sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--mc-dark);
  color: var(--mc-text);
  min-height: 100vh;
}

/* ── Pixel font helper ── */
.font-pixel { font-family: 'Press Start 2P', monospace; }

/* ── Minecraft block border ── */
.mc-block {
  border: 3px solid #000;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.4),
              inset  3px  3px 0 rgba(255,255,255,.15);
  image-rendering: pixelated;
}

/* ── Login page ── */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(180deg, #1a3a5c 0%, #0d1b2a 60%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Estrellas de fondo */
.login-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 30%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 55%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 70%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 80%, #fff 0%, transparent 100%),
    radial-gradient(2px 2px at 15% 85%, #ffd 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 20%, #ffd 0%, transparent 100%);
  pointer-events: none;
}

.login-card {
  background: var(--mc-panel);
  border: 4px solid #444;
  box-shadow: 0 0 0 2px #222,
              0 0 40px rgba(77,217,232,.2),
              inset 0 1px 0 rgba(255,255,255,.08);
  border-radius: 4px;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: block;
  margin: 0 auto 1rem;
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
}

.login-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.65rem, 3vw, .9rem);
  color: var(--mc-gold);
  text-align: center;
  text-shadow: 2px 2px 0 #7a5000, 0 0 20px rgba(255,215,0,.4);
  line-height: 1.6;
  margin-bottom: .25rem;
}

.login-subtitle {
  font-size: .8rem;
  color: #aaa;
  text-align: center;
  margin-bottom: 1.75rem;
}

.mc-input {
  background: #1a1a1a !important;
  border: 2px solid #555 !important;
  color: #f0f0f0 !important;
  border-radius: 2px !important;
  padding: .6rem .85rem !important;
  font-family: 'Nunito', sans-serif !important;
  transition: border-color .2s;
}
.mc-input:focus {
  border-color: var(--mc-diamond) !important;
  box-shadow: 0 0 0 3px rgba(77,217,232,.25) !important;
  outline: none !important;
}
.mc-input::placeholder { color: #666 !important; }

.mc-label {
  color: #ccc;
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .35rem;
}

.btn-mc-primary {
  background: var(--mc-grass);
  border: none;
  border-bottom: 4px solid #3a6b28;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: .65rem;
  letter-spacing: .05em;
  padding: .75rem 1.5rem;
  border-radius: 2px;
  width: 100%;
  cursor: pointer;
  transition: all .12s ease;
  text-transform: uppercase;
}
.btn-mc-primary:hover {
  background: #6db84a;
  transform: translateY(-1px);
}
.btn-mc-primary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.btn-mc-danger {
  background: var(--mc-redstone);
  border: none;
  border-bottom: 4px solid #8b1a1a;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: .55rem;
  padding: .5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all .12s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-mc-danger:hover { background: #f04040; color:#fff; transform:translateY(-1px); }
.btn-mc-danger:active { transform:translateY(2px); border-bottom-width:2px; }

.btn-mc-secondary {
  background: #555;
  border: none;
  border-bottom: 4px solid #333;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: .55rem;
  padding: .5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all .12s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-mc-secondary:hover { background:#666; color:#fff; transform:translateY(-1px); }
.btn-mc-secondary:active { transform:translateY(2px); border-bottom-width:2px; }

.btn-mc-info {
  background: var(--mc-diamond);
  border: none;
  border-bottom: 4px solid #2a8a96;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: .55rem;
  padding: .5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all .12s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-mc-info:hover { background:#6ae8f5; color:#000; transform:translateY(-1px); }
.btn-mc-info:active { transform:translateY(2px); border-bottom-width:2px; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--mc-sidebar-w);
  height: 100vh;
  background: #1e1e1e;
  border-right: 3px solid #444;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  background: #111;
  border-bottom: 2px solid #444;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 52px;
  height: 52px;
  image-rendering: pixelated;
  margin-bottom: .5rem;
}

.sidebar-title {
  font-family: 'Press Start 2P', monospace;
  font-size: .6rem;
  color: var(--mc-gold);
  text-shadow: 1px 1px 0 #7a5000;
  line-height: 1.7;
}

.sidebar-user {
  padding: .75rem 1rem;
  background: #252525;
  border-bottom: 1px solid #333;
  font-size: .8rem;
  color: #bbb;
  flex-shrink: 0;
}
.sidebar-user strong { color: var(--mc-diamond); display:block; font-size:.85rem; }

.sidebar-nav { flex: 1; padding: .5rem 0; }

.nav-section-title {
  font-size: .6rem;
  font-weight: 800;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .75rem 1rem .25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1rem;
  color: #ccc;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: #2a2a2a;
  color: var(--mc-diamond);
  border-left-color: var(--mc-diamond);
}
.sidebar-link.active {
  background: #1a3a3a;
  color: var(--mc-diamond);
  border-left-color: var(--mc-diamond);
}
.sidebar-link .nav-icon { font-size: 1.1rem; width: 22px; text-align:center; }

.sidebar-link.exit-link { color: #e07070; }
.sidebar-link.exit-link:hover { background:#2a1a1a; color:var(--mc-redstone); border-left-color:var(--mc-redstone); }

/* ── Main content ── */
.main-content {
  margin-left: var(--mc-sidebar-w);
  min-height: 100vh;
  background: var(--mc-dark);
  transition: margin-left .3s ease;
}

.topbar {
  background: #111;
  border-bottom: 2px solid #333;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.5rem, 2vw, .75rem);
  color: var(--mc-gold);
}

.page-content { padding: 1.5rem; }

/* ── Cards ── */
.mc-card {
  background: #252525;
  border: 2px solid #444;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.mc-card .card-header {
  background: #1a1a1a;
  border-bottom: 2px solid #444;
  font-weight: 700;
  color: var(--mc-diamond);
  font-size: .9rem;
  padding: .75rem 1rem;
}
.mc-card .card-body { padding: 1rem; }

/* ── Stat cards ── */
.stat-card {
  background: #252525;
  border: 2px solid #444;
  border-radius: 3px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--mc-diamond); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 2rem; margin-bottom: .5rem; }
.stat-card .stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.4rem;
  color: var(--mc-gold);
  display: block;
}
.stat-card .stat-label { font-size: .8rem; color: #aaa; margin-top: .25rem; }

/* ── Tables ── */
.mc-table { color: var(--mc-text); }
.mc-table thead th {
  background: #1a1a1a;
  color: var(--mc-diamond);
  border-color: #444;
  font-size: .82rem;
  font-weight: 700;
}
.mc-table tbody tr { border-color: #333; }
.mc-table tbody tr:hover { background: #2a2a2a; }
.mc-table td, .mc-table th { border-color: #333 !important; vertical-align: middle; }

/* ── Forms ── */
.mc-form-control {
  background: #1a1a1a !important;
  border: 2px solid #555 !important;
  color: #f0f0f0 !important;
  border-radius: 2px !important;
}
.mc-form-control:focus {
  border-color: var(--mc-diamond) !important;
  box-shadow: 0 0 0 3px rgba(77,217,232,.2) !important;
}
.mc-form-control option { background: #1a1a1a; }

.mc-select {
  background: #1a1a1a !important;
  border: 2px solid #555 !important;
  color: #f0f0f0 !important;
  border-radius: 2px !important;
}
.mc-select:focus {
  border-color: var(--mc-diamond) !important;
  box-shadow: 0 0 0 3px rgba(77,217,232,.2) !important;
}

/* ── Badges ── */
.badge-mc { font-size: .7rem; border-radius: 2px; font-weight: 700; }

/* ── Alerts ── */
.alert-mc-success { background:#1a3a1a; border:1px solid #3a7a3a; color:#7ddc7d; }
.alert-mc-danger  { background:#3a1a1a; border:1px solid #7a3a3a; color:#dc7d7d; }
.alert-mc-info    { background:#1a2a3a; border:1px solid #3a5a7a; color:#7db5dc; }
.alert-mc-warning { background:#3a2a1a; border:1px solid #7a5a3a; color:#dcb57d; }

/* ── Hamburger (mobile) ── */
.sidebar-toggle {
  display: none;
  background: #333;
  border: 2px solid #555;
  color: #fff;
  padding: .4rem .6rem;
  border-radius: 2px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* ── Overlay mobile ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1039;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; align-items:center; justify-content:center; }
  .page-content { padding: 1rem; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

/* ── Pixel grass divider ── */
.grass-divider {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--mc-grass) 0px, var(--mc-grass) 8px,
    #4a8030 8px, #4a8030 16px
  );
  border-top: 2px solid #3a6b28;
}

/* ── Page header ── */
.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #333;
}
.page-header h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.6rem, 2.5vw, .85rem);
  color: var(--mc-gold);
  text-shadow: 1px 1px 0 #7a5000;
  margin: 0;
}
.page-header p { color: #aaa; font-size: .85rem; margin: .4rem 0 0; }

/* ── Calendar ── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 2px;
  padding: .4rem .2rem;
  text-align: center;
  font-size: .75rem;
  cursor: pointer;
  min-height: 48px;
  transition: background .15s;
}
.cal-day:hover { background: #2a2a2a; border-color: var(--mc-diamond); }
.cal-day.today  { border-color: var(--mc-gold); background: #2a2500; }
.cal-day.has-event::after {
  content: '●';
  display: block;
  font-size: .5rem;
  color: var(--mc-green);
  margin-top: 2px;
}
.cal-day.other-month { opacity: .35; }
.cal-header-day {
  text-align: center;
  font-size: .7rem;
  font-weight: 800;
  color: #888;
  padding: .3rem 0;
}

/* ── Deposiciones colores ── */
.dep-normal  { color: #a0784a; }
.dep-blando  { color: #c8a060; }
.dep-liquido { color: #e8c080; }
.dep-sangre  { color: var(--mc-redstone); }

/* ── Tooltip pixel ── */
[data-mc-tooltip] { position: relative; cursor: help; }
[data-mc-tooltip]::after {
  content: attr(data-mc-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 1px solid #555;
  color: #f0f0f0;
  font-size: .7rem;
  padding: .3rem .5rem;
  white-space: nowrap;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
}
[data-mc-tooltip]:hover::after { opacity: 1; }
