/* hcraft.cz Companion — UI layer. Matches the main site's design system
   (dark #0a0c12, brand orange, Inter + Space Grotesk). Loaded after styles.css. */

:root {
  --bg: #0a0c12;
  --surface: rgba(20, 24, 34, 0.72);
  --surface-solid: #11141c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --brand: #ff6b2b;
  --brand-400: #ff8a4d;
  --a11y-focus: #ff8a4d;
  --a11y-focus-shadow: rgba(255, 107, 43, 0.35);
}

html, body { height: auto; min-height: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: var(--bg);
  color: #e7e9ee;
  -webkit-font-smoothing: antialiased;
}

body.app-body {
  background-image:
    radial-gradient(900px 520px at 85% -8%, rgba(255, 107, 43, 0.16), transparent 70%),
    radial-gradient(700px 480px at -5% 30%, rgba(255, 179, 71, 0.06), transparent 70%);
  background-attachment: fixed;
  padding-bottom: 6.5rem;
}

body.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
}

::selection { background: var(--brand); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2f3a; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

.pixelated { image-rendering: pixelated; }

/* ---------- Surfaces ---------- */
body .glass-effect {
  background: linear-gradient(180deg, rgba(24, 28, 40, 0.78), rgba(15, 18, 27, 0.78));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

body .dashboard-card.rounded-xl,
body .glass-effect.rounded-xl { border-radius: 1.1rem; }

.dashboard-card { padding: 1.25rem; }

.hover-scale { transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.hover-scale:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 43, 0.35);
  box-shadow: 0 22px 44px -22px rgba(255, 107, 43, 0.25);
}

/* Inner panels (were slate-800/40-50 boxes) */
body [class*="bg-slate-800/40"],
body [class*="bg-slate-800/50"] {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  border-radius: 0.85rem;
}

body [class*="border-slate-700"] { border-color: var(--border); }

/* ---------- Headings ---------- */
.font-minecraft { font-family: "Space Grotesk", "Inter", sans-serif; letter-spacing: -0.01em; }

body h2.font-minecraft {
  font-weight: 700;
  font-size: 1.05rem;
}

body h2.font-minecraft > i.bi:first-child {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.65rem !important;
  border-radius: 0.6rem;
  background: rgba(255, 107, 43, 0.14);
  color: var(--brand-400) !important;
  font-size: 0.95rem;
}

.dashboard-section-heading { padding: 0.75rem 0.25rem 0; }
.dashboard-section-heading .label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: 0.2rem;
}
.dashboard-section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ---------- Tables ---------- */
body table thead { background: rgba(255, 255, 255, 0.035) !important; }
body table th {
  font-size: 0.68rem !important;
  letter-spacing: 0.1em;
  color: #9aa1b2 !important;
  font-weight: 600 !important;
}
body table tbody tr { transition: background-color .15s ease; }
body table tbody tr:hover { background-color: rgba(255, 255, 255, 0.03); }
body .divide-y > :not([hidden]) ~ :not([hidden]) { border-color: rgba(255, 255, 255, 0.06); }
.table-scroll, .dashboard-table-scroll { border-radius: 0.85rem; }

/* ---------- Buttons ---------- */
button, .rounded-lg[class*="bg-"] { transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
button[data-gift-button] { border-radius: 0.75rem; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6); }
button[data-gift-button]:hover { transform: translateY(-1px); }
.rent-plot-button, .extend-plot-button, .approve-plot-button, .deny-plot-button, .reset-plot-button {
  border-radius: 0.55rem !important;
  font-weight: 600;
}
.rent-plot-button { background: var(--brand) !important; }
.rent-plot-button:hover { background: #e85a1a !important; }

/* ---------- Inputs / modals ---------- */
input[type="text"], input[type="number"], input[type="password"] {
  border-radius: 0.7rem !important;
}
#add-plot-modal > div, #extend-plot-modal > div {
  border-radius: 1.1rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid) !important;
}

/* ---------- Hero header ---------- */
.app-hero {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(520px 200px at 100% 0%, rgba(255, 107, 43, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(24, 28, 40, 0.8), rgba(15, 18, 27, 0.8));
  border: 1px solid var(--border);
}
.app-hero .text-gradient {
  background: linear-gradient(90deg, #ff8a4d, #ff6b2b 55%, #ffb347);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Bottom navigation (floating pill) ---------- */
.app-nav {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 0.9rem);
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  border-radius: 999px;
  background: rgba(14, 17, 25, 0.82);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.85);
}
.app-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  color: #aab0bf;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.app-nav a i { font-size: 1.05rem; }
.app-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.app-nav a.is-active { color: #fff; background: var(--brand); box-shadow: 0 8px 22px -8px rgba(255, 107, 43, 0.7); }
.app-nav a.is-danger:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }
@media (max-width: 520px) {
  .app-nav a { flex-direction: column; gap: 0.15rem; padding: 0.5rem 0.8rem; font-size: 0.68rem; }
  .app-nav a i { font-size: 1.2rem; }
}

/* ---------- Login ---------- */
.login-bg {
  background-color: var(--bg);
  background-image:
    radial-gradient(700px 460px at 50% -10%, rgba(255, 107, 43, 0.22), transparent 70%),
    linear-gradient(rgba(10,12,18,.78), rgba(10,12,18,.9)),
    url(/assets/images/bg-lobby4.jpg);
  background-size: auto, auto, cover;
  background-position: center;
  background-attachment: fixed;
}

.btn-brand {
  background: linear-gradient(180deg, #ff7a3d, #ff6b2b);
  box-shadow: 0 10px 30px -10px rgba(255, 107, 43, 0.65);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-brand:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 16px 36px -10px rgba(255, 107, 43, 0.75); }
.btn-brand:active { transform: none; }

/* ---------- Misc ---------- */
.tooltip { cursor: help; }

@media (max-width: 768px) {
  .dashboard-card { padding: 1rem; }
  .dashboard-section-heading h2 { font-size: 1.25rem; }
  .hover-scale:hover { transform: none; }
  .dashboard-table-scroll { max-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Grid children must be allowed to shrink, otherwise wide tables push the page sideways on phones */
.dashboard-main-grid, .dashboard-main-grid > *, .dashboard-main-grid .grid > * { min-width: 0; }
html, body { overflow-x: hidden; }
