* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #f0f2f5;
  color: #333;
}

.ecran {
  min-height: 100vh;
}

/* AUTH */
.auth-box {
  max-width: 400px;
  margin: 60px auto;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-align: center;
}

.auth-box h1 {
  color: #1a73e8;
  margin-bottom: 8px;
}

.subtitle {
  color: #888;
  margin-bottom: 24px;
}

input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}

input:focus {
  border-color: #1a73e8;
}

button {
  width: 100%;
  padding: 12px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 12px;
}

button:hover {
  background: #1558b0;
}

.switch {
  color: #888;
  font-size: 14px;
}

.switch a {
  color: #1a73e8;
  cursor: pointer;
  text-decoration: underline;
}

.message {
  margin-top: 8px;
  font-size: 14px;
  color: red;
}

/* HEADER */
header {
  background: #1a73e8;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h2 {
  font-size: 18px;
}

header span {
  font-size: 13px;
  opacity: 0.8;
}

.btn-logout {
  width: auto;
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 14px;
  margin: 0;
}

/* RESUME */
.resume {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.carte {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.carte p {
  font-size: 12px;
  margin-bottom: 6px;
  opacity: 0.8;
}

.carte h3 {
  font-size: 16px;
  font-weight: 600;
}

.carte-vente {
  background: #e8f5e9;
  color: #2e7d32;
}

.carte-depense {
  background: #fce4ec;
  color: #c62828;
}

.carte-benefice {
  background: #e3f2fd;
  color: #1565c0;
}

/* FORMULAIRE */
.formulaire {
  background: white;
  margin: 0 16px 16px;
  padding: 20px;
  border-radius: 12px;
}

.formulaire h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.type-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.type-buttons button {
  flex: 1;
  background: #f0f2f5;
  color: #333;
  margin: 0;
}

.type-buttons button.actif {
  background: #1a73e8;
  color: white;
}

.btn-ajouter {
  background: #2e7d32;
  margin-top: 4px;
}

.btn-ajouter:hover {
  background: #1b5e20;
}

/* LISTE */
.liste {
  background: white;
  margin: 0 16px 16px;
  padding: 20px;
  border-radius: 12px;
}

.liste h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info p {
  font-size: 14px;
  font-weight: 500;
}

.transaction-info span {
  font-size: 12px;
  color: #888;
}

.transaction-montant {
  font-weight: 600;
  font-size: 15px;
}

.vente { color: #2e7d32; }
.depense { color: #c62828; }

.btn-supprimer {
  width: auto;
  padding: 4px 10px;
  background: #fce4ec;
  color: #c62828;
  font-size: 12px;
  margin: 0 0 0 8px;
  border-radius: 6px;
}
/* FILTRES */
.filtres {
  display: flex;
  gap: 8px;
  padding: 16px 16px 0;
}

.filtres button {
  flex: 1;
  padding: 10px;
  background: #f0f2f5;
  color: #333;
  border-radius: 8px;
  font-size: 13px;
  margin: 0;
}

.filtres button.actif {
  background: #1a73e8;
  color: white;
}