/* =======================
   RESET
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* =======================
   LAYOUT
======================= */
.layout {
  display: flex;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 30px;
  background: #f1f5f9;
}

/* =======================
   SIDEBAR
======================= */
.sidebar {
  width: 80px;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  color: white;
  transition: width 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar:hover {
  width: 240px;
}

/* Topo */
.sidebar-top {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 1px solid #1e293b;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container svg {
  width: 24px;
  height: 24px;
  color: #22c55e;
}

.logo-text {
  display: none;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar:hover .logo-text {
  display: inline;
}

/* =======================
   MENU
======================= */
.menu {
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.menu a svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

/* Texto escondido quando recolhido */
.text {
  display: none;
  white-space: nowrap;
}

/* Mostra texto quando expandido */
.sidebar:hover .text {
  display: inline;
}

/* Centraliza ícones quando recolhido */
.sidebar:not(:hover) .menu a {
  justify-content: center;
}

/* Hover */
.menu a:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

/* Active */
.menu a.active {
  background: #22c55e;
  color: white;
}

/* =======================
   TOPO / TITULOS
======================= */
.topbar {
  margin-bottom: 20px;
}

.topbar h1 {
  font-size: 24px;
  color: #1e293b;
}

/* =======================
   DASHBOARD CARDS
======================= */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.metric-card p {
  color: #64748b;
  margin-bottom: 5px;
}

.metric-card h2 {
  font-size: 22px;
}

/* =======================
   CARDS GERAIS
======================= */
.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* =======================
   BOTÕES
======================= */
button {
  padding: 8px 14px;
  border: none;
  background: #22c55e;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

/* =======================
   FORM GERAL
======================= */
.form {
    display: flex;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 20px;
    flex-direction: column;
}

.hidden {
  display: none;
}

input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.erro {
  color: red;
  font-size: 12px;
}

/* =======================
   TRANSFERÊNCIA
======================= */
.transfer-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
}

.transfer-form label {
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
  color: #475569;
}

.transfer-form select,
.transfer-form input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.mensagem {
  margin-top: 10px;
  font-size: 14px;
}

.transfer-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.transfer-card {
  background: #ffffff;
  width: 100%;
  max-width: 460px;
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.transfer-header {
  margin-bottom: 25px;
}

.transfer-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.transfer-header p {
  font-size: 14px;
  color: #6b7280;
}

.transfer-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.form-group select,
.form-group input {
  padding: 11px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: 0.2s ease;
  background-color: #f9fafb;
}

.form-group select:focus,
.form-group input:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  background-color: #2563eb;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.feedback {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.feedback.sucesso {
  color: #16a34a;
}

.feedback.erro {
  color: #dc2626;
}

.saldo-box {
  margin-top: 8px;
  padding: 8px 10px;
  background-color: #f1f5f9;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1e40af;
}
/* =====================
   TABELA MODERNA
===================== */

.table-wrapper {
  max-height: 350px;
  overflow-y: auto;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Scroll bonito */
.table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.modern-table thead {
  background: #f8fafc;
}

.modern-table th {
  text-align: left;
  padding: 16px;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

.modern-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.modern-table tbody tr {
  transition: background 0.2s ease;
}

.modern-table tbody tr:hover {
  background: #f9fafb;
}

.account-number {
  font-weight: 600;
  color: #1e293b;
}

.saldo-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.saldo-badge.positivo {
  background: #dcfce7;
  color: #16a34a;
}

.saldo-badge.negativo {
  background: #fee2e2;
  color: #dc2626;
}

.empty {
  padding: 20px;
  color: #64748b;
}

.paginacao {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
}

.paginacao button {
  background: #e2e8f0;
  color: #1e293b;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.paginacao button:hover {
  background: #cbd5e1;
}

/* =======================
   Tabela Botões
======================= */

.btn-delete {
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background-color: #ef4444;
  color: white;
  cursor: pointer;
}

.btn-delete:hover {
  background-color: #dc2626;
}

.btn-depositar {
  background-color: #22c55e;
  border: none;
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-sacar {
  background-color: #f59e0b;
  border: none;
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.acoes {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* =======================
   Ajustes Form
======================= */

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.form-row input {
  flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: start;
    align-items: center;
}

.btn-primary {
  background-color: #22c55e;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.btn-secondary {
  background-color: #e5e7eb;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
}

/* =======================
   Ajustes Tabela
======================= */

.modern-table th,
.modern-table td {
  padding: 12px 16px;
  text-align: left;
}

.modern-table th:nth-child(2),
.modern-table td:nth-child(2) {
  text-align: center;
  width: 150px;
}

.modern-table th:last-child,
.modern-table td:last-child {
  text-align: center;
}

.modern-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.modern-table tbody tr:hover {
  background-color: #f9fafb;
}

/* =======================
   Loading
======================= */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: #cbd5e1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}