/* Layout principal */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #1f1f1f;
  color: #e0f7fa;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: #121212;
  padding: 1rem;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.sidebar-header .logo {
  max-height: 40px;
}

.sidebar-header .site-name {
  font-weight: bold;
  color: cyan;
  margin-left: 10px;
}

.toggle-btn {
  display: none;
  background: none;
  border: none;
  color: cyan;
  font-size: 1.5rem;
  position: fixed;
  left: 10px;
  top: 10px;
}

/* Menu */
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li {
  margin-bottom: 1rem;
}

.menu a {
  display: block;
  color: #e0f7fa;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.menu a:hover {
  background-color: #2b2b2b;
}

.has-sub .arrow {
  float: right;
}

.submenu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.has-sub.open .submenu {
  display: block;
}

/* Contenu principal */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 2rem;
  background-color: #1f1f1f;
  transition: margin-left 0.3s ease;
  padding: 5%;
}

.topbar {
  background-color: #181818;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .toggle-btn {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }
}
.toggle-btn-mobile {
  background: none;
  border: none;
  color: cyan;
  font-size: 1.5rem;
  display: none;
  margin-right: 1rem;
}

@media screen and (max-width: 768px) {
  .toggle-btn-mobile {
    display: inline-block;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
  }
}
.dashboard h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: cyan;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background-color: #2a2a2a;
  padding: 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.02);
}

.card-icon {
  font-size: 2.5rem;
  margin-right: 1rem;
}

.card-content h3 {
  font-size: 1rem;
  margin: 0;
  color: #ccc;
}

.card-content p {
  font-size: 1.6rem;
  font-weight: bold;
  margin: 0;
  color: white;
}

.card-blue { border-left: 5px solid #2196f3; }
.card-cyan { border-left: 5px solid #00bcd4; }
.card-gray { border-left: 5px solid #9e9e9e; }
.card-green { border-left: 5px solid #4caf50; }

.dashboard-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.widget {
  flex: 1 1 400px;
  background-color: #292929;
  padding: 1.5rem;
  border-radius: 10px;
}

.widget h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: cyan;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  margin-bottom: 0.75rem;
  color: #e0e0e0;
}
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-form input,
.filter-form select,
.filter-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.filter-form input,
.filter-form select {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

.filter-form button {
  background-color: #00bcd4;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.filter-form button:hover {
  background-color: #0197a1;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #2c2c2c;
}

.admin-table th {
  background-color: #1a1a1a;
  color: #00bcd4;
}

.admin-table tr:hover {
  background-color: #1e1e1e;
}

.btn {
  display: inline-block;
  background-color: #00bcd4;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #0197a1;
}

.btn-secondary {
  background-color: #263238;
}

.btn-secondary:hover {
  background-color: #37474f;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: bold;
  color: white;
  text-transform: capitalize;
}

.badge-en\ attente { background: #607d8b; }
.badge-accepté { background: #4caf50; }
.badge-refusé { background: #f44336; }
.badge-en\ cours { background: #ffc107; color: #000; }
.badge-terminé { background: #2196f3; }

.etat-form,
.acompte-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.etat-form select,
.acompte-form input {
  padding: 0.3rem 0.6rem;
  background-color: #1e1e1e;
  border: none;
  color: white;
  border-radius: 4px;
}

.acompte-form button {
  background-color: #4caf50;
}

hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #333;
}

.devis-infos {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  background-color: #1e1e1e;
  padding: 1.5rem;
  border-radius: 8px;
}

.devis-client, .devis-admin {
  flex: 1;
  min-width: 250px;
}

.devis-actions {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .filter-form {
    flex-direction: column;
  }

  .etat-form,
  .acompte-form {
    flex-direction: column;
    align-items: flex-start;
  }

  .devis-infos {
    flex-direction: column;
  }
}