@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Fundo sutil igual ao canvas da aplicação */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* Card central */
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(59, 130, 246, 0.15);
    padding: 48px 40px 40px;
    position: relative;
    z-index: 1;
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14),
                0 8px 20px rgba(59, 130, 246, 0.25);
}

/* Logo */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    text-align: center;
}

.logo-svg {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.2));
}

.app-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    margin-top: 12px;
    letter-spacing: -0.02em;
}

.version {
    font-size: 11px;
    font-weight: 700;
    background: #3b82f6;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}

/* Formulário */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.login-card input {
    width: 100%;
    font-size: 16px;
    font-family: inherit;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.2s;
    color: #1e293b;
}

.login-card input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.login-card input::placeholder {
    color: #94a3b8;
}

/* Botão Entrar */
.btn-login {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-login:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Link "Esqueci minha senha" */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.forgot-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Barra superior */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.top-bar .title {
    color: #93c5fd;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* Toast */
#toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

/* Responsivo */
@media (max-width: 480px) {
    .login-card {
        margin: 20px;
        padding: 36px 28px;
    }
    .logo-svg {
        width: 190px;
    }
}

/* Dark Mode */
body.dark-mode { background: #0f172a; color: #f8fafc; }
body.dark-mode::before { background-image: radial-gradient(circle, #334155 1px, transparent 1px); }
body.dark-mode .login-card { background: #1e293b; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
body.dark-mode .app-title { color: #f8fafc; }
body.dark-mode .top-bar .title { color: #f8fafc; }
body.dark-mode .login-card input { background: #0f172a; border-color: #475569; color: #f8fafc; }
body.dark-mode .login-card input:focus { border-color: #3b82f6; background: #1e293b; }
body.dark-mode .top-bar { background: #0b1120; border-bottom: 1px solid #1e293b; }
body.dark-mode .form-group label { color: #94a3b8; }

/* ══ RESPONSIVIDADE MOBILE (login) ══ */
@media (max-width: 480px) {
  body { align-items: flex-start; padding-top: 72px; overflow-y: auto; }

  .login-card {
    margin: 0 16px 32px;
    padding: 32px 22px;
    border-radius: 14px;
  }

  .app-title { font-size: 26px !important; }

  .login-card input {
    font-size: 16px;   /* evita zoom automático no iOS */
    padding: 13px 14px;
  }

  .btn-login { padding: 14px; font-size: 15px; }

  .top-bar { height: 48px; padding: 0 16px; }
  .top-bar .title { font-size: 13px; }
}

@media (max-width: 360px) {
  .login-card { padding: 28px 16px; }
}
