/* ============================================================
   BEGIN ROOT VARIABLES
   ============================================================ */
:root {
  --primary: #46A138;
  --primary-dark: #3d8a2f;
  --secondary: #64748b;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #1d242f;
  --text-light: #64748b;
  --text-dark: #070708;
  --border: #e2e8f0;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --radius: 4px;
  --radius1: 8px;
  --radius2: 10px;
  --radius3: 12px;
  --font-sm: font-size:10px;
  --font-md: font-size:14px;
  --font-lg: font-size:18px;
}

/* John Deere Colors */
:root {
  --jd-green: #20720D;
  --jd-green-light: #367C2B;
  --jd-yellow: #FFDE00;
  --jd-yellow-light: #FFE84D;
  --kuhn-red: #C61E12;
  --milwaukee: #c8102e;
  --jd-construction: #D5A22F;
}
/* ============================================================
   END ROOT VARIABLES
   ============================================================ */



/* ============================================================
   BEGIN GLOBAL RESETS
   ============================================================ */
.font-sm{font-size: 10px;}
.font-md{font-size: 14px;}
.font-lg{font-size: 18px;}

.card p.font-sm{font-size: 10px;}
.card p.font-md{font-size: 14px;}
.card p.font-lg{font-size: 18px;}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}
/* ============================================================
   END GLOBAL RESETS
   ============================================================ */



/* ============================================================
   BEGIN HEADER
   ============================================================ */
header {
  background: var(--jd-green);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header h1 span {
  font-size: .7em;
  font-weight: normal;
}

#menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media screen and (min-width: 425px) and (max-width: 480px) {
  header h1 { font-size: 1rem; }
  header h1 span { font-size: 0.25em; }
}
/* ============================================================
   END HEADER
   ============================================================ */



/* ============================================================
   BEGIN NAVIGATION
   ============================================================ */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 50px;
  z-index: 99;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

nav.show { display: flex; }

nav button {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 110px;
  justify-content: center;
  padding: 0.75rem 0.85rem;
  color: var(--text-light);
  background: var(--background);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

nav button:hover {
  color: var(--text);
  background: #f1f5f9;
  border-color: var(--border);
}

nav button.active {
  color: white;
  background: var(--primary);
  border-color: var(--primary-dark);
}

@media (max-width: 768px) {
  nav { position: static; padding: 0.5rem; font-size: 1.5rem; }
  nav button { flex: 1 1 100%; min-width: auto; }
}
/* ============================================================
   END NAVIGATION
   ============================================================ */



/* ============================================================
   BEGIN LAYOUT / MAIN / VIEW
   ============================================================ */
main {
  padding: 0rem;
  max-width: 1200px;
  margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; }

.view .btn-add .icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
}

section.view h4 { font-size: 1.7rem; margin-bottom: .5rem; }

h2 { font-size: 1.2rem; margin-bottom: .5rem; }
h2.mtd-h2 { text-align:center; }
h2.mtd-h2 span.mtd-title { text-decoration: underline; }
h2 #mtd-date { font-weight: bold !important; }
h2.calign{text-align:center;}
.calign{text-align:center;}
.underline{text-decoration: underline;}
h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}
/* ============================================================
   END LAYOUT / MAIN / VIEW
   ============================================================ */



/* ============================================================
   BEGIN PARTS & BINS
   ============================================================ */
.bin-group {
  margin-bottom: 25px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
}

.bin-header {
  padding: 8px 12px;
  background: #e8e8e8;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrow { font-size: 1rem; width: 16px; display: inline-block; }

.bin-content { padding: 10px 5px 5px 5px; }
.bin-content.collapsed { display: none; }

.low-stock { border-left: 6px solid #d9534f; }

.parts-edit-btn,
.parts-delete-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  background: #2a7fff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.parts-delete-btn {
  background: #d9534f;
}
/* ============================================================
   END PARTS & BINS
   ============================================================ */



/* ============================================================
   BEGIN CARDS
   ============================================================ */
.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  margin-left: .5rem;
  margin-right: .5rem;
}

.card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.card-title,
.card-number {
  font-size: 1rem;
  font-weight: 600;
}

.card-number,
.card-price {
  text-align: right;
  white-space: nowrap;
  color: var(--text-light);
}

.card p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.card p.font-lg {
  font-size: 1.125rem;
  color: var(--text-dark);
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 1rem;
}
.card-buttons{
  display: flex;
  grid-template-columns: 2fr auto;
}
.card-buttons button{border: none;}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.badge.active { background: #dcfce7; color: #166534; }
.badge.completed { background: #dbeafe; color: #1e40af; }
.badge.on-hold { background: #fef3c7; color: #92400e; }
.badge.pending { background: #f1f5f9; color: #475569; }
.badge.high { background: #fee2e2; color: #991b1b; }
.badge.medium { background: #fef3c7; color: #92400e; }
.badge.low { background: #dcfce7; color: #166534; }
/* ============================================================
   END CARDS
   ============================================================ */



/* ============================================================
   BEGIN TASKS
   ============================================================ */
.done { text-decoration: line-through; opacity: 0.6; }

.task-check { width: auto; height: auto; margin: 0; }

.task-text { font-size: 1.1rem; }

.task-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ============================================================
   END TASKS
   ============================================================ */



/* ============================================================
   BEGIN SEARCH & SORT
   ============================================================ */
.search-sort-controls {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.search-help {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.search-input {
  flex: 2;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.2rem;
}

.range-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.sort-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sort-btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sort-btn:hover,
.sort-btn.active {
  background: var(--primary);
}
/* ============================================================
   END SEARCH & SORT
   ============================================================ */



/* ============================================================
   BEGIN BUTTONS
   ============================================================ */
.btn-add {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--jd-green);
  color: white;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-add:hover {
  background: var(--jd-green-light);
  transform: translateY(-2px);
}

.edit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #367C2B;
  color: white;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.edit-btn:hover {
  background: #2B5F22;
  transform: translateY(-2px);
}

.delete-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #C62828;
  color: white;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.delete-btn:hover {
  background: #8E1C1C;
  transform: translateY(-2px);
}

#mtd-update{
  width: 100%;
  padding: 18px;
  font-size: 20px;
  background: var( --primary);
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 25px;
}
#mtd-home{
  width: 100%;
  padding: 18px;
  font-size: 20px;
  background: var(--jd-green);
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 25px;
}

#mtd-sales-card .mtd-history-btn {
  margin-top: 15px;
  padding: 4px 8px;
  background: var(--jd-green-light);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center !important;
  font-size: .9rem;
  text-decoration: none;
}
.mtd-history-btn {
  margin-right: 10px;
  white-space: nowrap;
  width: 50%;
  
}
.mtd-home-btn {
  display: flex;
  gap: 10px;
}

/* ============================================================
   END BUTTONS
   ============================================================ */



/* ============================================================
   BEGIN HOME PAGE
   ============================================================ */
#home { padding: 0; }

#home.view,
#home.view.active,
.view.active {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: .5rem .25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  width: 100%;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.home-icon img,
.home-icon svg {
  width: 40px !important;
  height: 40px !important;
  margin-bottom: 6px;
}

.home-label {
  font-size: 0.70rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

/* Home Page Button Borders */
.home-card.nav-btn.customer-card,
.home-card.nav-btn.parts-card,
.home-card.nav-btn.fluid-card,
.home-card.nav-btn.other_business-card,
.home-card.nav-btn.co-worker-card,
.home-card.nav-btn.tasks-card,
.home-card.nav-btn.notes-card,
.home-card.nav-btn.manufacturer-card {
  border-left: 1px solid var(--jd-green);
  border-bottom: 4px solid var(--jd-green);
  border-right: 3px solid var(--jd-green);
  border-top: 1px solid var(--jd-green);
}

.co-worker-actions.phone{text-align: center;display: inline;color: #232323}
.co-worker-heading{text-align: center;}
/* ============================================================
   END HOME PAGE
   ============================================================ */



/* ============================================================
   BEGIN SEARCH BARS (CUSTOMER / BUSINESS / FLUID)
   ============================================================ */
#customers #customer-search,
#other-business #other-business-search-bar,
#fluid-machine-search, #manufacturer-search, #search-bar-container #parts-search{
  position: sticky;
  background: white;
  width: 100%;
  display: block;
  box-sizing: border-box;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

#customers #customer-search { top: 50px; z-index: 20; }
#other-business #other-business-search-bar { top: 50px; z-index: 10; }
#fluid-machine-search { top: 80px; z-index: 50; padding: 16px; height: 52px; line-height: 52px; font-size: 18px; }
#manufacturer-search{top: 80px; z-index: 50; padding: 16px; height: 52px; line-height: 52px; font-size: 18px;}
#search-bar-container #parts-search{top: 80px; z-index: 50; padding: 16px; height: 52px; line-height: 52px; font-size: 18px;}

#customer-search.search-input,
#other-business-search.search-input {
  padding: 16px 0;
  height: 52px;
  line-height: 52px;
  font-size: 1.2rem;
}

.search-mode-select,
#search-bar-container, #manufacturer-search, #search-bar-container #parts-search {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: var(--background);
  
}

.search-mode-select {  text-align:center;}
#search-bar-container, .search-mode-select { margin-left: .5rem; margin-right: .5rem; }
.search-mode-select.mb{margin-bottom:1rem; }

.calign{text-align:center;}
.search-mode-select{
  position: sticky;
  top: 60px;
  z-index: 50;
  background: var(--background);
  padding: 0;
}
/* ============================================================
   END SEARCH BARS
   ============================================================ */



/* ============================================================
   BEGIN MODALS
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  overflow: hidden;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--surface);
  padding: 1.2rem;
  border-radius: var(--radius);
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  box-sizing: border-box;
  padding-bottom: 80px;
}

.modal-content .row {
  display: flex;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}

.modal-content .row input,
.modal-content .row select {
  min-width: 0;
}

.modal-content .row input[name="city"] { flex: 2; }
.modal-content .row input[name="state"] { flex: 0.8; }
.modal-content .row input[name="zip"] { flex: 1; }

.modal-content .save-btn {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: .7rem 0;
}

.modal-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.modal-content label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.modal-content textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-content button,
.modal-content .save-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.2rem;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  margin-top: 10px;
}

.modal-content button:hover,
.modal-content .save-btn:hover {
  background: var(--primary-dark);
}


/* ============================================================
   END MODALS
   ============================================================ */



/* ============================================================
   BEGIN MTD MODULE
   ============================================================ */
.mtd-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.mtd-label { color: var(--text-light); }
.mtd-value { font-weight: 600; color: var(--text); }

#mtd-progress-bar {
  width: 100%;
  height: 14px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.75rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

#mtd-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 8px;
  transition: width 0.4s ease;
}

#mtd-history-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#mtd-history-table th {
  background: var( --jd-construction);
  color: white;
  padding: 10px;
  text-align: left;
  font-size: 14px;
  display: none;
}
 
#mtd-history-table td {
  padding: 10px;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
}

#mtd-history-table tr:last-child td {
  border-bottom: none;
}

#mtd-history-table button.edit-btn {
  padding: 4px 8px;
  font-size: 12px;
  background: var(--jd-green);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  display: block;
  max-width: 80px
  
}

#mtd-history-table button.edit-btn:hover {
  background: var(--jd-green-light);
}

#mtd-sales-card .mtd-history-btn {
  margin-top: 15px;
  padding: 4px 8px;
  background: var(--jd-green-light);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center !important;
  
}

#mtd-sales-card .mtd-history-btn:hover {
  background: var(--jd-green);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile reflow */
@media (max-width: 600px) {
  #mtd-history-table thead { display: none; }

  #mtd-history-table tr {
	display: block;
	margin-bottom: 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 8px;
	background: #fff;
  }

  #mtd-history-table td {
	display: flex;
	justify-content: space-between;
	padding: 6px 8px;
	border: none !important;
	font-size: 14px;
  }

  #mtd-history-table td::before {
	content: attr(data-label);
	font-weight: 600;
	color: #333;
  }
}

/* ============================================================
   END MTD MODULE
   ============================================================ */
   

   
   /* ============================================================
	  BEGIN SVG FILTER ICONS
	  ============================================================ */
   
   .svg-filter {
	 position: relative;
	 width: 100%;
   }
   
   .svg-filter input,
   .svg-filter select {
	 padding-left: 40px !important;
   }
   
   .svg-filter::before {
	 content: "";
	 position: absolute;
	 left: 12px;
	 top: 50%;
	 width: 18px;
	 height: 18px;
	 transform: translateY(-50%);
	 background: #777;
	 mask-size: contain;
	 mask-repeat: no-repeat;
	 mask-position: center;
   }
   
   .svg-search::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <circle cx="11" cy="11" r="7"/>\
   <line x1="16" y1="16" x2="22" y2="22"/>\
   </svg>');
   }
   
   .svg-topic::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <path d="M4 4h10l6 6-10 10-6-6z"/>\
   <circle cx="9" cy="9" r="2"/>\
   </svg>');
   }
   
   .svg-customer::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <circle cx="12" cy="8" r="4"/>\
   <path d="M4 20c1.5-3 4-4.5 8-4.5s6.5 1.5 8 4.5"/>\
   </svg>');
   }
   
   .svg-part::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <path d="M8 3h4a2 2 0 0 1 2 2v1a2 2 0 1 0 0 4v1a2 2 0 0 1-2 2h-1a2 2 0 1 0-4 0H6a2 2 0 0 1-2-2V9a2 2 0 1 0 0-4V5a2 2 0 0 1 2-2z"/>\
   </svg>');
   }
   
   .svg-date::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <rect x="3" y="5" width="18" height="16" rx="2"/>\
   <line x1="3" y1="10" x2="21" y2="10"/>\
   <line x1="9" y1="3" x2="9" y2="7"/>\
   <line x1="15" y1="3" x2="15" y2="7"/>\
   </svg>');
   }
   
   .svg-sort::before {
	 mask-image: url('data:image/svg+xml;utf8,\
   <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="black" stroke-width="2" viewBox="0 0 24 24">\
   <path d="M8 4l-3 3 3 3"/>\
   <line x1="5" y1="7" x2="19" y2="7"/>\
   <path d="M16 20l3-3-3-3"/>\
   <line x1="5" y1="17" x2="19" y2="17"/>\
   </svg>');
   }
   
   /* ============================================================
	  END SVG FILTER ICONS
	  ============================================================ */
   
   
   /* ============================================================
   BEGIN CLEANUP
   ============================================================ */
   
   section#other-business, section#parts, section#fluid-machines, section#other-business, section#co-workers, section#manufacturers, section#notes, section#customers, main.parts.page{
     padding-left: .5rem;
     padding-right: .5rem;
   }
   
   section.view{}
   
   .btn-add{
     margin-top:.5rem;
     margin-bottom:.5rem;
     margin-left: .5rem;
   }
   .card .edit-btn,
   .card .delete-btn {
     margin-right: 8px;    /* spacing between them */
   }
   
   .card .edit-btn + .delete-btn {
     margin-left: 0;       /* prevents double spacing */
   }
   .edit-co-worker.edit-btn{float:right;}
   .bin-btn {
     padding: 6px 12px;
     background: #007bff;
     color: white;
     border: none;
     border-radius: 4px;
     cursor: pointer;
   }
   
   .bin-btn:hover {
     background: #0056b3;
   }
   .mode-btn{
     padding: 6px 12px;
      background: var(--jd-green);
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      margin-top: .5rem;
   }
   .page-header h4{
     
   }
   
   /* Search By: Part # */
   .mode-btn.sbp {
     background: var(--jd-green);
     margin-right: .5rem;
   }
   
   /* Search By: Bin */
   .mode-btn.sbb {
    background: var(--jd-construction);
    margin-right: .5rem;
   }
   
   /* Search By: Description */
   .mode-btn.sbd {
     background: var(--milwaukee);
   }
   
   
   /* Co‑worker card action icons */
   
   .co-worker-buttons .action-btn img {
     width: 1.4rem;
     height: 1.4rem;
     display: block;
   }
   .co-worker-actions {
     display: flex;
     align-items: center;
     text-align: center;
     gap: 8px;
     white-space: nowrap;
     font-size: .9rem;
     margin-left: auto;
     margin-right: auto;
   }
    
    .action-btn {
      display: inline-flex;
      align-items: center;
      text-align: center;
      justify-content: center;
      width: 60px;
      height: 60px;
      background: #f0f0f0;
      border-radius: 32px;
      margin-left: 6px;
      border: 1px solid #bbb;
    }
    .action-btn.phone{
      margin-right: 18px;
    }
    .action-btn.messages{
      margin-left: 18px;
    }
    .action-btn img {
      width: 42px;
      height: 42px;
    }
    .co-worker-buttons{padding-top:10px;padding-bottom:10px;text-align: center;}
    p.co-worker-actions.heading{
      text-decoration: underline;
      font-weight: 800;
      margin-bottom: 0px;
      color: #000000;
      font-size: .9rem;
      text-align: center;
    }
    a.co-email{
      color: var(--jd-green);
      text-decoration: none;
      font-size: .9rem;
      clear:both;
    }
   /* ============================================================
    END CLEANUP
    ============================================================ */
    
    /* ============================================================
    BEGIN VAULT 
    ============================================================ */
    /* ============================
       Vault Modal Base
    ============================ */
    .vault-modal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 500;
        align-items: center;
        justify-content: center;
    }
    
    .vault-modal.open {
        display: flex;
    }
    
    .vault-modal-content {
        background: #ffffff;
        padding: 20px;
        width: 92%;
        max-width: 420px;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        border-left: 6px solid #367C2B; /* John Deere Green */
    }
    
    .vault-modal-content h3 {
        margin-top: 0;
        color: #2b5f22;
        font-size: 20px;
        font-weight: bold;
    }
    
    .vault-modal-content label {
        display: block;
        margin-top: 12px;
        font-weight: bold;
        color: #333;
    }
    
    .vault-modal-content input {
        width: 100%;
        padding: 10px;
        margin-top: 4px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 15px;
    }
    
    /* ============================
       Buttons
    ============================ */
    .vault-modal-actions {
        margin-top: 18px;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }
    
    .vault-btn {
        padding: 10px 16px;
        border-radius: 6px;
        border: none;
        font-size: 15px;
        cursor: pointer;
        font-weight: bold;
    }
    
    /* Save / Confirm (Green) */
    .vault-btn.save {
        background: #367C2B;
        color: white;
    }
    .vault-btn.save:hover {
        background: #2b5f22;
    }
    
    /* Cancel (Gray) */
    .vault-btn.cancel {
        background: #ddd;
        color: #333;
    }
    .vault-btn.cancel:hover {
        background: #c7c7c7;
    }
    
    /* Delete (Red) */
    .vault-btn.delete {
        background: #C62828;
        color: white;
    }
    .vault-btn.delete:hover {
        background: #a71f1f;
    }

    /* ============================
       Vault Page Layout
    ============================ */
    
    #vault-home {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .btn-vault{
      display: inline;
      margin-top: 2rem;
    }
    #vault .page-header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    #vault-credentials-container {
        padding: 0 .5rem;
    }
    
    /* User Section */
    .vault-user-section {
        margin-bottom: 1.5rem;
        background: var(--surface);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 12px;
        border-left: 4px solid var(--jd-green);
    }
    
    .vault-user-section h2 {
        font-size: 1.2rem;
        margin-bottom: .75rem;
        color: var(--jd-green);
        font-weight: 700;
    }
    
    /* Credential List */
    .vault-cred-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* Credential Card */
    .vault-cred-item {
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 12px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }
    
    .vault-cred-service {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-dark);
    }
    
    .vault-cred-username,
    .vault-cred-password {
        font-size: .9rem;
        color: var(--text-light);
        margin-top: 4px;
    }
    
    /* Actions */
    .vault-cred-actions {
        margin-top: 10px;
        display: flex;
        gap: 8px;
    }
    
    .vault-edit-btn,
    .vault-delete-btn, .vault-save-btn, .vault-cancel-btn {
        padding: 6px 10px;
        border-radius: 6px;
        font-size: .8rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
    }
    
    /* Edit Button */
    .vault-edit-btn, .vault-save-btn{
        background: var(--jd-green-light);
        color: white;
    }
    .vault-edit-btn:hover, .vault-save-btn:hover {
        background: var(--jd-green);
    }
    
    /* Delete Button */
    .vault-delete-btn, .vault-cancel-btn{
        background: #C62828;
        color: white;
    }
    .vault-delete-btn:hover, .vault-cancel-btn:hover {
        background: #8E1C1C;
    }
    
    /* Add Button */
    .vault-add-btn {
        margin-top: 12px;
        background: var(--jd-green);
        color: white;
        padding: 8px 12px;
        border-radius: var(--radius);
        border: none;
        cursor: pointer;
        font-size: .9rem;
        font-weight: 600;
        transition: background .2s ease, transform .1s ease;
    }
    
    .vault-add-btn:hover {
        background: var(--jd-green-light);
        transform: translateY(-2px);
    }
    
    /* Empty State */
    .vault-empty {
        padding: 10px;
        font-size: .9rem;
        color: var(--text-light);
        font-style: italic;
    }
/* ============================
       Vault Login Page Layout
    ============================ */
    
    #vault-login.view {
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .vault-login-wrapper {
        padding: 1rem;
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }
    
    .vault-login-card {
        background: var(--surface);
        padding: 1.5rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        width: 100%;
        max-width: 420px;
        border-left: 6px solid var(--jd-green);
    }
    
    .vault-login-title {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--jd-green);
        margin-bottom: 1rem;
    }
    
    /* Inputs */
    #vault-login-form label {
        display: block;
        font-size: 1.1rem;
        margin-bottom: 6px;
        font-weight: 600;
        color: var(--text);
    }
    
    #vault-login-form input {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 14px;
        box-sizing: border-box;
    }
    
    /* Error Message */
    .vault-login-error {
        color: var(--danger);
        font-size: .9rem;
        margin-bottom: 10px;
        min-height: 18px;
    }
    
    /* Login Button */
    .vault-login-btn {
        width: 100%;
        padding: 14px;
        font-size: 1.2rem;
        border: none;
        border-radius: var(--radius);
        background: var(--jd-green);
        color: white;
        cursor: pointer;
        font-weight: 600;
        transition: background .2s ease, transform .1s ease;
    }
    
    .vault-login-btn:hover {
        background: var(--jd-green-light);
        transform: translateY(-2px);
    }
/* ============================
       Vault Credential Cards
    ============================ */
    
    .vault-cred-item {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: var(--shadow);
    }
    
    /* Header */
    .vault-cred-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .vault-cred-service {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-dark);
    }
    
    /* Actions */
    .vault-cred-actions {
        display: flex;
        gap: 8px;
    }
    
    .vault-edit-btn,
    .vault-delete-btn {
        padding: 6px 10px;
        border-radius: 6px;
        font-size: .8rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
    }
    
    /* Edit Button */
    .vault-edit-btn {
        background: var(--jd-green-light);
        color: white;
    }
    .vault-edit-btn:hover {
        background: var(--jd-green);
    }
    
    /* Delete Button */
    .vault-delete-btn {
        background: #C62828;
        color: white;
    }
    .vault-delete-btn:hover {
        background: #8E1C1C;
    }
    
    /* Body */
    .vault-cred-body {
        margin-top: 6px;
    }
    
    .vault-cred-row {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }
    
    .vault-cred-label {
        font-size: .85rem;
        color: var(--text-light);
    }
    
    .vault-cred-value {
        font-size: .9rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    /* ============================================================
    END VAULT
    ============================================================ */
    
   /* ============================================================
   BEGIN FILTERS
   ============================================================ */ 
    
  #filter-xref .xref-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  #filter-xref .xref-brand-select,
  #filter-xref .xref-search {
    flex: 1;
  }
  
  #xref-results .xref-card {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
  }
  
  .xref-card h4 {
    margin: 0 0 8px 0;
  }
  
  .xref-card .xref-line {
    margin: 4px 0;
  }
  
  .xref-copy-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: var(--jd-green);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    border: none;
  }
  
  /* ============================================================
   END FILTERS
   ============================================================ */ 
   
  
   /* ============================================================
	  BEGIN MEDIA QUERIES
	  ============================================================ */
   
   @media (max-width: 768px) {
	 .search-row { flex-direction: column; }
	 .search-input, .range-input { width: 100%; }
   }
   
   @media (max-width: 480px) {
	 .sort-buttons { flex-direction: column; }
	 .sort-btn { width: 100%; }
   }
   
   @media (min-width: 768px) {
	 .home-grid { grid-template-columns: repeat(4, 1fr); }
	 .stats-grid { grid-template-columns: repeat(4, 1fr); }
	 .card-grid { grid-template-columns: repeat(2, 1fr); }
	 .btn-add { width: auto; }
	 #menu-toggle { display: none; }
   }
   
   @media (min-width: 1024px) {
	 .card-grid { grid-template-columns: repeat(4, 1fr); }
   }
   
   /* Mobile hamburger nav */
   #menu-toggle {
	 display: none;
	 font-size: 32px;
	 background: none;
	 border: none;
	 cursor: pointer;
	 padding: 10px;
   }
   
   @media (max-width: 768px) {
	 #menu-toggle { display: block; }
   
	 #main-nav {
	   display: none;
	   flex-direction: column;
	   background: #333;
	   padding: 10px;
	   font-size: 1.5rem;
	 }
   #main-nav.show {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 10px;
   }
   
	 
   
	 #main-nav .nav-btn {
	   width: 100%;
	   text-align: center;
	   padding: 8px;
	   color: white;
	   background: none;
	   border: none;
	   font-size: 14px;
       text-decoration: none;
       background: var(--jd-green);
       border-radius: var(--radius);
	 }
   #main-nav .nav-btn:hover{
     background: var(--jd-construction);
   }
   #main-nav .nav-btn.current{
      background: var(--jd-construction);
    }
  
   }
   
   /* ============================================================
	  END MEDIA QUERIES
	  ============================================================ */