:root {
    --navy: #06223d;
    --blue: #123f69;
    --teal: #0aa78d;
    --line: #dce7ee;
    --bg: #f4f9fb;
    --text: #102a43;
    --muted: #5d7184;
    --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, .button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius);
    background: var(--teal);
    color: #fff;
    cursor: pointer;
}
.dashboard-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--navy);
    color: #fff;
}
.dashboard-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 64px); }
.dashboard-sidebar { padding: 24px; display: flex; flex-direction: column; gap: 10px; background: #fff; border-right: 1px solid var(--line); }
.dashboard-sidebar a { padding: 12px; border-radius: var(--radius); color: var(--muted); }
.dashboard-sidebar a:hover { background: var(--bg); color: var(--navy); }
.dashboard-main { padding: 28px; }
.dashboard-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dashboard-title h1 { margin: 0; font-size: 26px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-grid article, .table-wrap, .form-grid, .login-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.metric-grid article { padding: 22px; display: grid; gap: 6px; }
.metric-grid strong { font-size: 34px; color: var(--navy); }
.metric-grid span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.actions button { background: var(--navy); }
.form-grid { max-width: 760px; padding: 22px; display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); }
input, select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
    color: var(--text);
    background: #fff;
}
.check { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.check input { width: 18px; min-height: 18px; }
.form-error { color: #b42318; margin: 0; }
.login-wrapper {
    min-height: 100vh;
    display: flex;
    background: #020C1B url('../img/fundo-gerenciar.avif') no-repeat center center / cover;
    font-family: 'Inter', Arial, sans-serif;
    padding: 24px;
}
.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    align-items: center;
    justify-content: space-between;
}
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 40px;
}
.login-left-content {
    max-width: 480px;
    color: #fff;
}
.login-logo {
    height: 72px;
    margin-bottom: 48px;
}
.login-left-content h1 {
    font-size: 42px;
    line-height: 1.2;
    margin: 0 0 24px;
    font-weight: 700;
}
.login-left-content h1 span {
    color: #00D5A1; /* Teal vibrant */
}
.login-left-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #A3B8CC;
    margin-bottom: 48px;
}
.login-features {
    display: flex;
    gap: 24px;
}
.login-feat {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.feat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 213, 161, 0.1);
    border: 1px solid rgba(0, 213, 161, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00D5A1;
    margin-bottom: 16px;
}
.login-feat strong {
    font-size: 14px;
    margin-bottom: 8px;
    color: #fff;
}
.login-feat span {
    font-size: 12px;
    color: #7992A8;
    line-height: 1.4;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}
.login-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-card-icon {
    width: 64px;
    height: 64px;
    background: #E6F8F3;
    color: #00B586;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.login-card h2 {
    font-size: 24px;
    color: #06223d;
    margin: 0 0 12px;
}
.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: #5d7184;
    margin: 0 0 32px;
    line-height: 1.4;
}
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #06223d;
    margin-bottom: 8px;
}
.phone-input {
    display: flex;
    align-items: center;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    overflow: hidden;
}
.country-code {
    background: #f4f9fb;
    padding: 0 14px;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    border-right: 1px solid #dce7ee;
    color: #06223d;
}
.country-code img {
    border-radius: 2px;
}
.phone-input input {
    border: none;
    height: 46px;
    border-radius: 0;
    padding-left: 14px;
    font-size: 15px;
}
.btn-primary {
    background: #00B586;
    color: #fff;
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.2s;
}
.btn-primary:hover {
    background: #009e74;
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.secure-badge {
    margin-top: 24px;
    background: #E8F7F4;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}
.secure-badge svg {
    color: #00B586;
    margin-top: 2px;
}
.secure-badge div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.secure-badge strong {
    font-size: 13px;
    color: #06223d;
}
.secure-badge span {
    font-size: 12px;
    color: #5d7184;
}
.help-section {
    margin-top: 32px;
    width: 100%;
    text-align: center;
    border-top: 1px solid #dce7ee;
    padding-top: 24px;
}
.help-section > span {
    font-size: 12px;
    color: #5d7184;
    display: block;
    margin-bottom: 16px;
}
.help-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.help-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #123f69;
    font-weight: 600;
}
.login-error {
    background: #FEE4E2;
    color: #B42318;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/* OTP CARD (Glassmorphism for Dark theme) */
.otp-card {
    background: rgba(6, 34, 61, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.otp-card .login-card-icon {
    background: transparent;
    border: 2px solid rgba(0, 213, 161, 0.3);
    color: #00D5A1;
}
.text-white { color: #fff !important; }
.text-white-muted { color: #A3B8CC !important; }
.text-teal { color: #00D5A1 !important; }
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}
.otp-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 0;
}
.otp-inputs input:focus {
    border-color: #00D5A1;
    outline: none;
    background: rgba(0, 213, 161, 0.05);
}
.btn-link {
    background: transparent;
    border: none;
    color: #00D5A1;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-link:disabled {
    color: #5d7184;
}
.outline-badge {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.outline-badge strong {
    color: #fff;
}
.outline-badge span {
    color: #A3B8CC;
}

@media (max-width: 1024px) {
    .login-wrapper {
        align-items: center; /* Center vertically */
        justify-content: center;
        background: #020C1B url('../img/fundo-gerenciar.avif') no-repeat right center; /* Puxa a imagem para a direita (onde está o DNA) */
        background-size: cover;
        position: relative;
        padding: 24px;
    }
    
    /* Darken overlay specifically for mobile */
    .login-wrapper::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(2, 13, 29, 0.75); /* Dark overlay to make form pop */
        z-index: 1;
    }

    .login-container { 
        flex-direction: column; 
        margin: auto; 
        width: 100%; 
        padding: 0; 
        z-index: 2; /* Bring above overlay */
        position: relative;
    }
    
    /* Hide left side completely on mobile (logo, text, features) */
    .login-left { display: none; }
    
    .login-right { padding: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }

    /* Transparent Form Container */
    .login-card {
        background: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
        box-shadow: none;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }
    .login-card-icon { display: none; }
    
    .login-card h2 { 
        color: #fff; 
        font-size: 24px; 
        font-weight: 600; 
        margin-bottom: 8px; 
        text-align: center;
    }
    .login-subtitle { 
        color: #fff; 
        font-size: 14px; 
        margin-bottom: 32px; 
        text-align: center;
        opacity: 0.9;
    }
    .login-form { gap: 16px; }
    .input-group label { 
        color: #fff; 
        font-size: 13px; 
        font-weight: 600;
        margin-bottom: 8px;
    }
    .phone-input {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        height: 50px;
    }
    .country-code {
        background: transparent;
        color: #fff;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        height: 100%;
        padding: 0 12px;
        font-size: 14px;
        font-weight: 600;
    }
    .country-code svg { color: #fff; opacity: 0.8; }
    .phone-input input {
        background: transparent;
        color: #fff;
        height: 100%;
        font-size: 15px;
        font-weight: 500;
        padding-left: 12px;
    }
    .phone-input input::placeholder { color: rgba(255, 255, 255, 0.5); }
    
    .btn-primary {
        height: 54px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        background: linear-gradient(90deg, #00B586, #00D5A1);
        margin-top: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        border: none;
    }
    .btn-primary .btn-text { flex: 1; text-align: center; }
    .btn-primary svg { width: 22px; height: 22px; }
    
    /* Desktop elements hiding */
    .desktop-element { display: none !important; }
    
    /* Mobile Top Glowing Icon */
    .mobile-element { display: flex !important; }
    .mobile-top-icon {
        width: 90px;
        height: 90px;
        margin: 0 auto 32px;
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: #00D5A1;
    }
    .glow-ring {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        border-radius: 50%;
        border: 1px solid rgba(0, 213, 161, 0.3);
        box-shadow: 0 0 40px rgba(0, 213, 161, 0.25), inset 0 0 20px rgba(0, 213, 161, 0.1);
        background: rgba(0, 213, 161, 0.05);
    }
    
    .mobile-secure-text {
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #B4C6D4;
        font-size: 13px;
        margin-top: 32px;
    }
    .mobile-secure-text svg { color: #00D5A1; width: 18px; height: 18px; }
}
