﻿/* =========================================================
   CENTRAL DO ADMINISTRADOR DE INSOLVÊNCIA
   Login / Registo do Candidato – alinhado ao Dashboard
========================================================= */

/* ---------------- TOKENS DE COR / BASE ---------------- */

:root {
    --bg-deep: #020617; /* fundo principal */
    --bg-soft: #0b1220; /* fundo de cartões/barras */
    --accent: #38bdf8; /* azul Edge */
    --accent-strong: #0ea5e9;
    --ink: #e5f0ff; /* texto principal */
    --muted: #94a3b8; /* texto secundário */
    --border-soft: rgba(148, 163, 184, 0.35);
    --radius-lg: 20px;
    --radius-card: 20px;
}

/* ---------------- GLOBAL ---------------- */

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 0% -20%, rgba(56, 189, 248, 0.12), transparent 55%), radial-gradient(circle at 100% 120%, rgba(56, 189, 248, 0.10), transparent 55%), radial-gradient(circle at 50% -10%, rgba(15, 23, 42, 0.9), var(--bg-deep));
    color: var(--ink);
}

/* Corrige cores do Bootstrap em modo escuro */
.text-muted {
    color: var(--muted) !important;
}

/* ---------------- HEADER FIXO ---------------- */

.edge-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2.5rem;
    background: linear-gradient(90deg, #0b1525, #050b16);
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.bank-logo {
    height: 32px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.project-name {
    color: #f9fafb;
    font-weight: 700;
}

.project-sub {
    color: #9fb4d9;
    font-weight: 500;
    margin-left: 0.15rem;
}

/* email no canto direito */
.edge-header .text-muted {
    color: #bac8e6 !important;
    font-size: 0.9rem;
}

/* Botão de tema (se existir) */
#themeToggle {
    padding-inline: 0.5rem;
    padding-block: 0.25rem;
    font-size: 0.8rem;
}

    #themeToggle i {
        font-size: 0.9rem;
    }

/* ---------------- WRAPPER GERAL (login/registo) ---------------- */

.form-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1.5rem 3.2rem;
}

/* =========================================================
   LOGIN
========================================================= */

.login-form.edge-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: var(--radius-card);
    padding: 2.2rem 2.4rem;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 55%), linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.94));
    border: 1px solid var(--border-soft);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.95), 0 0 0 1px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    color: var(--ink);
}
.register-form.edge-card {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    border-radius: var(--radius-card);
    padding: 2.2rem 2.4rem;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 55%), linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.94));
    border: 1px solid var(--border-soft);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.95), 0 0 0 1px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    color: var(--ink);
}
/* HEADER do formulário */

.login-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.login-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0f7ff;
    font-size: 1.4rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.login-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.login-subtitle {
    font-size: .86rem;
    color: rgba(220, 235, 255, 0.85);
}

/* INPUTS (login + registo) */

.form-control {
    background: rgba(3, 31, 48, 0.9);
    border-radius: .75rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #ffffff;
    padding: .55rem .75rem;
}

    .form-control::placeholder {
        color: rgba(190, 210, 230, 0.7);
    }

    .form-control:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 .1rem rgba(56, 189, 248, 0.35);
    }

/* BOTÃO LOGIN */

.btn-login {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border: none;
    color: #020617;
    font-weight: 600;
    width: 100%;
    border-radius: .9rem;
    padding: .6rem;
    margin-top: .5rem;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.45);
    transition: transform .12s ease-out, box-shadow .12s ease-out, filter .12s ease-out;
}

    .btn-login:hover {
        filter: brightness(1.05);
        box-shadow: 0 18px 45px rgba(56, 189, 248, 0.55);
        transform: translateY(-1px);
    }

/* LINKS LOGIN */

.link-group {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: .88rem;
}

    .link-group a {
        color: #dceaff;
        text-decoration: none;
    }

        .link-group a:hover {
            text-decoration: underline;
        }
         



/* Cabeçalho do formulário */

.form-header {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin-bottom: 1.8rem;
}

.form-icon {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0f7ff;
    font-size: 1.6rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.form-title {
    font-size: 1.55rem;
    font-weight: 600;
}

.hint {
    font-size: .9rem;
    color: rgba(220, 235, 255, 0.85);
}

/* Secções */

.section-title {
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #ced4da;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.section-icon {
    font-size: .9rem;
    color: #38bdf8;
}

.section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 1rem;
}

/* Avatar preview / foto */

.avatar-preview {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.12), rgba(3, 31, 48, 0.85));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    position: relative;
    text-indent: -9999px; /* garante que texto nunca aparece */
}

    .avatar-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* placeholder quando não há imagem */
    .avatar-preview.empty {
        background: radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.15), rgba(3, 31, 48, 0.7));
    }

        .avatar-preview.empty::before {
            content: "\f03e"; /* ícone imagem FA */
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            font-size: 32px;
            color: rgba(255, 255, 255, 0.55);
            text-indent: 0;
            position: absolute;
        }

/* Botão escolher foto */

.btn-escolher-foto {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #fff;
}

    .btn-escolher-foto i {
        opacity: 0.9;
    }

/* Dropzone de documentos */

.docs-dropzone {
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    text-align: center;
    cursor: pointer;
    transition: all .18s ease;
    color: #e6f3ff !important;
}

    .docs-dropzone i.fa-file-upload {
        color: #38bdf8;
        font-size: 1.7rem;
        margin-bottom: .4rem;
    }

    .docs-dropzone p.mb-1 {
        color: rgba(230, 243, 255, 0.95);
        font-size: 0.95rem;
    }

    .docs-dropzone .small.text-muted {
        color: rgba(203, 219, 235, 0.85) !important;
        font-size: 0.82rem;
    }

    /* hover / drag-over (ex: classe JS .border-primary) */
    .docs-dropzone:hover,
    .docs-dropzone.border-primary {
        border-color: #38bdf8 !important;
        background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), rgba(3, 31, 48, 0.9));
    }

    /* botão “Selecionar ficheiros” */

    .docs-dropzone .btn,
    .btn-docs {
        border-radius: 999px;
        padding: 5px 16px;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        font-size: 0.86rem;
        color: #fff !important;
    }

        .docs-dropzone .btn i,
        .btn-docs i {
            color: #38bdf8;
        }

/* lista de ficheiros */

#docsList li {
    color: rgba(230, 243, 255, 0.92) !important;
    margin-bottom: 2px;
}

.docs-help {
    font-size: .82rem;
    opacity: .75 !important;
}

/* Botão principal SUBMIT do registo */

.btn-submit {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
    border: none;
    border-radius: .9rem;
    font-weight: 600;
    width: 100%;
    padding: .6rem;
    margin-top: .5rem;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.45);
    transition: transform .12s ease-out, box-shadow .12s ease-out, filter .12s ease-out;
}

    .btn-submit:hover {
        filter: brightness(1.05);
        box-shadow: 0 18px 45px rgba(56, 189, 248, 0.55);
        transform: translateY(-1px);
    }

/* Link “Voltar ao login” */

.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: .9rem;
    color: #dceaff;
    text-decoration: none;
}

    .back-link:hover {
        text-decoration: underline;
    }

/* ---------------- Responsivo ---------------- */

@media (max-width: 991.98px) {
    .register-form.edge-card {
        padding: 2rem 1.8rem;
    }
}

@media (max-width: 575.98px) {
    .register-form.edge-card {
        padding: 1.7rem 1.3rem;
    }
}

/* =========================================================
   LIGHT MODE – versão clara elegante (body.light-mode)
========================================================= */

body.light-mode {
    background: radial-gradient(circle at 0% -20%, rgba(59, 130, 246, 0.08), transparent 55%), radial-gradient(circle at 100% 120%, rgba(56, 189, 248, 0.10), transparent 55%), #f3f4f6;
    color: #111827;
}

    /* Texto secundário em light mode */
    body.light-mode .text-muted {
        color: #6b7280 !important;
    }

    /* HEADER em modo claro */
    body.light-mode .edge-header {
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    }

    body.light-mode .header-title {
        color: #111827;
    }

    body.light-mode .project-name {
        color: #0f172a;
    }

    body.light-mode .project-sub {
        color: #4b5563;
    }

    body.light-mode .edge-header .text-muted {
        color: #6b7280 !important;
    }

    /* LOGIN em modo claro */

    body.light-mode .login-form.edge-card {
        background: #ffffff;
        color: #111827;
        border: 1px solid #e5e7eb;
        box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    }

    body.light-mode .login-icon {
        background: rgba(59, 130, 246, 0.12);
        color: #1d4ed8;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    }

    body.light-mode .form-control {
        background: #ffffff;
        border-color: #d1d5db;
        color: #111827;
    }

        body.light-mode .form-control::placeholder {
            color: #9ca3af;
        }

    /* REGISTO em modo claro */

    body.light-mode .register-form.edge-card {
        background: linear-gradient(145deg, #ffffff, #f9fafb);
        color: #111827;
        border: 1px solid #e5e7eb;
        box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
    }

    body.light-mode .form-icon {
        background: rgba(59, 130, 246, 0.12);
        color: #1d4ed8;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    }

    body.light-mode .section-title {
        color: #6b7280;
    }

    /* Avatar / foto light */

    body.light-mode .avatar-preview {
        border-color: rgba(148, 163, 184, 0.5);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    }

    /* Dropzone light */

    body.light-mode .docs-dropzone {
        border-color: #cbd5f5;
        background: #f9fafb;
        color: #1f2933 !important;
    }

        body.light-mode .docs-dropzone:hover,
        body.light-mode .docs-dropzone.border-primary {
            border-color: #38bdf8 !important;
            background: #eef2ff;
        }

        body.light-mode .docs-dropzone p.mb-1 {
            color: #1f2933;
        }

        body.light-mode .docs-dropzone .small.text-muted {
            color: #6b7280 !important;
        }

    body.light-mode #docsList li {
        color: #374151 !important;
    }

    /* Botões em light mode */

    body.light-mode .btn-login,
    body.light-mode .btn-submit {
        background: linear-gradient(135deg, #0ea5e9, #0284c7);
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    }

        body.light-mode .btn-login:hover,
        body.light-mode .btn-submit:hover {
            filter: brightness(1.03);
            box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45);
            color: #ffffff;
        }

    body.light-mode .btn-escolher-foto,
    body.light-mode .btn-docs {
        border-color: #cbd5f5 !important;
        color: #1f2933 !important;
    }

    body.light-mode .back-link {
        color: #2563eb;
    }

        body.light-mode .back-link:hover {
            text-decoration: underline;
        }
