/* OE5ITH Cloud Design System (Tiles Registry - Internal Theme) */
:root {
  --sidebar-width: 260px;
  --danger: #e74c3c;
  --panel: #252525;
  --panel-2: #1a1a1a;
}

.layout { display: flex; min-height: calc(100vh - var(--topbar-height)); }
.sidebar {
  width: var(--sidebar-width);
  background: #202020;
  padding: 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#app-main { flex: 1; padding: 40px; overflow-y: auto; }

/* Typography */
h1 { font-size: 1.8rem; margin: 0 0 20px; color: #fff; font-weight: 300; }
h1 span { font-weight: 700; color: var(--accent); }
h2 { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 600; color: #fff; }
h3 { font-size: 1.0rem; margin-bottom: 12px; font-weight: 600; color: #ddd; }

p { font-size: 0.9rem; line-height: 1.5; color: var(--muted); margin-bottom: 1rem; }

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

/* Navigation */
.nav-link {
  padding: 12px 15px;
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.nav-link:hover,
.nav-link.active { background: var(--accent); color: #fff; }
.nav-link i { width: 20px; text-align: center; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 25px;
}

.map-group {
  margin-bottom: 30px;
}

.map-group h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #fff;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.badge-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.type-badge {
  color: #9ec5ff;
  border-color: #375b88;
}

.card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border-color: var(--accent);
}

.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: #fff; }
.card-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.badge {
  font-size: 0.7rem;
  background: #2a2a2a;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--border);
}

.section { margin-bottom: 12px; }

.meta-row {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  align-items: center;
}

.endpoint-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.endpoint-summary div {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.summary-label {
  font-weight: 600;
  color: #fff;
}

.endpoint-summary code {
  background: #2a2a2a;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #e6e6e6;
  font-size: 0.8rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-box { margin-top: 10px; }
.url-box label {
  display: block;
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-wrapper {
  display: flex;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-wrapper code {
  flex: 1;
  padding: 8px 12px;
  font-family: 'Consolas', monospace;
  font-size: 0.85rem;
  color: #00ff00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-wrapper button {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  padding: 0 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.code-wrapper button:hover {
  background: var(--accent);
  color: #000;
}


/* Modal / Map Preview */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--panel);
  width: 90%;
  height: 90%;
  max-width: 1200px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}

.modal-header {
  padding: 15px 20px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { margin: 0; color: var(--text); }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
}

.icon-btn:hover { background: var(--danger); color: #fff; }

#map-container {
  flex: 1;
  background: #000;
  position: relative;
}

.modal-footer {
  padding: 8px 20px;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  text-align: right;
  font-size: 0.8rem;
}

.empty-msg {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

/* Sprites & Fonts */
.sprite-preview {
  height: 60px;
  width: 100%;
  background-repeat: no-repeat !important;
  background-size: auto 60px;
  background-position: left center;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 5px;
  background-color: #222;
}

.sprite-scroll-container {
  flex: 1;
  overflow: auto;
  background: repeating-conic-gradient(#1a1a1a 0% 25%, #2a2a2a 0% 50%) 50% / 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sprite-scroll-container img {
  max-width: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  background: transparent;
  display: block;
}

.font-variant {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.font-variant:last-child { border-bottom: none; }

.font-variant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.font-variant-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.badge.small { font-size: 0.7rem; }

@media (max-width: 768px) {
  .brand { font-size: 1rem; }
  #app-main { padding: 20px 14px; }
  .cards { grid-template-columns: 1fr; }
}
