/*style.css*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

body {
  background: #f5f6fa;
}

.app {
  display: flex;
  /*min-height: 100vh;*/
  height: 100vh;
}

/* Sidebar */


/* without sidebar scroll
.sidebar {
  width: 240px;
  background: #121a2f;
  color: #fff;
  padding: 12px;

  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow: hidden;
}*/
.sidebar {
  width: 240px;
  background: #121a2f;
  color: #fff;
  padding: 12px;

  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
}

.logo span {
  color: #ffffff;
}


.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  color: #cfd3ff;
  text-decoration: none;
  margin-bottom: 6px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: #1f2a4d;
  color: #fff;
}

/* Main content */
.content {
  flex: 1;
  padding: 30px;

  margin-left: 240px;      /* same as sidebar width */
  height: 100vh;
  overflow-y: auto;
}

.content h1 {
  margin-bottom: 20px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f8f9fb;
}

th,
td {
  padding: 14px;
  text-align: left;
  font-size: 14px;
}

th {
  color: #6b7280;
  font-weight: 600;
}

tbody tr {
  border-bottom: 1px solid #eef0f4;
}

/**********************************LOGOUT BUTTON**************************************************************/
nav a.logout {
  margin-top: 6px;                 /* small gap under catalog */
  color: #ff6b6b;
}

nav a.logout:hover {
  background: rgba(255, 0, 0, 0.15);
  color: #fff;
}

/**********************************ORDER PAGE**************************************************/
/* Name column */
.name {
  font-weight: 600;
}

.sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Actions */
.action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.delete-icon {
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
}

/* =========================
   ORDER DETAIL PAGE UI
========================= */

#clientCard {
  padding: 22px 26px;
}

#clientCard h3 {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 16px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}

.client-item label {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
  display: block;
}

.client-item span {
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}

/* Product status badge */
.status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  display: inline-block;
}

.status.PUBLISHED {
  background: #d1fae5;
  color: #065f46;
}

.status.DRAFT {
  background: #e0e7ff;
  color: #3730a3;
}

#orderProductBody img {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 2px;
}

/* =========================
   ORDER TABLE IMAGE FIX
========================= */



/*.new-order {
  color: #16a34a;
  font-weight: 700;
  background: #ecfdf5;
  border-radius: 6px;
  padding: 4px 8px;
}*/
/* Serial number circle */
.sr-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 29px;
  height: 29px;
  border-radius: 50%;

  font-size: 14px;
  font-weight: 700;

  line-height: 1;              /* 🔑 FIX 1 */
  padding: 0;                  /* 🔑 FIX 2 */

  box-sizing: border-box;
  text-align: center;

  color: #374151;              /* normal text */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* New order → green circle */
.sr-circle.new {
  background-color: #35E82E; /* green */
  color: #ffffff;
  box-shadow: 0 0 0 4px #dcfce7;
}


/* =========================
   ORDER DETAIL PAGE FIX
========================= */

.order-detail-page {
  margin-left: 0;
  max-width: 1100px;
  margin: 0 auto;
  height: auto;          /* 🔥 removes middle scrollbar */
  overflow: visible;     /* 🔥 page scrolls normally */
}
/* =========================
   ORDER STATUS COMPLETE BUTTON (FIX)
========================= */

.order-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  padding: 0 20px;
}
/* 🔵 NOT COLORED PROGRESS LINE */
.order-status-grid::before {
  content: "";
  position: absolute;
  top: 16px;  /*22px*/
  left: 40px;
  right: 40px;
  height: 3px;
  background: #e5e7eb;
   border-radius: 4px;				/*new */
  z-index: 0;
}
/* Blue progress line */
.order-status-grid::after {
  content: "";
  position: absolute;
  top: 18px;              /* SAME as ::before */
  left: 40px;
  height: 3px;
  background: #6366f1;
  border-radius: 4px;

  /* 🔥 key fix */
  width: calc((100% - 80px) * var(--progress, 0) / 100);

  z-index: 0;             /* 👈 UNDER circles */
  transition: width 0.35s ease;
}

.status-col {
  text-align: center;
  z-index: 1;
}

.status-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 700;
  position: relative;
  z-index: 2;   /* 👈 ALWAYS above line */
}

.status-col.active .status-circle {
  background: #6366f1;
  color: #fff;
}

.status-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
}

.status-btn {
  margin-top: 10px;
  background: #9ca3af;   /* grey */
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.status-btn.done {
  background: #6366f1;   /* purple */
  /*background: #16a34a;*/
  color: #fff;
  border: none;
}


/* =========================
   PRINT CLEAN PDF
========================= */

@media print {

  body {
    background: white;
  }

  /* Hide sidebar, buttons */
  .sidebar,
  .add-btn,
  nav,
  header {
    display: none !important;
  }

  /* Remove order status section */
  #orderStatusGrid,
  .order-status-grid,
  .status-col,
  .status-btn {
    display: none !important;
  }

  /* Content full width */
  .content {
    margin: 0;
    padding: 0;
    width: 100%;
  }

  h1 {
    margin-top: 0;
    font-size: 22px;
  }

  #orderIdText {
    font-size: 14px;
    color: #111827;
  }

  /* Cards */
  .card {
    box-shadow: none;
    border: 1px solid #e5e7eb;
    page-break-inside: avoid;
  }

  /* Table */
  table {
    width: 100%;
    border-collapse: collapse;
  }

  th, td {
    border: 1px solid #d1d5db;
    padding: 6px;
    font-size: 12px;
  }

  th {
    background: #f3f4f6;
  }

  img {
    max-width: 40px;
    max-height: 40px;
  }

  /* Remove link text */
  a {
    color: black;
    text-decoration: none;
  }

  a[href]:after {
    content: "";
  }
}

@media print {

  /* Remove last empty rectangle after product table */
  .card:last-of-type {
    border: none !important;
    box-shadow: none !important;
  }

}


/***********************************************PRODUCT PAGE***************************************************/
/* Product column */
.product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.sub {
  font-size: 12px;
  color: #9ca3af;
}

/* Actions */
.action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.delete-icon {
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
}

/* Top bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

/* Rate box */
.rate-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.rate-box span {
  font-weight: 600;
  color: #374151;
}

.rate-box input {
  width: 80px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.rate-box input:focus {
  outline: none;
}

/* Edit rate button */
.edit-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Add product button */
.add-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/***********************************************
            PRODUCT DETAIL PAGE
************************************************/

.product-detail-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.product-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px; /*margin-bottom: 24px;*/
}

.product-detail-header img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.product-detail-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

/* Card */
.product-detail-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;  /*padding: 24px 26px;*/
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

/* Section title */
.product-detail-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 16px;
}

/* Form grid */
.product-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; /*gap: 18px;*/
}

/* Field */
.product-field {
  display: flex;
  flex-direction: column;
  gap: 4px; /*gap: 6px;*/
}

.product-field label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.product-field input {
  padding: 8px 10px; /*padding: 10px 12px;*/
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.product-field input:focus {
  outline: none;
  border-color: #6366f1;
}

/* Full width row */
.product-field.full {
  grid-column: span 2;
}

/* Image upload */
.product-image-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.product-image-box img {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.product-image-box input[type="file"] {
  font-size: 13px;
}

/* Actions */
.product-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px; /*margin-top: 26px;*/
}

.product-detail-actions button {
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.product-detail-actions .update-btn {
  background: #6366f1;
  color: #fff;
}

.product-detail-actions .cancel-btn {
  background: #f3f4f6;
  color: #374151;
}

/* View mode */
.view-mode input,
.view-mode input[type="file"] {
  background: #f9fafb;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 640px) {
  .product-form-grid {
    grid-template-columns: 1fr;
  }

  .product-field.full {
    grid-column: span 1;
  }
}


/***********************************************
                ESTIMATE PAGE
************************************************/

.estimate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}

.estimate-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.estimate-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #f0f2f6;
  font-size: 14px;
  color: #374151;
}

.estimate-row:first-of-type {
  border-top: none;
}

.estimate-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.edit-estimate-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.edit-estimate-btn:hover {
  background: #4f46e5;
}

.ok-btn {
  /*background: #22c55e;*/
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.delete-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

/* Estimate header */
.estimate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.estimate-client {
  font-weight: 700;
  font-size: 15px;
}

.estimate-date {
  font-size: 12px;
  color: #9ca3af;
}

.estimate-company {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

/* NEW label */
.new-label {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #22c55e;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 6px;
}


/***********************************************
              NOTIFICATION PAGE
************************************************/

.notification-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.notification-text {
  font-size: 14px;
  color: #374151;
}

.notification-delete {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

/* Bottom input */
.notify-send-box {
  margin-top: 80px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.notify-send-box input {
  width: 520px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.notify-send-box input:focus {
  outline: none;
  border-color: #6366f1;
}

.notify-send-box button {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
}

.notification-date {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

.notification-left {
  display: flex;
  flex-direction: column;
}

/***********************************************
              USER PAGE
************************************************/
/* Users search input */
.search-input {
  width: 260px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: #6366f1;
}

/* Edit icon */
.edit-icon {
  color: #6366f1;
  cursor: pointer;
}

/* Users top bar (search + add button) */
.users-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
}

/* Search box with icon */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  border-radius: 12px;
  width: 280px;
}

.search-box i {
  color: #9ca3af;
  font-size: 14px;
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
}

.search-box input:focus {
  outline: none;
}

/* =========================
   JOBWORK / SHADE
========================= */

.product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.product .name {
  font-weight: 600;
  color: #222;
}

.action {
  display: flex;
  gap: 14px;
  align-items: center;
}

.action i {
  cursor: pointer;
  color: #444;
}

.action i:hover {
  color: #5b6cff;
}

/* Jobwork form */
#jobworkForm {
  display: grid;
  gap: 12px;
}

#jobworkForm label {
  font-size: 14px;
  font-weight: 600;
}

#jobworkForm input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#jobworkForm img {
  border-radius: 8px;
  border: 1px solid #ddd;
}

/***********************************************
              USER DETAIL PAGE
   (Same look as Product / Jobwork detail)
************************************************/

/* Form grid layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 20px;
}

/* Tablet */
@media (max-width: 1100px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 650px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  color: #111827;
  background: #fff;
}

.form-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* View mode (disabled inputs) */
.form-group input:disabled {
  background: #f5f6fa;
  color: #6b7280;
  cursor: not-allowed;
}

/* Form actions (Save / Update button) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

/* Hide sidebar on user detail page */
body:has(#userForm) .sidebar {
  display: none;
}

/* Remove left margin when sidebar hidden */
body:has(#userForm) .content {
  margin-left: 0;
}


/* =========================
   ORDER FILTER TABS
========================= */

.order-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  padding-left: 4px;
}

.filter-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 6px;
  position: relative;
}

.filter-btn.active {
  color: #111827;
}

.filter-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #6366f1;
  border-radius: 2px;
}

/* Rate + Total Items same line (right aligned)    FOR PRODUCT PAGE */
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.rate-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rate-right {
  font-weight: 600;
  color: #374151;
}
 
 
/* =========================
   CATALOG PAGE
========================= */ 

.notify-send-box input[type="file"] {
  background: #ffffff;              /* ✅ white background */
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
}                               

/* =========================
   COMPANY SETTINGS PAGE
========================= */

.company-card {
  max-width: 1100px;
  margin: auto;
  padding: 30px;
}

.form-grid.wide {
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.form-group input {
  height: 50px;
  font-size: 16px;
  padding: 0 14px;
}

.form-group.full {
  grid-column: span 3;
}

/* Logo */
.logo-section {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.logo-section img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.logo-section input[type="file"] {
  font-size: 14px;
}

/*save button in company page*/
.form-actions2 {
  display: flex;
  justify-content: center;   /* ✅ center horizontally */
  margin-top: 30px;
}

.form-actions2 .info-btn {
  padding: 14px 36px;       /* 🔥 bigger button */
  font-size: 20px;
  border-radius: 14px;
  min-width: 220px;         /* optional fixed width */
}
/* =========================
   COMPANY PAGE RESPONSIVE FIX
========================= */

/* Tablet */
@media (max-width: 1100px) {
  .form-grid.wide {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-group.full {
    grid-column: span 2;
  }
}

/* =========================
   SUGGESTION
========================= */
.suggest-box {
  position: relative;
}

.suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.suggest-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.suggest-item:hover {
  background: #6366f1;
  color: #fff;
}
.suggest-item.active {
  background: #2563eb;
  color: white;
}


   
                