
:root {
  --accent: #e0ccc9;
  --black: #111;
  --muted: #7a7a7a;
  --bg: #ffffff;
  --card-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
  --glass: rgba(224, 204, 201, 0.12);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #fbfbfb 0%, #f4f6f8 100%);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.35;
}

/* Layout */
.app {
  display: flex;
  min-height: 100vh;
  gap: 28px;
  padding: 28px;
  align-items: stretch;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: linear-gradient(
    180deg,
    rgba(224, 204, 201, 0.98),
    rgba(224, 204, 201, 0.95)
  );
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand .logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.brand h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
  color: var(--black);
}
.brand p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.nav {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav button {
  background: transparent;
  border: none;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--black);
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.18s ease;
  font-size: 14px;
}
.nav button .ico {
  width: 34px;
  height: 34;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
}
.nav button:hover {
  transform: translateX(6px);
}
.nav button.active {
  background: rgba(0, 0, 0, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.sidebar .meta {
  margin-top: auto;
  font-size: 13px;
  color: var(--muted);
}
.sidebar .meta small {
  display: block;
  margin-top: 6px;
  color: #4b4b4b;
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-area {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  min-width: 320px;
}
.search-area input {
  border: 0;
  outline: 0;
  font-size: 14px;
  width: 100%;
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}
.icon-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* CONTENT CARD */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

/* DASHBOARD */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.stat-card {
  display: flex;
  gap: 12px;
  align-items: center;
}
.stat-card .bubble {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(
    135deg,
    rgba(224, 204, 201, 0.9),
    rgba(224, 204, 201, 0.7)
  );
  color: var(--black);
  flex-shrink: 0;
}
.stat-card .meta h3 {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-weight: 600;
}
.stat-card .meta p {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

/* Chart area */
.chart-wrap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
@media (max-width: 980px) {
  .chart-wrap {
    grid-template-columns: 1fr;
  }
}

/* PRODUCTS */
.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.products-table thead th {
  text-align: left;
  padding: 12px 14px;
  color: #6b6b6b;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}
.products-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px dashed #f0f0f0;
  vertical-align: middle;
}
.prod-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #eee;
}

.tbl-actions button {
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 6px;
}
.btn-edit {
  background: linear-gradient(90deg, #ffd7d7, #e0ccc9);
  color: var(--black);
}
.btn-delete {
  background: #ffecec;
  color: #b30000;
}

/* ADD PRODUCT (form) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.field label {
  font-weight: 600;
  color: #444;
  font-size: 13px;
}
.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fafafa;
  font-size: 14px;
  outline: none;
  transition: box-shadow 0.12s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  box-shadow: 0 6px 20px rgba(224, 204, 201, 0.18);
}

.image-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(224, 204, 201, 0.06),
    rgba(224, 204, 201, 0.03)
  );
  border: 1px solid #fff;
}
.image-preview img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eee;
}

.btn-primary {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(224, 204, 201, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
}

/* ORDERS */
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #f1f1f1;
  background: #fff;
}
.order-left {
  display: flex;
  gap: 12px;
  align-items: center;
}
.order-meta small {
  display: block;
  color: var(--muted);
}
.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.status-confirmée {
  background: #d0e7ff;
  color: #124a7a;
}
.status-livrée {
  background: #dff3e6;
  color: #165c2d;
}
.status-attente {
  background: #fff4d6;
  color: #a06b00;
}
.status-annulée {
  background: #eee;
  color: #6b6b6b;
}

/* responsive */
@media (max-width: 720px) {
  .sidebar {
    display: none;
  }
  .app {
    padding: 14px;
  }
  .main {
    margin: 0;
  }
}

/* tiny helpers */
.muted {
  color: var(--muted);
  font-size: 13px;
}
.small {
  font-size: 13px;
}
