/* RESET */
* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    width: 100%;
}

/* =========================
   BASE (DESKTOP / TABLET)
========================= */
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #5b3fa3, #1d122e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Container central */
.container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* Card */
.card {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* Títulos */
.card h1 {
    margin: 0;
    font-size: 26px;
    text-align: center;
}

.subtitle {
    text-align: center;
    margin: 10px 0 30px;
    color: #d6cfff;
    font-size: 15px;
}

/* =========================
   FORM
========================= */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

label {
    font-size: 14px;
    color: #e6e0ff;
}

input,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    padding: 12px 14px;
    color: #fff;
    font-size: 16px;
}

input {
    height: 48px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input::placeholder {
    color: #cfc8ff;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #9b7cff;
    background: rgba(255,255,255,0.15);
}

input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =========================
   BUTTON
========================= */
button {
    margin-top: 10px;
    height: 52px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* =========================
   ERRO
========================= */
.error {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    color: #ffbaba;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

/* =========================
   TOPO DO CHAMADO
========================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.top-bar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Logout */
.logout {
    font-size: 13px;
    text-decoration: none;
    color: #ffbaba;
    border: 1px solid rgba(255, 80, 80, 0.4);
    padding: 6px 12px;
    border-radius: 10px;
    transition: background .2s ease;
}

.logout:hover {
    background: rgba(255, 80, 80, 0.15);
}

/* =========================
   TOAST
========================= */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all .4s ease;
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: rgba(34,197,94,.2);
    border: 1px solid rgba(34,197,94,.5);
    color: #bbf7d0;
}

.toast.error {
    background: rgba(239,68,68,.2);
    border: 1px solid rgba(239,68,68,.5);
    color: #fecaca;
}

/* =========================
   IMPLEMENTAÇÃO MOBILE (CENTRALIZADA)
========================= */
@media (max-width: 480px) {
    body {
        /* Mantém o flex e garante que o fundo cubra tudo */
        display: flex;
        align-items: center; 
        justify-content: center;
        padding: 20px; /* Margem de segurança para o card não tocar no topo/baixo */
        min-height: 100vh;
    }

    .container {
        padding: 0; /* Remove padding extra pois o body já tem */
        max-width: 100%;
    }

    .card {
        padding: 28px 20px;
        border-radius: 22px;
        /* Reduzimos a sombra para não pesar no processamento mobile */
        box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    }

    .card h1 {
        font-size: 22px;
    }

    /* Aumenta a área de clique dos inputs sem deformar o layout */
    input, textarea {
        font-size: 16px; /* Evita zoom no iPhone */
        padding: 14px;
    }

    /* Top bar mais compacta para economizar espaço vertical */
    .top-bar {
        margin-bottom: 20px;
    }

    .top-bar h2 {
        font-size: 16px;
    }

    /* Ajuste do Toast para mobile */
    .toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
        text-align: center;
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}