/* Common styles extracted from index.html and vendors.html */
:root {
  --bg: #fff4ea;
  --card: #ffffff;
  --white: #ffffff;
  --primary: #ff8a2b;
  --primary-soft: #fff0e3;
  --green: #2ecc71;
  --orange: #f39c12;
  --red: #ff5a5f;
  --text: #2c2c2c;
  --info: #046cbd;
  --muted: #9aa0a6;
  --border: #e5e7eb;
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}
.layout {
  display: flex;
  min-height: 100vh;
}

/* ===============================
   SIDEMENU
================================ */
.sidebar {
  width: 260px;
  background: var(--white);
  border-radius: 24px 24px 24px 24px;
  margin: 50px 24px 50px 24px;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 90vh;
}
.logo, .brand {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 32px;
  gap: 8px;
}
.menu a, .nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
}
.menu a.active, .nav a.active {
  background: var(--primary);
  color: #fff;
}
.menu a:hover, .nav a:hover {
  background: var(--primary-soft);
  color: var(--text);
}
.logout {
  position: absolute;
  bottom: 24px;
  left: 24px;
  color: var(--primary);
  font-weight: 500;
}
.main {
  flex: 1;
  padding: 32px 40px;
}

/* ===============================
   USER DROPDOWN (FIXED)
================================ */
.user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}

.user i {
  font-size: 12px;
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
}

/* Dropdown menu */
.user-menu {
  position: absolute;
  top: 100%;               /* 🔑 NO GAP */
  right: 0;
  margin-top: 8px;
  width: 160px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

/* Dropdown items */
.user-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.user-menu a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ✅ KEEP DROPDOWN OPEN */
.user:hover .user-menu,
.user-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ===============================
   SEARCH
================================ */
.search {
  position: relative;
  width: 280px;
}

.search input {
  width: 100%;
  padding: 12px 16px 12px 44px;   /* space for icon */
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search input::placeholder {
  color: var(--muted);
}

.search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;   /* allows clicking input */
}

/* Focus state */
.search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,138,43,0.15);
}


.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.trend {
  font-size: 13px;
  color: var(--primary);
}
.content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
canvas { width: 100% !important; }
.table-card table, table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table-card th, .table-card td, th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
}
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.topbar {
  position: sticky;      /* 👈 makes it stick */
  top: 0;
  z-index: 100;          /* keeps it above content */
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;

  background: var(--bg); /* prevents transparency */
  padding: 16px 0;       /* optional – nice spacing */
}
.topbar h2 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.pages {
  display: flex;
  gap: 8px;
  align-items: center;
}
.page {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.page.active {
  background: var(--primary);
  color: #fff;
}
/* Modern action buttons for brands page */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid var(--primary);
  background: var(--primary-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(255,138,43,0.07);
}
.btn i {
  font-size: 1.1em;
}
.btn.btn-add {
  background: var(--primary);
  color: #fff;
}
.btn:hover, .btn:focus {
  background: var(--primary);
  filter: brightness(0.95);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  outline: none;
  color: #fff;
}

/* ===============================
   NOTIFICATION BELL
================================ */
.icon-btn {
  position: relative;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

.icon-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===============================
   MODAL STYLES
================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.3);
  justify-content: center;
  align-items: center;
}
.modal[style*="block"] {
  display: flex !important;
}
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 32px 24px 24px 24px;
  border-radius: 18px;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
  width: 100%;
  background: #fff;
}

/* Focus state */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border: 1.5px solid var(--primary);
}


.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: none;
  border: none;
  margin: 0 2px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: none;
  box-shadow: none;
  padding: 0;
}
.icon-action:focus, .icon-action:active, .icon-action:hover {
  background: none;
  box-shadow: none;
}
.icon-action i {
  pointer-events: none;
}
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
th, td {
  padding: 12px 8px;
  text-align: left;
  white-space: nowrap;
  width: 33%;
}


.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}


.sales-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-left {
  flex: 1;
}

.card-right img {
  width: 60px;
  height: auto;
}

.status {
    padding: 4px 10px;
    border-radius: 999px; /* fully rounded */
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status.available {
    background-color: #28a745; /* green */
}

.status.sold {
    background-color: #dc3545; /* red */
}




