body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #fafaff;
  color: #222;
  margin: 0;
  padding: 0;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.app-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #6c63ff;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #fff;
  padding: 0.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 0.5rem;
}
.main-nav a {
  color: #6c63ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a.active, .main-nav a:focus, .main-nav a:hover {
  background: #f3e6ff;
  color: #7c3aed;
}
.main-nav-user {
  color: #222;
  font-size: 1rem;
  margin-left: 1.5rem;
  margin-right: 0.5rem;
}
.user-menu {
  display: flex;
  gap: 1rem;
}
.user-menu a {
  color: #222;
  text-decoration: none;
  font-size: 1rem;
}
.user-menu a:hover {
  color: #6c63ff;
}
.main-content {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  min-height: 70vh;
}
.main-footer {
  text-align: center;
  padding: 1rem 0;
  background: #f5f6fa;
  color: #888;
  font-size: 0.95rem;
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
}
button, .btn {
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover, .btn:hover {
  background: #4834d4;
}
input, select, textarea {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

header {
  background: #fff;
  color: #4b2996;
  padding: 1.2rem 1rem 0.5rem 1rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(75,41,150,0.04);
}
header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
header h1::before {
  content: '\1F4E6';
  font-size: 1.5rem;
}
header small {
  color: #888;
}
nav.main-nav {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  background: #fff;
  border-bottom: 2px solid #d1aaff;
  padding: 0.5rem 1rem 0 1rem;
  margin-bottom: 1.5rem;
}
nav.main-nav a {
  color: #4b2996;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem 0.3rem 1rem;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s, color 0.2s;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
nav.main-nav a.active, nav.main-nav a:focus, nav.main-nav a:hover {
  background: #f3e6ff;
  color: #7c3aed;
  border-bottom: 2px solid #7c3aed;
}
main {
  padding: 1rem;
  max-width: 700px;
  margin: auto;
}
section {
  margin-bottom: 2rem;
}
.stat {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(124,58,237,0.07);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
  border-left: 5px solid #7c3aed;
}
.stat label {
  font-size: 0.95rem;
  color: #888;
  margin-left: 1rem;
}
.stat span {
  font-weight: bold;
  font-size: 1.4rem;
}
.stat:nth-child(1) span { color: #16a34a; }
.stat:nth-child(2) span { color: #2563eb; }
.stat:nth-child(3) span { color: #ea580c; }
.stat:nth-child(1) { border-left-color: #16a34a; }
.stat:nth-child(2) { border-left-color: #2563eb; }
.stat:nth-child(3) { border-left-color: #ea580c; }
.stat::after {
  content: attr(data-icon);
  font-size: 1.5rem;
  margin-left: auto;
  color: #d1aaff;
}
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(124,58,237,0.07);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
}
form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(124,58,237,0.04);
  padding: 1rem;
  margin-bottom: 2rem;
}
form input, form select, form textarea, form button {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border: 1px solid #d1aaff;
  border-radius: 6px;
  font-size: 1rem;
  background: #f8f6ff;
}
form button {
  background: linear-gradient(90deg, #a78bfa 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 6px;
}
form button:hover {
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
}
section ul {
  list-style: none;
  padding: 0;
}
section ul li {
  background: #fff;
  margin-bottom: 0.7rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(124,58,237,0.03);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
}
footer {
  text-align: center;
  color: #888;
  padding: 1rem 0;
  font-size: 0.9rem;
}
@media (max-width: 700px) {
  .main-content, main {
    margin-top: 0 !important;
    padding-top: 0.5rem !important;
  }
  .stat, .card, form {
    padding: 1rem 0.7rem;
  }
  nav.main-nav {
    gap: 0.5rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
  }
  .main-nav-userblock {
    flex-direction: row;
    gap: 0.3rem;
    align-items: center;
    margin-left: auto;
    padding-right: 0.5rem;
  }
  .main-nav-logout {
    font-size: 1.3rem;
    padding: 0.2rem;
  }
  .main-nav-logout span {
    display: none;
  }
  .main-nav-user {
    order: 2;
    margin-left: 0.3rem;
    font-size: 1rem;
  }
  .main-nav a {
    flex: 0 1 auto;
    min-width: unset;
    max-width: unset;
    text-align: center;
    font-size: 1.01rem;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    margin: 0.1rem 0.1rem;
    white-space: normal;
  }
  .main-nav-wrapper {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 24px rgba(124,58,237,0.13);
    background: #fff;
    margin: 1.2rem 0 0 0;
    padding: 0 2px;
    position: relative;
    z-index: 1;
  }
  .main-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.05rem !important;
    padding: 0.15rem 0 0.1rem 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }
  .main-nav a {
    min-width: 0 !important;
    font-size: 0.97rem !important;
    padding: 0.5rem 0.2rem !important;
    margin: 0.05rem 0.08rem !important;
    border-radius: 8px !important;
    text-align: center !important;
    white-space: normal !important;
  }
}
@media (max-width: 500px) {
  header h1 {
    font-size: 1.1rem;
  }
  nav.main-nav a {
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem 0.2rem 0.5rem;
  }
  .stat label {
    font-size: 0.8rem;
  }
}

/* Notification toast */
.notif-toast {
  position: fixed;
  top: 30px;
  right: 30px;
  background: #16a34a;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  opacity: 0.98;
  font-size: 1.1rem;
  animation: fadeInNotif 0.3s;
}
.notif-toast.error { background: #ea580c; }
@keyframes fadeInNotif {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 0.98; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.page-header h1 {
  margin: 0;
  font-size: 2rem;
  color: #4b2996;
  font-weight: 700;
}
.page-header .btn {
  font-size: 1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  background: linear-gradient(90deg, #a78bfa 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(124,58,237,0.07);
  transition: background 0.2s;
}
.page-header .btn:hover {
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.search-bar input[type="text"] {
  flex: 1;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #d1aaff;
  font-size: 1rem;
  background: #f8f6ff;
}

.menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .main-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    padding: 0.5rem 0.2rem 0.2rem 0.2rem;
    gap: 0;
  }
  .main-logo {
    position: absolute;
    left: 50%;
    top: 0.2rem;
    transform: translateX(-50%);
    z-index: 2;
    margin: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  .main-nav-userblock {
    position: absolute;
    right: 0.7rem;
    top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    z-index: 3;
  }
  .main-nav-wrapper {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 24px rgba(124,58,237,0.13);
    background: #fff;
    margin: 1.2rem 0 0 0;
    padding: 0 2px;
    position: relative;
    z-index: 1;
  }
  .main-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.05rem;
    padding: 0.15rem 0 0.1rem 0;
    background: transparent;
    border-radius: 0;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
  }
  .main-nav a {
    min-width: 0;
    font-size: 0.97rem;
    padding: 0.5rem 0.2rem;
    margin: 0.05rem 0.08rem;
    border-radius: 8px;
    text-align: center;
    white-space: normal;
  }
}
@media (max-width: 500px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0.5rem;
  }
  .user-menu {
    font-size: 0.95rem;
    gap: 0.5rem;
  }
}

.sidebar-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 80vw;
  max-width: 320px;
  min-width: 220px;
  height: 100vh;
  background: linear-gradient(120deg, #ede9fe 0%, #fff 100%);
  box-shadow: 12px 0 32px rgba(75,41,150,0.22);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 1200;
  gap: 0.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
.sidebar-nav.open {
  transform: translateX(0);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1.2rem 1.2rem 0.7rem 1.2rem;
  border-bottom: 1px solid #e0e0e0;
  min-height: 60px;
}
.sidebar-header .app-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #6c63ff;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}
.sidebar-close {
  align-self: flex-end;
  margin: 0.2rem 0 0 0;
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-close:hover {
  background: #4834d4;
}
.sidebar-nav a {
  color: #4b2996;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.12rem;
  padding: 1.1rem 2rem;
  border-radius: 6px;
  margin: 0.1rem 0;
  transition: background 0.2s, color 0.2s;
  display: block;
  text-align: left;
}
.sidebar-nav a.active, .sidebar-nav a:focus, .sidebar-nav a:hover {
  background: #e9d5ff;
  color: #7c3aed;
}
.sidebar-user-menu {
  margin-top: auto;
  padding: 1.2rem 2rem 1.5rem 2rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: #4b2996;
  font-size: 1rem;
  background: transparent;
}
.sidebar-user-menu a {
  color: #7c3aed;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-user-menu a:hover {
  color: #4834d4;
}
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(60,30,100,0.38);
  z-index: 1199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-nav.open ~ .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 900px) {
  .sidebar-nav {
    width: 80vw;
    max-width: 320px;
    min-width: 180px;
  }
}
@media (max-width: 500px) {
  .sidebar-nav {
    width: 92vw;
    min-width: 0;
    max-width: 98vw;
  }
  .sidebar-header {
    padding: 1rem 0.7rem 0.7rem 0.7rem;
    min-height: 44px;
  }
  .sidebar-nav a {
    font-size: 1rem;
    padding: 1rem 1.2rem;
  }
  .sidebar-user-menu {
    padding: 0.7rem 1.2rem 1.2rem 1.2rem;
    font-size: 0.97rem;
  }
}

/* Styles pour les échéances de paiement */
.echeances-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.echeances-table th,
.echeances-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.echeances-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.echeances-table tr:hover {
  background: #f8f9fa;
}

.statut-payé {
  color: #28a745;
  font-weight: 600;
}

.statut-en_attente {
  color: #ffc107;
  font-weight: 600;
}

.statut-retard {
  color: #dc3545;
  font-weight: 600;
}

.echeances-info {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #6c63ff;
}

.echeances-info p {
  margin: 0.5rem 0;
}

.echeances-actions {
  margin-bottom: 1rem;
}

/* Styles pour les ventes */
.vente-header {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #6c63ff;
}

.vente-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.vente-details span {
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.vente-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.btn-secondary {
  background: #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Amélioration des modales */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
  color: #6c63ff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

/* Responsive pour les échéances */
@media (max-width: 768px) {
  .echeances-table {
    font-size: 0.8rem;
  }
  
  .echeances-table th,
  .echeances-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .vente-details {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .vente-actions {
    flex-direction: column;
  }
  
  .btn-small {
    width: 100%;
  }
}

.main-header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.main-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0.5rem 0 0.2rem 0;
}
.logo-img {
  display: block;
  margin: 0 auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  vertical-align: middle;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
  margin: 0.5rem auto 0.2rem auto;
}
.main-nav-userblock {
  position: absolute;
  top: 0.7rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
@media (max-width: 900px) {
  .main-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    padding: 0.5rem 0.7rem 0.2rem 0.7rem;
  }
  .main-logo {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.2rem 0 0.1rem 0;
  }
  .main-nav-userblock {
    position: static;
    margin-left: auto;
    margin-right: 0.7rem;
    margin-top: 0;
    margin-bottom: 0;
    gap: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    max-width: 60vw;
    overflow: hidden;
  }
  .main-nav {
    max-width: 100vw;
    gap: 0.5rem;
    font-size: 0.97rem;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
    padding: 0.3rem 0.5rem;
  }
  .logo-img {
    height: 36px !important;
    max-width: 120px !important;
  }
}
@media (max-width: 600px) {
  .main-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.1rem;
    padding: 0.3rem 0.2rem 0.1rem 0.2rem;
  }
  .main-logo {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.1rem 0 0.1rem 0;
  }
  .main-nav-userblock {
    flex-direction: row;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
    gap: 0.3rem;
    min-width: 0;
    max-width: 60vw;
    overflow: hidden;
  }
  .main-nav {
    gap: 0.2rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
    max-width: 100vw;
  }
  .logo-img {
    height: 28px !important;
    max-width: 90px !important;
  }
}

.slide-form-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(124,58,237,0.08);
  margin: 1.2rem 0 2rem 0;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  max-width: 700px;
  width: 100%;
  animation: slideDown 0.35s cubic-bezier(.4,0,.2,1);
  transition: max-height 0.3s, opacity 0.3s;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 700px) {
  .slide-form-container {
    padding: 1rem 0.5rem;
    max-width: 98vw;
  }
}

h1.page-title, .title-dashboard, .title-clients, .title-produits, .title-ventes, .title-echeances, .title-admin {
  color: #232347 !important;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  margin: 0 0 1.7rem 0;
  letter-spacing: -0.5px;
}

.echeance-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(124,58,237,0.07);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 5px solid #6c63ff;
}
.echeance-card .echeance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.echeance-card .echeance-client {
  color: #2563eb;
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}
.echeance-card .echeance-date {
  color: #ea580c;
  font-weight: 500;
}
.echeance-card .echeance-montant {
  color: #16a34a;
  font-weight: bold;
  font-size: 1.1rem;
}
.echeance-card .echeance-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.5rem;
}
.echeance-card .btn-valider {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.echeance-card .btn-valider:hover {
  background: #0e7c2f;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

.admin-tabs button {
  min-width: 160px;
  margin-bottom: 0.2rem;
  font-size: 1rem;
  white-space: normal;
  padding: 0.5rem 0.7rem;
}

.page-title {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tabs {
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.admin-tabs button {
  min-width: 160px;
  margin-bottom: 0.2rem;
  font-size: 1rem;
  white-space: normal;
  padding: 0.5rem 0.7rem;
}

.main-header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.main-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0.5rem 0 0.2rem 0;
}
.main-logo img {
  display: block;
  margin: 0 auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  vertical-align: middle;
}
@media (max-width: 700px) {
  .main-logo img {
    height: 36px !important;
    max-width: 120px !important;
  }
}
@media (max-width: 500px) {
  .main-logo img {
    height: 28px !important;
    max-width: 90px !important;
  }
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.main-nav a {
  color: #6c63ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a.active, .main-nav a:focus, .main-nav a:hover {
  background: #f3e6ff;
  color: #7c3aed;
}
.main-nav-userblock {
  position: absolute;
  top: 0.7rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.main-nav-user {
  color: #222;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.main-nav-logout {
  color: #7c3aed;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.08rem;
}
.main-nav-logout:hover {
  color: #4834d4;
}
/* Responsive header */
@media (max-width: 900px) {
  .main-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    padding: 0.5rem 0.2rem 0.2rem 0.2rem;
    gap: 0;
  }
  .main-logo {
    position: absolute;
    left: 50%;
    top: 0.2rem;
    transform: translateX(-50%);
    z-index: 2;
    margin: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  .main-nav-userblock {
    position: absolute;
    right: 0.7rem;
    top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    z-index: 3;
  }
  .main-nav {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    padding: 0.3rem 0 0.2rem 0;
    gap: 0.2rem;
    background: transparent;
    border-radius: 0;
    overflow-x: visible;
    overflow-y: hidden;
  }
  .main-nav a {
    flex: 1 1 40%;
    min-width: 110px;
    max-width: 48%;
    text-align: center;
    font-size: 1.01rem;
    padding: 0.7rem 0.7rem;
    border-radius: 8px;
    margin: 0.1rem 0.1rem;
    white-space: normal;
  }
}
@media (max-width: 600px) {
  .main-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.1rem;
    padding: 0.3rem 0.2rem 0.1rem 0.2rem;
  }
  .main-logo {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.1rem 0 0.1rem 0;
  }
  .main-nav-userblock {
    flex-direction: row;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
    gap: 0.3rem;
    min-width: 0;
    max-width: 60vw;
    overflow: hidden;
  }
  .main-nav {
    gap: 0.2rem;
    font-size: 0.97rem;
    flex-wrap: wrap;
    max-width: 100vw;
  }
  .logo-img {
    height: 28px !important;
    max-width: 90px !important;
  }
}
/* Suppression des styles burger/sidebar */
.menu-toggle, .sidebar-nav, .sidebar-header, .sidebar-logo, .sidebar-close, .sidebar-user-menu, .sidebar-overlay {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

.slide-form-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(124,58,237,0.08);
  margin: 1.2rem 0 2rem 0;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  max-width: 700px;
  width: 100%;
  animation: slideDown 0.35s cubic-bezier(.4,0,.2,1);
  transition: max-height 0.3s, opacity 0.3s;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 700px) {
  .slide-form-container {
    padding: 1rem 0.5rem;
    max-width: 98vw;
  }
}

h1.page-title, .title-dashboard, .title-clients, .title-produits, .title-ventes, .title-echeances, .title-admin {
  color: #232347 !important;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  margin: 0 0 1.7rem 0;
  letter-spacing: -0.5px;
}

.echeance-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(124,58,237,0.07);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 5px solid #6c63ff;
}
.echeance-card .echeance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.echeance-card .echeance-client {
  color: #2563eb;
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}
.echeance-card .echeance-date {
  color: #ea580c;
  font-weight: 500;
}
.echeance-card .echeance-montant {
  color: #16a34a;
  font-weight: bold;
  font-size: 1.1rem;
}
.echeance-card .echeance-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.5rem;
}
.echeance-card .btn-valider {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.echeance-card .btn-valider:hover {
  background: #0e7c2f;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
} 