/* SOC INVEST — Selectel S3 listing */

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #7b8494;
  --line: #e8ebf0;
  --blue: #246bfd;
  --blue-soft: #eef4ff;
  --red: #e8435a;
  --red-soft: #fff0f2;
  --shadow: 0 14px 40px rgba(17, 24, 39, .07);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 0%, rgba(36,107,253,.08), transparent 30%),
    #f4f6f9;
}

body {
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 58px 28px 80px;
  background: transparent;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#parent { display: none !important; }

#title {
  margin: 0 0 30px;
  font-size: 0;
  line-height: 1;
}

#title::before {
  content: "SOC INVEST";
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .12em;
}

#title::after {
  content: "Материалы";
  display: block;
  color: #0d1321;
  font-size: 44px;
  line-height: 1.06;
  font-weight: 760;
  letter-spacing: -.045em;
}

#listing {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

#listing thead {
  display: none;
}

#listing tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#listing tbody tr {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name name"
    "size date";
  min-width: 0;
  min-height: 156px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#listing tbody tr:hover {
  transform: translateY(-3px);
  border-color: #d8e1ef;
  box-shadow: 0 20px 50px rgba(17,24,39,.11);
}

#listing td {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

#listing .colname {
  grid-area: name;
  min-width: 0;
}

#listing .colname a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  color: #172033;
  border: 0;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
  transition: color .16s ease;
}

#listing .colname a:hover {
  color: var(--blue);
}

#listing tbody tr:not(.subdir) .colname a::before {
  content: "FILE";
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f1f4f8;
  color: #667085;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

#listing .colname a[href$=".pdf" i]::before {
  content: "PDF" !important;
  background: var(--red-soft) !important;
  color: var(--red) !important;
}

#listing .colname a[href$=".doc" i]::before,
#listing .colname a[href$=".docx" i]::before {
  content: "DOC" !important;
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
}

#listing .colname a[href$=".xls" i]::before,
#listing .colname a[href$=".xlsx" i]::before {
  content: "XLS" !important;
  background: #edf9f3 !important;
  color: #16855b !important;
}

#listing .colname a[href$=".ppt" i]::before,
#listing .colname a[href$=".pptx" i]::before {
  content: "PPT" !important;
  background: #fff4eb !important;
  color: #d96924 !important;
}

#listing .colname a[href$=".png" i]::before,
#listing .colname a[href$=".jpg" i]::before,
#listing .colname a[href$=".jpeg" i]::before,
#listing .colname a[href$=".webp" i]::before {
  content: "IMG" !important;
  background: #eefaf8 !important;
  color: #0f8a78 !important;
}

#listing tr.subdir .colname a::before {
  content: "DIR";
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

#listing .colsize {
  grid-area: size;
  align-self: end;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#listing .coldate {
  grid-area: date;
  align-self: end;
  justify-self: end;
  margin-top: 20px;
  color: #a0a7b2;
  font-size: 11px;
  white-space: nowrap;
}

#listing .size_bytes {
  display: none !important;
}

#listing tr.subdir .colsize,
#listing tr.subdir .coldate {
  visibility: hidden;
}

@media (max-width: 900px) {
  #listing tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    padding: 34px 14px 48px;
  }

  #title {
    margin-bottom: 22px;
  }

  #title::after {
    font-size: 34px;
  }

  #listing tbody {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #listing tbody tr {
    min-height: 138px;
    padding: 18px;
    border-radius: 16px;
  }

  #listing .coldate {
    display: none;
  }

  #listing .colname a {
    font-size: 15px;
  }
}
