/* ==============================
   Finance Conectar — Estilo Base
   ============================== */

/* ==== Reset e padrões ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background: #0f172a;
    color: #f8fafc;
    overflow-x: hidden;
}

/* ==== Links e botões ==== */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    text-decoration: underline;
}

button, .btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    background: #1d4ed8;
}

/* ==== Estrutura principal (auth, login, cadastro) ==== */
.auth-wrapper {
    display: flex;
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 900px;
    max-width: 95%;
    margin: 5vh auto;
    min-height: 500px;
}

.auth-side {
    flex: 1;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
    text-align: center;
}

.auth-side h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-side p {
    opacity: 0.9;
}

.auth-form {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0f172a;
}

/* ==== Formulários ==== */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

form h2 {
    text-align: center;
    margin-bottom: 10px;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #2563eb;
    background: #111827;
}

.switch-link {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ==== Dashboard ==== */
.dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.dashboard-header .user-info {
    font-size: 0.95rem;
    opacity: 0.9;
}

.card {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th, .table td {
    border-bottom: 1px solid #334155;
    padding: 12px 10px;
    text-align: left;
}

.table th {
    background: #1e3a8a;
    color: white;
}

.table tr:hover {
    background: rgba(37,99,235,0.08);
}

/* ==== Feedbacks e mensagens ==== */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
}

.alert-success {
    background: #065f46;
    color: #d1fae5;
}

.alert-error {
    background: #7f1d1d;
    color: #fee2e2;
}

/* ==== Utilidades ==== */
.text-center { text-align: center; }
.hidden { display: none; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* ==== Responsividade ==== */
@media (max-width: 900px) {
    .auth-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        border-radius: 12px;
    }

    .auth-side {
        display: none; /* Oculta a parte lateral no mobile */
    }

    .auth-form {
        padding: 30px 20px;
        background: #111827;
    }

    form h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .dashboard {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .card {
        padding: 15px;
    }

    input, button {
        font-size: 0.95rem;
        padding: 10px;
    }
}



/* ---------- DASHBOARD LAYOUT ---------- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-toggle {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}
.btn-toggle:hover {
  background: #2563eb;
}

/* cards-container com layout adaptativo */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

/* estilo base dos cards */
.card {
  background: var(--card-bg, #fff);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background .3s, color .3s, transform .2s;
}
.card:hover { transform: translateY(-2px); }

.card h3 {
  font-size: 1rem;
  color: var(--text-muted, #666);
  margin-bottom: 10px;
}

.card .valor {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-color, #111);
}

/* ---------- MODO ESCURO ---------- */
body.dark {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #334155;
  background: var(--bg);
  color: var(--text-color);
}

body.dark .card {
  box-shadow: 0 2px 5px rgba(255,255,255,0.05);
}

body.dark .btn-toggle {
  background: var(--accent);
  color: #e2e8f0;
}
