* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

body {
    min-height: 100vh;
    font-family: 'Poppins', 'Trebuchet MS', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 20px;
    color: #1f2937;
    background: #f5f5f5;
}

#topo {
    width: 100%;
    height: 50px;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(to right, #c0392b 47%, #7a4951 73%, #114455 87%);
    display: flex;
    align-items: center;
    z-index: 100;
}

#textotop {
    padding-left: 20px;
    font-size: clamp(22px, 5vw, 30px);
    color: #fff;
    font-weight: 500;
}

.theme-toggle-btn {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent; 
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: all 0.4s ease;
    padding: 8px;
}

.theme-toggle-btn:hover {
    background: #114455; 
    transform: translateY(-50%) rotate(180deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-icon {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1); 
    object-fit: contain;
}

#log {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #ffffff;
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
}

.mens {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f2937;
}

.campo { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    margin-bottom: 5px; 
}

label { 
    font-weight: 600; 
    color: #1F2937; 
    font-size: 14px;
    margin-bottom: 2px; 
}

input[type="email"],
input[type="password"] {
    height: 48px;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    background-color: #f9fafb;
    outline: none;
    color: #1f2937;
}

input[type="email"]:hover,
input[type="password"]:hover {
    border-color: #c0392b;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #c0392b;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

#logbtn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    background-color: #c0392b;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    outline: none;
}

#logbtn:hover {
    background-color: #114455;
    box-shadow: 0 5px 15px rgba(17, 68, 85, 0.4);
}

#logbtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

a {
    color: #c0392b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

a:hover {
    color: #114455;
    text-decoration: underline;
}

#mensagem-erro {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

#mensagem-sucesso {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

[data-theme="dark"] body {
    background: #121212;
    color: #e8e8e8;
}

[data-theme="dark"] #log {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mens {
    color: #e8e8e8;
}

[data-theme="dark"] label {
    color: #e8e8e8;
}

[data-theme="dark"] input,
[data-theme="dark"] select {
    background: #1a1a1a;
    border-color: #333;
    color: #e8e8e8;
}

[data-theme="dark"] #mensagem-erro {
    background: rgba(254, 226, 226, 0.1);
    border-color: rgba(252, 165, 165, 0.2);
    color: #fca5a5;
}

[data-theme="dark"] #mensagem-sucesso {
    background: rgba(209, 250, 229, 0.1);
    border-color: rgba(110, 231, 183, 0.2);
    color: #6ee7b7;
}

[data-theme="dark"] a {
    color: #e8e8e8;
}

[data-theme="dark"] a:hover {
    color: #3498db;
}

[data-theme="dark"] .theme-toggle-btn {
    background: transparent;
    border: none;
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: #3498db;
}