/* styles.css */

/* Import Custom Font */
/*@font-face {*/
/*    font-family: 'Manrope';*/
/*    src: url('font/Manrope/Manrope-VariableFont_wght.ttf') format('truetype');*/
/*    font-weight: 100 900;*/
/*    font-style: normal;*/
/*}*/

/* ------------------------------------------------------
   Variables
------------------------------------------------------ */
:root {
  --primary-color: #1EB5A4;
  --primary-dark: #199488;
  --secondary-color: #263238;
  --background-offwhite: #E3EDEC;
  --background-contrast: #F4F5FA;
  --background-navbar: #263238;  /* Dark for left pane */
  --primary-overlay: rgba(38, 50, 56, 0.5);
  --primary-overlay-light: rgb(45, 49, 63, 0.5);
  --text-muted: #777;
  --text-light: #F4F5FA;
  --text-dark: #263238;
  --font-family: 'Manrope', sans-serif;
  
    --stock-in:      #1EB5A4;  
  --stock-limited: #f1c40f;  /* amber  */
  --stock-none:    #e74c3c;  /* red    */
}

/* ------------------------------------------------------
   Base / Global
------------------------------------------------------ */
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  color: var(--text-dark);
  background: var(--background-offwhite);
}

.flash-messages {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999; /* ensure on top */
  padding: 10px 20px;
  text-align: center;
}

/* Accent color for headings, etc. */
.text-accent {
  color: var(--primary-color);
}

/* White link on dark background */
.link-accent-light {
  color: var(--text-light);
  text-decoration: underline;
}
.link-accent-light:hover {
  color: var(--primary-color);
}

/* Brand / accent link on normal background */
.link-accent {
  color: var(--primary-color);
  text-decoration: none;
}
.link-accent:hover {
  color: var(--primary-dark);
}

.link-accent-dark {
  color: var(--primary-dark);
  text-decoration: none;
}
.link-accent-dark:hover {
  color: var(--primary-dark);
}

/*.unassigned-strip > .card { position: relative; }*/
/*.btn-claim {*/
/*  position:absolute; top:6px; right:6px;*/
/*  border:none; background:var(--primary-color);*/
/*  color:#fff; border-radius:50%; width:32px; height:32px;*/
/*  display:flex; align-items:center; justify-content:center;*/
/*}*/
/*.btn-claim:hover { background:var(--primary-dark); }*/
/* ------------------------------------------------------
   Panes
------------------------------------------------------ */
.left-pane {
  background-color: var(--background-navbar);
  color: var(--text-light);
}
.right-pane {
  background-color: var(--background-offwhite);
}

/* Logos */
.brand-logo {
  max-width: 120px;
  display: block;
  margin: 0 auto; /* center it */
}
.partner-logo {
  max-width: 160px;
}

/* ------------------------------------------------------
   Card Styling Enhancements
------------------------------------------------------ */
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.text-muted-small {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.form-label {
  font-weight: 500;
}

/* Enhanced Input Fields */
.form-control-lg {
  border-radius: 6px;
  border: 1px solid #ddd;
  padding-left: 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-control-lg:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30,181,164,0.15);
}

/* Link Accent (highlight links subtly) */
.link-accent {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.link-accent:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Button Enhancement */
.btn--primary {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25,148,136,0.2);
}

/* Refined Form Controls (smaller and cleaner) */
.form-control, .form-select {
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  border: 1px solid #ddd;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(30,181,164,0.2);
}

/* Card Enhancement */
.login-card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}


.subtle-brand-logo {
  max-width: 45px;
  opacity: 0.3;
}
/* ----------------------------------------------
   NAV BAR
---------------------------------------------- */

/* ==========================================================================
   PROFILE AVATAR (no inline styles)
   ========================================================================== */
.profile-avatar {
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 40px;
  flex-shrink: 0; /* prevent shrinking in flex layouts */
  font-size: 0.8rem;
  user-select: none;
}

/* ==========================================================================
   ICONS / IMAGES (forced to use --text-light)
   ========================================================================== */
.icon-light {
  color: var(--text-light) !important;
  /* If you have SVG <svg fill="currentColor">…</svg>, this will force the fill. */
}

/* ───────────────────────────────────────────────────────────────────────── */
/* PROFILE INFO: make name + role smaller                                     */
/* ───────────────────────────────────────────────────────────────────────── */
.profile-info {
  display: flex;
  flex-direction: column;
  /* Base font size for the entire block: 
     you can tweak this as needed. */
  font-size: 0.9rem; /* 75% of normal size */
  line-height: 1.2;
}

.profile-info .profile-role {
  /* If you’d like the role to be even smaller / dimmer: */
  font-size: 0.65rem;
  opacity: 0.8;
}

.pre-nav-bar {
    background-color: var(--background-offwhite);
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.language-switcher a {
  text-decoration: none;
  color: #666;
  font-weight: 600;
  padding: 5px 10px;
  transition: color 0.3s ease;
}
.language-switcher a.active {
  color: var(--text-dark);
  font-weight: bold;
  pointer-events: none;
}

.subtle-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: font-weight 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.subtle-link:hover {
    font-weight: bold;
}
.subtle-link:hover .email-icon {
    transform: scale(1.1);
}

.navbar-custom {
  background-color: var(--background-navbar);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.brand-logo {
  height: 50px;
  margin-right: 8px;
  margin-bottom: 5px;
  color: var(--text-light);
}

.pie-logo {
    color: var(--primary-color);
    width: 40px;
    margin: 10px;
  height: auto;
}

.brand-logo:hover {
  font-weight: bold !important;
  color: var(--text-light) !important;
}
.slogan {
  font-weight: bold;
  font-size: 0.85rem;
  color: var(--text-light);
  /*white-space: nowrap;*/
}
.accent {
  color: var(--primary-color);
}

.btn-outline-primary.active {
  background-color: var(--primary-color);
}
-

.filters .filter-group strong {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.filters label {
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.filters label input {
  margin-right: .3rem;
  margin-left: .6rem;
}

/* Base for icon-buttons */
.icon-button {
  background: none;
  border: none;
  color: var(--text-light);
  padding: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-button:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

/* Logout link: letters first then icon */
.logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-light);
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logout-link:hover {
transform: scale(1.05);
  opacity: 0.9;
}

/* Optional: Adjust the logout text styling */
.logout-text {
}

.floating-container {
    text-align: center;
    max-width: 700px;
    padding: 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin: 200px auto;
}

.logo {
    width: 300px;
    margin-bottom: 20px;
}

/* Messaging */
/* static/css/messaging.css */
.msg-bubble { font-size: .95rem; line-height: 1.35; }
.msg-bubble p:last-child { margin-bottom: 0; }


#imgPreview img { max-width:70px; }
.remove-thumb { position:absolute; top:-5px; right:-5px; cursor:pointer; }

/* Flash message styles */
.flash-messages {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 10px 20px;
    text-align: center;
}

.flash-messages .alert {
    margin-bottom: 0;
}


/*SPALSH*/
/* Splash Screen Styles */
#splash-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-navbar); /* Matches your navbar color */
  z-index: 2000; /* High to overlay everything */
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo {
  width: 120px;
  opacity: 0;
  animation: splashAnimation 2s ease-in-out forwards;
}

/* Splash Animation Keyframes */
@keyframes splashAnimation {
  0% { opacity: 0; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}


/* Upload FILES */
/* Drag & Drop area */
.drag-drop-area {
  cursor: pointer;
  background-color: var(--background-contrast);
  transition: background-color 0.2s;
}
.drag-drop-area:hover {
  background-color: var(--primary-overlay-light);
}

/* Spinner (centered) */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  color: var(--text-light);
  background-color: var(--secondary-color);
  padding: 1rem;
  border-radius: 8px;
  opacity: 0.9;
}

/* Preview container for 3D, PDF, or SVG */
.model-preview {
  width: 100%;
  height: 300px;  /* You can adjust as needed */
  overflow: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

#pdfEmbed {
  width: 100%;
  height: 100%;
  border: none;
}


/* Cards */
.order-card.border-draft { border-left: 4px solid var(--primary-color); }

.order-card.border-unread { border-right: 2px solid var(--bs-danger); }

.unread-dot{
  width: 0.9rem;      /* or 14px */
  height: 0.9rem;
  border: 2px solid #fff;          /* crisp ring */
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.05);
}
/* focus ring when a child link/button is focused */
.order-card:focus-within {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Highlight for edited items */
.card.edited {
  border-top: 4px solid var(--primary-color);
}
/* Highlight for edited items */
.card.archived {
  border-left: 10px solid var(--text-muted);
  /*background-color: var(--primary-overlay-light); !* very light accent background *!*/
}

.card.edited::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-top: 25px solid var(--primary-color);
  border-right: 25px solid transparent;
  z-index: 0;
}

.card {
  position: relative; /* ensure ::before positions correctly */
}

/* compact service chips */
.item-chip {
  display: inline-flex;
  align-items: center;
  padding: .15rem .45rem;
  border-radius: 5px;
  font-size: .75rem;
  user-select: none;
}
.chip-icon { font-size: .9em; }
.chip-label { font-weight: 600; letter-spacing: .03em; }
.chip-count { font-variant-numeric: tabular-nums; }


/* Index Creator */
/* —— floating “new project” FAB on mobile —— */
@media (max-width: 576px) {
  .btn-new-project {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1060;           
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    border-radius: 1rem;
    padding: .75rem 1rem;
  }
}

/* thin muted heading above each cluster */
.section-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: .5rem;
}

/* optional: slight tint so draft cards pop even more */
.order-card.border-draft {
  border-left: 4px solid var(--primary-color);
}

/* thin muted heading above each cluster */
.section-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: .5rem;
}

/* info icon: slightly smaller & subtle */
.info-icon {
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
}
.info-icon:hover,
.info-icon:focus { color: var(--primary-color); }

.icon-button {
  background:none;
  border:none;
  color:var(--text-muted);
  padding:.35rem;
  line-height:1;
}
.icon-button:hover,
.icon-button:focus { color:var(--primary-color); }


/* ---------- inventory badges ---------------------------------- */
.badge-stock {
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.5rem;
}
.badge-stock[data-status="IN_STOCK"]  { background: var(--stock-in);  color:#fff; }
.badge-stock[data-status="LIMITED"]   { background: var(--stock-limited); color:#000; }
.badge-stock[data-status="NO_STOCK"]  { background: var(--stock-none);color:#fff; }

/* toast (bottom-right) */
#toastZone { position:fixed; bottom:1rem; right:1rem; z-index:1200; }

/* ---------- Inventory table refinement ----------------------- */
.table-inventory {
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  overflow: hidden;            /* keeps rounded corners */
  border-radius: .5rem;
}

.table-inventory thead th {
  background: var(--primary-color);
  color: var(--text-light);
  border-bottom: none;
}

.table-inventory tbody tr:nth-child(even) {  /* zebra stripe */
  background: var(--background-contrast);
}

.table-inventory tbody tr:hover {
  background: rgba(30,181,164,.08);          /* primary tint */
}

.table-inventory td, .table-inventory th {
  padding: .65rem .75rem;
  vertical-align: middle;
}

/* smooth fade-in for newly added row */
@keyframes fadeIn { from {opacity:0; transform:translateY(-4px)} to {opacity:1;}}
.new-row { animation: fadeIn .25s ease-out; }


/*Index Operator*/
.btn-chat{
  background: var(--primary-color);
  border: none;
  color: #fff;
  border-radius: 5px;
}


.claim-btn {
  position: absolute;
  background: var(--primary-color);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.claim-btn:hover { transform: scale(1.1); }
.claim-btn:hover .claim-icon{ transform: scale(1.1) ;
color: #fff;}

.order-card .stretched-link { z-index: 1; }   
.order-card .claim-btn      { z-index: 3; }

.archive-btn {
  background: var(--secondary-color);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  z-index: 3;          /* above stretched link */
}
.archive-btn:hover { transform: scale(1.1); color: #fff;}


/** Messages Module */
.msg-bubble {
  font-family: var(--font-family);
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  transition: background-color .2s ease;
}

/* Your own messages (right side) */
.msg-own {
  background: var(--background-offwhite);
  color: var(--text-dark);
}

/* Incoming messages (left side) */
.msg-other {
  background: var(--background-contrast);
  color: var(--text-dark);
}

.msg-list {
  overflow-x: hidden;
}
