body {
  font-family: 'Segoe UI', sans-serif;
  background: #0d0f14;
  color: #dde1ec;
  padding: 30px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
  font-weight: 400;
  color: #7b8ab8;
  text-transform: uppercase;
  letter-spacing: 3px;
  border-bottom: 1px solid #1e2336;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

tbody { display: table-row-group; }

tr.indexbreakrow { display: none; }

tr.indexhead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4b5280;
  padding: 0 12px 10px;
  border-bottom: 1px solid #1e2336;
}

tr {
  display: table-row;
}

tbody tr {
  border-bottom: 1px solid #1a1e2e;
  transition: background 0.15s ease;
}
tbody tr:hover { background: #131826; }

th, td {
  border: none;
  padding: 10px 12px;
  vertical-align: middle;
}

td.indexcolicon { width: 44px; }
td.indexcolname { text-align: left; }
td.indexcollastmod, td.indexcolsize {
  white-space: nowrap;
  text-align: right;
  color: #6b7280;
  font-size: 0.82rem;
  width: 1%;
}

a { color: #dde1ec; text-decoration: none; }
a:hover { color: #4f6ef7; }

/* ── Icono/etiqueta por tipo de archivo ── */
td.indexcolicon a::before {
  content: "•";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  border-radius: 7px;
  background: #1e2336;
  color: #818cf8;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

td.indexcolicon a[href$=".php"]::before        { content: "PHP";  background: #241a3d; color: #a78bfa; }
td.indexcolicon a[href$=".html"]::before,
td.indexcolicon a[href$=".htm"]::before        { content: "HTML"; background: #17222c; color: #38bdf8; }
td.indexcolicon a[href$=".css"]::before        { content: "CSS";  background: #16202f; color: #60a5fa; }
td.indexcolicon a[href$=".js"]::before         { content: "JS";   background: #2a2410; color: #facc15; }
td.indexcolicon a[href$=".json"]::before       { content: "JSON"; background: #2a2410; color: #fbbf24; }
td.indexcolicon a[href$=".jpg"]::before,
td.indexcolicon a[href$=".jpeg"]::before,
td.indexcolicon a[href$=".png"]::before,
td.indexcolicon a[href$=".gif"]::before,
td.indexcolicon a[href$=".webp"]::before       { content: "IMG";  background: #142a1f; color: #34d399; }
td.indexcolicon a[href$=".log"]::before,
td.indexcolicon a[href$=".txt"]::before        { content: "TXT";  background: #1c1c1c; color: #9ca3af; }
td.indexcolicon a[href$=".sh"]::before         { content: "SH";   background: #1c1c1c; color: #9ca3af; }
td.indexcolicon a[href$=".md"]::before         { content: "MD";   background: #1c1c1c; color: #9ca3af; }
td.indexcolicon a[href$=".zip"]::before,
td.indexcolicon a[href$=".tar.gz"]::before,
td.indexcolicon a[href$=".gz"]::before         { content: "ZIP";  background: #2a1f14; color: #f59e0b; }
td.indexcolicon a[href$=".pdf"]::before        { content: "PDF";  background: #2a1414; color: #f87171; }

/* Carpetas: enlaces que terminan en "/" */
td.indexcolicon a[href$="/"]::before {
  content: "📁";
  background: transparent;
  font-size: 18px;
  width: auto;
  height: auto;
  color: #c9a45c;
}

address {
  margin-top: 30px;
  font-size: 0.72rem;
  color: #4b5280;
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body { padding: 20px 14px 40px; }
  h1 { font-size: 1.1rem; letter-spacing: 2px; }

  td.indexcollastmod { display: none; }

  td.indexcolname {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  td.indexcolsize { font-size: 0.74rem; padding-right: 6px; }
  th, td { padding: 9px 6px; }
  td.indexcolicon { width: 38px; }
}

@media (max-width: 420px) {
  tr.indexhead th:nth-child(1) { display: none; }
}

