/* ============================================================
   Área de Downloads — Frontend CSS
   ============================================================ */

/* ---- Login ---- */
.adl-login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.adl-login-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.adl-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px 0;
    text-align: center;
}

.adl-login-subtitle {
    font-size: 14px;
    color: #777;
    text-align: center;
    margin: 0 0 24px 0;
}

.adl-error {
    background: #fff0f0;
    border-left: 4px solid #d32f2f;
    color: #d32f2f;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}

.adl-login-form .adl-field {
    margin-bottom: 18px;
}

.adl-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.adl-login-form input[type="text"],
.adl-login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.adl-login-form input:focus {
    border-color: #008986;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 137, 134, 0.12);
}

.adl-login-btn {
    width: 100%;
    padding: 12px;
    background: #008986;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.adl-login-btn:hover {
    background: #006e6b;
}

/* ---- Header usuário logado ---- */
.adl-header {
    width: 100%;
    padding: 14px 20px;
    background: #f0fafa;
    border-bottom: 2px solid #008986;
    margin-bottom: 0;
    box-sizing: border-box;
}

.adl-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.adl-welcome {
    margin: 0;
    font-size: 15px;
    color: #333;
}

.adl-logout {
    font-size: 13px;
    color: #008986;
    text-decoration: none;
    border: 1px solid #008986;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.adl-logout:hover {
    background: #008986;
    color: #fff;
}

/* ---- Lista de downloads ---- */
.adl-downloads {
    width: 100%;
    margin: 0;
    padding: 0;
}

.adl-section {
    width: 100%;
    padding: 40px 20px;
    margin: 0;
    box-sizing: border-box;
}

.adl-section-white {
    background-color: #ffffff !important;
}

.adl-section-gray {
    background-color: #f7f7f7 !important;
}

.adl-downloads .adl-section:nth-child(odd) {
    background-color: #ffffff !important;
}

.adl-downloads .adl-section:nth-child(even) {
    background-color: #f7f7f7 !important;
}

.adl-section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.adl-category-title {
    font-size: 28px;
    font-weight: 700;
    color: #008986;
    margin: 0 0 24px 0;
    font-family: Arial, sans-serif;
    border-bottom: 2px solid rgba(0, 137, 134, 0.15);
    padding-bottom: 10px;
}

/* ---- Item de arquivo ---- */
.adl-item {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(0, 137, 134, 0.1);
    transition: all 0.2s ease;
}

.adl-item:last-child {
    border-bottom: none;
}

.adl-item:hover {
    transform: translateX(5px);
    background: rgba(0, 137, 134, 0.05);
    padding-left: 14px;
    border-radius: 4px;
    margin-left: -6px;
}

.adl-link-full {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.adl-link-full:hover {
    text-decoration: none;
}

/* Badge de extensão */
.adl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 36px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 16px;
    flex-shrink: 0;
    background: #777;
    color: #fff;
    padding: 0 6px;
}

/* Cores por extensão */
.adl-icon-pdf  { background: #e53935; }
.adl-icon-doc,
.adl-icon-docx { background: #1565c0; }
.adl-icon-xls,
.adl-icon-xlsx { background: #2e7d32; }
.adl-icon-ppt,
.adl-icon-pptx { background: #e65100; }
.adl-icon-zip,
.adl-icon-rar  { background: #6a1b9a; }
.adl-icon-jpg,
.adl-icon-jpeg,
.adl-icon-png  { background: #00838f; }
.adl-icon-mp4,
.adl-icon-avi,
.adl-icon-mov  { background: #37474f; }
.adl-icon-txt  { background: #546e7a; }

/* Info do item */
.adl-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.adl-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #008986;
    line-height: 1.3;
}

.adl-link-full:hover .adl-item-title {
    text-decoration: underline;
    color: #005e5b;
}

.adl-item-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Ícone de download */
.adl-download-icon {
    font-size: 20px;
    color: #008986;
    margin-left: 12px;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.adl-link-full:hover .adl-download-icon {
    opacity: 1;
}

/* ---- Ações do header ---- */
.adl-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adl-toggle-pwd {
    font-size: 13px;
    color: #008986;
    background: transparent;
    border: 1px solid #008986;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
    margin: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.adl-toggle-pwd:hover {
    background: #008986;
    color: #fff;
}

/* ---- Formulário de troca de senha ---- */
.adl-pwd-wrap {
    width: 100%;
    background: #f0fafa;
    border-bottom: 2px solid rgba(0, 137, 134, 0.2);
    padding: 24px 20px;
    box-sizing: border-box;
}

.adl-pwd-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.adl-pwd-title {
    font-size: 17px;
    font-weight: 700;
    color: #008986;
    margin: 0 0 16px 0;
}

.adl-pwd-success {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    color: #2e7d32;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-size: 14px;
}

.adl-pwd-error {
    background: #fff0f0;
    border-left: 4px solid #d32f2f;
    color: #d32f2f;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-size: 14px;
}

.adl-pwd-fields {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.adl-pwd-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.adl-pwd-field label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.adl-pwd-field input[type="password"] {
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.adl-pwd-field input[type="password"]:focus {
    border-color: #008986;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 137, 134, 0.1);
}

.adl-pwd-btn {
    padding: 9px 24px;
    background: #008986;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.adl-pwd-btn:hover {
    background: #006e6b;
}

/* Vazio */
.adl-empty {
    padding: 40px 20px;
    text-align: center;
    color: #777;
    font-size: 15px;
}

/* ---- Responsivo ---- */
@media (max-width: 768px) {
    .adl-login-box {
        padding: 28px 20px;
    }

    .adl-section {
        padding: 28px 15px;
    }

    .adl-category-title {
        font-size: 22px;
    }

    .adl-item:hover {
        transform: none;
        margin-left: 0;
    }

    .adl-item-title {
        font-size: 14px;
    }

    .adl-pwd-fields {
        flex-direction: column;
        gap: 12px;
    }

    .adl-pwd-field {
        min-width: unset;
    }

    .adl-header-actions {
        gap: 8px;
    }

    .adl-toggle-pwd {
        font-size: 12px;
        padding: 4px 8px;
    }
}
