/* ================================
   Panobit Autoindex – Light Theme
   ================================ */

/* Enforce light UI even if system is dark */
:root { color-scheme: light; }

html, body {
  background: #edf1f5;
  color: #111;
}

.content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 1rem 48px;
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

/* Header */
h1 {
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #2b3a48;
  word-break: break-word; /* safer than break-all for long names */
}

@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
}

/* Card wrapper for table */
#table-list {
  overflow-x: auto;
  background: #fff;
  margin: 24px 0 32px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(16, 42, 67, .06);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .92rem;
}

/* Sticky header for long lists */
.t-header th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  font-size: .95rem;
  height: 2.4rem;
  color: #2b3a48;
  border-bottom: 1px solid #e6ebf0;
}

/* Cells */
th, td {
  padding: .75rem .9rem;
  text-align: left;
  vertical-align: middle;
}

th:nth-child(1) { width: 48%; }
th:nth-child(2) { width: 26%; }
th:nth-child(3) { width: 16%; text-align: right; }

/* Row styles */
tbody tr {
  border-bottom: 1px solid #f0f3f6;
}

tbody tr:nth-child(odd) {
  background-color: #fafcfe; /* subtle zebra */
}

tbody tr:hover {
  background-color: #eef5ff;
}

/* Name column & icons */
.name { padding-left: 1.25em; }

td:nth-child(1) { padding-left: 2.25rem; }
td:nth-child(2), td:nth-child(3) { color: #586e87; }
td:nth-child(3) { text-align: right; }

/* Links */
a {
  color: #0b63ce;
  text-decoration: none;
}
a:hover { color: #0a58b3; text-decoration: underline; }
td a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td a:visited { color: #6b7280; }

/* Sort chevrons */
.colname:not(.no-sort) a {
  position: relative;
  display: inline-block;
  padding-right: 18px;
}
.colname:not(.no-sort) a:before,
.colname:not(.no-sort) a:after {
  content: "";
  position: absolute;
  right: 2px;
  border: 5px solid transparent;
  opacity: .35;
}
.colname:not(.no-sort) a:before {
  top: 6px;             /* up arrow */
  border-bottom-color: #2b3a48;
}
.colname:not(.no-sort) a:after {
  top: 16px;            /* down arrow */
  border-top-color: #2b3a48;
}
.colname[aria-sort="ascending"] a:before,
.colname[aria-sort="descending"] a:after { opacity: .85; }

/* Icons */
.icon {
  height: 1.1em;
  margin-right: .6em;
  vertical-align: text-bottom;
  filter: grayscale(.7) brightness(1.7);
}

/* Footer */
address {
  margin-top: 10px;
  color: #6b7280;
  font-size: .82rem;
  font-style: normal;
}

/* Readme / helper text */
.header-text, .readme-text {
  color: #41576c;
}
.readme-text {
  padding-bottom: 20px;
  margin-bottom: 22px;
  font-size: .95rem;
  border-bottom: 1px solid #e4e9ee;
}

/* Filter input */
#filter-keyword {
  display: block;
  width: 14rem;
  max-width: 100%;
  padding: .55rem .85rem;
  font: inherit;
  color: #111;
  background: #fff;
  border: 1px solid #d6dde6;
  border-radius: 8px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
#filter-keyword:focus {
  border-color: #8fb4ff;
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(143, 180, 255, .25);
}

/* Mobile layout: stack date/size and give name more room */
@media (max-width: 640px) {
  th:nth-child(2), td:nth-child(2),
  th:nth-child(3), td:nth-child(3) {
    width: auto;
  }
  td a { white-space: normal; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
