/* ============================================
   CSS CUSTOM PROPERTIES & VARIABLES
   ============================================ */
:root {
  /* Primary Colors */
  --primary: #2f6d93;
  --primary-light: #d4e6f1;
  --primary-lighter: #ebf5fb;
  --primary-dark: #1e4d73;
  --primary-hover: #3d7fa8;
  
  /* Secondary Colors */
  --secondary: #5a9bb8;
  --success: #16a34a;
  --warning: #ff8c34;
  --danger: #dc2626;
  --info: #2563eb;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;
  --spacing-3xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px -2px rgba(47, 109, 147, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   UTILITY CLASSES - SIZING
   ============================================ */
.w-14, .w-17 {
  display: inline-block;
}

.w-14 {
  width: 14px;
}

.w-17 {
  width: 17px;
}

.h-16, .h-17 {
  display: inline-block;
}

.h-16 {
  height: 16px;
}

.h-17 {
  height: 17px;
}

.width-50 {
  width: 50px !important;
}

.width-85 {
  width: 85px !important;
}

.custom-img-size {
  width: 100px;
  height: auto;
}

/* ============================================
   UTILITY CLASSES - BACKGROUND COLORS
   ============================================ */
.bg-EDDDFC {
  background-color: #EDDDFC;
}

.bg-FFEEE1 {
  background-color: #FFEEE1;
}

.bg-DCF1E4 {
  background-color: #DCF1E4;
}

.bg-FDD9D9 {
  background-color: #FDD9D9;
}

.bg-EBE1FF {
  background-color: #EBE1FF;
}

.bg-FDEADE {
  background-color: #FDEADE;
}

/* ============================================
   FORM & VALIDATION STYLES
   ============================================ */
.indicate-text {
  font-size: 12px;
  color: var(--danger);
  font-weight: 500;
  margin-top: var(--spacing-xs);
}

.form-control.error,
.image-wrapper.error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-alert {
  font-size: 11px;
  color: var(--danger);
  font-weight: 500;
  margin-top: var(--spacing-xs);
}

.error {
  color: var(--danger) !important;
}

.budget-form .form-control[readonly] {
  background-color: #fff !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.budget-form ::placeholder {
  font-size: 12px;
  color: var(--gray-400);
}

input[readonly],
select[readonly] {
  background-color: white !important;
  color: var(--gray-800);
  border-color: var(--gray-200);
  pointer-events: none;
}

/* ============================================
   AVATAR STYLES
   ============================================ */
.avatar {
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  position: relative;
  height: 45px;
  width: 45px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.avatar.avatar-sm {
  font-size: 12px;
  height: 30px;
  width: 30px;
}

.avatar img {
  border-radius: 50%;
  height: 100%;
  width: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn-custom-warning {
  background-color: var(--primary) !important;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-custom-warning:hover {
  color: #fff;
  background-color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.wishlist-btn-no,
.wishlist-btn-yes {
  width: 120px;
  height: 44px;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.wishlist-btn-no {
  border: 1.5px solid var(--danger) !important;
  color: var(--danger);
  background-color: transparent;
}

.wishlist-btn-no:hover {
  background-color: rgba(220, 38, 38, 0.1);
}

.wishlist-btn-yes {
  border: none !important;
  background-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.wishlist-btn-yes:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.role-reset-btn {
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-md);
  background-color: transparent;
  transition: all 0.3s ease;
}

.role-reset-btn:hover {
  color: #fff !important;
  background-color: var(--primary);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.custom-btn {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 0.65rem 1rem;
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding-right: 30px;
  box-shadow: var(--shadow-md);
}

.custom-btn::after {
  content: "\25BC";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #fff;
}

.custom-btn:hover {
  background-color: var(--primary-dark) !important;
  box-shadow: var(--shadow-lg);
}

/* ============================================
   TEXT & COLOR STYLES
   ============================================ */
.custom-warning-color {
  color: var(--primary);
  font-weight: 500;
}

.wislist-icon {
  color: var(--danger);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--primary);
}

.nav-link {
  color: var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-dark);
}

/* ============================================
   STATUS BADGE STYLES
   ============================================ */
.status-not-started {
  background-color: rgba(255, 140, 52, 0.15) !important;
  color: var(--warning) !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-working {
  background-color: rgba(37, 99, 235, 0.15) !important;
  color: var(--info) !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-complete {
  background-color: rgba(22, 163, 74, 0.15) !important;
  color: var(--success) !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-unknown {
  background-color: var(--gray-100);
  color: var(--gray-600) !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-cancel {
  background-color: var(--danger);
  color: #fff !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.status-pending {
  background-color: var(--warning);
  color: #fff !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.status-progress {
  background-color: var(--info);
  color: #fff !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.status-delivered {
  background-color: var(--primary);
  color: #fff !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.status-completed {
  background-color: var(--success);
  color: #fff !important;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.leave-status-pending {
  background-color: rgba(255, 140, 52, 0.15) !important;
  color: var(--warning) !important;
}

.leave-status-approved {
  background-color: rgba(22, 163, 74, 0.15) !important;
  color: var(--success) !important;
}

.leave-status-rejected {
  background-color: rgba(220, 38, 38, 0.15) !important;
  color: var(--danger) !important;
}

.leave-status-unknown {
  background-color: var(--gray-100);
  color: var(--gray-600) !important;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.text-edit-table .table td {
  font-size: 16px !important;
  text-align: left;
  padding: var(--spacing-md);
}

.text-edit-table input.form-control {
  box-shadow: none;
  background: #ffffff;
  border: 1px solid var(--gray-300) !important;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem !important;
  height: 48px;
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.text-edit-table input.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(47, 109, 147, 0.1);
}

.roles-permissions table td {
  color: var(--gray-800);
  padding: var(--spacing-md);
  border-color: var(--gray-200);
}

.table-form-section .responsive-table,
.party-list-folder-table {
  min-height: unset !important;
}

.table-title-three h5 {
  font-weight: 700 !important;
  color: var(--gray-900);
}

.table-header h3,
.table-header h4 {
  font-weight: 700;
  color: var(--gray-900);
}

/* ============================================
   DROPDOWN STYLES
   ============================================ */
.custom-dropdown {
  position: relative;
  display: inline-block;
}

.custom-dropdown-action .dropdown-menu a {
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

.custom-dropdown-action .dropdown-menu a:hover {
  background-color: var(--primary-lighter);
  color: var(--primary);
}

.custom-menu {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: var(--shadow-xl);
  z-index: 10;
  min-width: 160px;
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) 0;
  top: 100%;
}

.custom-dropdown:hover .custom-menu {
  display: block;
}

.custom-item {
  color: var(--gray-700);
  padding: var(--spacing-md) var(--spacing-lg);
  display: block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.custom-item:hover {
  background-color: var(--primary-lighter);
  color: var(--primary);
  padding-left: calc(var(--spacing-lg) + 4px);
}

/* ============================================
   IMAGE STYLES
   ============================================ */
.img-preview {
  margin-top: var(--spacing-xs);
  height: auto;
  width: 100px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.img-preview:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.clickable-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  margin-right: var(--spacing-sm);
  cursor: pointer;
  border-radius: var(--radius-md);
  margin-top: var(--spacing-sm);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.clickable-image:hover {
  box-shadow: 0 0 0 3px rgba(47, 109, 147, 0.2);
  transform: scale(1.05);
}

#preview-image {
  width: 100%;
  height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  display: block;
  margin: 0 auto;
  background: #f3f4f6;
}

/* ============================================
   CUSTOMER STYLES
   ============================================ */
.customer-size input {
  border: 1.5px solid var(--secondary) !important;
  padding: var(--spacing-xs) !important;
  text-align: center;
  display: inline-block;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.customer-size input:focus {
  box-shadow: 0 0 0 3px rgba(90, 155, 184, 0.1);
  border-color: var(--primary) !important;
}

/* ============================================
   INVOICE & DASHBOARD STYLES
   ============================================ */
.erp-new-invice .invice-detaisl {
  padding: var(--spacing-xl) 0;
}

.commercial-invoice {
  margin-bottom: var(--spacing-3xl);
}

.invoice-payment-details {
  margin-top: var(--spacing-3xl);
}

.erp-new-invice {
  min-height: 650px !important;
}

.dashboard-card-body strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-500);
}

.erp-overview-grid-6.customer {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--spacing-md);
}

.customer .erp-overview-item {
  padding: var(--spacing-xl) var(--spacing-lg);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  background: white;
  transition: all 0.3s ease;
}

.customer .erp-overview-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.customer .erp-overview-item .overview-icon {
  height: 70px;
  width: 70px;
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #EDDDFC;
  transition: all 0.3s ease;
}

.customer .erp-overview-item:hover .overview-icon {
  transform: scale(1.1);
}

.customer .erp-overview-item:nth-child(2) .overview-icon {
  background-color: #FFEEE1;
}

.customer .erp-overview-item:nth-child(3) .overview-icon {
  background-color: #DCF1E4;
}

.customer .erp-overview-item:nth-child(4) .overview-icon {
  background-color: #FDD9D9;
}

.customer .erp-overview-item:nth-child(5) .overview-icon {
  background-color: #EBE1FF;
}

.customer .erp-overview-item:nth-child(6) .overview-icon {
  background-color: #FDEADE;
}

.customer .erp-overview-item .overview-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.customer .erp-overview-item .text-center p:first-child {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.customer .erp-overview-item .text-center p:last-child {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--gray-500);
  margin: var(--spacing-sm) 0 0 0;
}

/* ============================================
   ALERT & WARNING STYLES
   ============================================ */
.cc-alert-row {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  font-weight: 600;
  padding: var(--spacing-md);
  border-left: 4px solid var(--danger);
}

.cc-red-alert-cell {
  color: var(--danger);
  font-weight: 600;
}

.loss-profit-custom-color1 {
  background-color: rgba(255, 132, 0, 0.15);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.loss-profit-custom-color2 {
  background-color: rgba(255, 132, 0, 1);
  color: white;
  font-weight: 700;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
}

/* ============================================
   CHART STYLES
   ============================================ */
#monthly-statistics,
#salesRatio {
  width: 100% !important;
  max-height: 290px !important;
  min-height: 210px;
}

#sales-by-country {
  width: 100% !important;
  max-height: 220px !important;
}

#attendenceChart {
  max-width: 100%;
  height: auto;
}

/* ============================================
   LAYOUT & STRUCTURE STYLES
   ============================================ */
.input-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.input-wp {
  flex: 1;
}

.to-label {
  margin: 0 var(--spacing-lg);
  font-weight: 500;
  color: var(--gray-700);
}

.single-items-details {
  display: grid;
  grid-template-columns: 150px auto;
  border: 1px solid var(--gray-300);
  margin-top: var(--spacing-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.folders-files tr a {
  font-size: 18px !important;
  color: var(--primary);
  transition: all 0.3s ease;
}

.folders-files tr a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.gradient-row {
  background: linear-gradient(270deg, #dbe4df 0%, #65e4a6 50%, #ffffff 100%);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
}

.production-wrap {
  padding-right: 60px;
}

.print-wrapper .responsive-table {
  min-height: unset;
}

.print-wrapper .table th,
.print-wrapper .table td {
  white-space: nowrap;
  padding: var(--spacing-md);
}

.print-wrapper {
  min-height: 700px !important;
}

.order-form-section label {
  left: 10px;
  white-space: nowrap;
  z-index: 2;
  font-weight: 500;
  color: var(--gray-700);
}

.custom-percent-border {
  z-index: 1;
}

.order-count-badge {
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  top: 13px;
  right: 33px;
  box-shadow: var(--shadow-md);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media only screen and (min-width: 1350px) and (max-width: 1500px) {
  .customer .erp-overview-item .text-center p:first-child {
    font-size: 20px !important;
    line-height: 30px !important;
  }

  .customer .erp-overview-item .text-center p:last-child {
    font-size: 16px !important;
    line-height: 24px !important;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1420px) {
  .erp-overview-grid-6.customer {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (min-width: 475px) and (max-width: 767px) {
  .erp-overview-grid-6.customer {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 475px) {
  .erp-overview-grid-6.customer {
    grid-template-columns: repeat(1, 1fr);
  }

  .avatar {
    height: 35px;
    width: 35px;
    font-size: 14px;
  }

  .custom-btn {
    padding: 0.5rem 0.75rem;
    font-size: 14px;
  }
}

@media print {
  .table-two thead td {
    padding: 0px !important;
  }

  .order-count-badge {
    display: none;
  }
}