/* =========================================================
   SaraSystem Releases - Apache Directory Listing
   ========================================================= */

:root {
    --bg: #f5f7fa;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --header: #0f172a;
    --row-hover: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    padding: 40px 20px;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 15px;
}

body::before {
    content: "SaraSystem Releases";
    display: block;
    max-width: 1100px;
    margin: 0 auto 6px auto;

    font-size: 28px;
    font-weight: 700;
    color: var(--header);
}

body::after {
    content: "Repositório de versões e arquivos";
    display: block;
    max-width: 1100px;
    margin: 0 auto 28px auto;

    font-size: 14px;
    color: var(--muted);
}

/* ---------------------------------------------------------
   Tabela
   --------------------------------------------------------- */

#indexlist {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    border-collapse: separate;
    border-spacing: 0;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.04),
        0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---------------------------------------------------------
   Cabeçalho
   --------------------------------------------------------- */

#indexlist tr.indexhead {
    background: #f8fafc;
}

#indexlist th {
    padding: 14px 18px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    text-align: left;
}

#indexlist th a {
    color: var(--muted);
    text-decoration: none;
}

#indexlist th a:hover {
    color: var(--primary);
}

/* ---------------------------------------------------------
   Linhas
   --------------------------------------------------------- */

#indexlist td {
    padding: 14px 18px;

    border-bottom: 1px solid var(--border);

    vertical-align: middle;
}

#indexlist tr:last-child td {
    border-bottom: none;
}

#indexlist tr:not(.indexhead):hover {
    background: var(--row-hover);
}

/* ---------------------------------------------------------
   Nome dos arquivos
   --------------------------------------------------------- */

#indexlist td.indexcolname {
    font-weight: 500;
}

#indexlist td.indexcolname a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--text);

    text-decoration: none;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

#indexlist td.indexcolname a:hover {
    color: var(--primary);
}

/* ---------------------------------------------------------
   Ícones
   --------------------------------------------------------- */

#indexlist td.indexcolicon {
    width: 48px;

    text-align: center;
}

#indexlist td.indexcolicon img {
    width: 24px;
    height: 24px;

    object-fit: contain;
}

/* ---------------------------------------------------------
   Data
   --------------------------------------------------------- */

#indexlist td.indexcollastmod {
    width: 180px;

    color: var(--muted);

    font-size: 13px;
}

/* ---------------------------------------------------------
   Tamanho
   --------------------------------------------------------- */

#indexlist td.indexcolsize {
    width: 120px;

    color: var(--muted);

    font-size: 13px;

    text-align: right;
}

/* ---------------------------------------------------------
   Descrição
   --------------------------------------------------------- */

#indexlist td.indexcoldesc {
    color: var(--muted);

    font-size: 13px;
}

/* ---------------------------------------------------------
   Links
   --------------------------------------------------------- */

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

/* ---------------------------------------------------------
   Parent Directory
   --------------------------------------------------------- */

#indexlist tr:first-child td.indexcolname a {
    color: var(--muted);
    font-weight: 500;
}

/* ---------------------------------------------------------
   Responsivo
   --------------------------------------------------------- */

@media (max-width: 700px) {

    body {
        padding: 20px 10px;
    }

    body::before {
        font-size: 22px;
    }

    #indexlist th,
    #indexlist td {
        padding: 11px 10px;
    }

    #indexlist td.indexcollastmod {
        display: none;
    }

    #indexlist th.indexcollastmod {
        display: none;
    }

    #indexlist td.indexcoldesc,
    #indexlist th.indexcoldesc {
        display: none;
    }

    #indexlist td.indexcolsize {
        width: 80px;
    }
}
