/* Modern Dashboard UI - Desktop Styles
   Version: v20251206-02
   Last Updated: 2025-12-06
*/

:root {
 /* Corporate Color Palette - Professional Blue Scheme */
 --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); 
 --primary-color: #2563eb; 
 --primary-dark: #1e40af; 
 --primary-light: #3b82f6;
 --success-color: #10b981; 
 --warning-color: #f59e0b; 
 --danger-color: #ef4444; 
 --light-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
 --card-bg: rgba(255, 255, 255, 0.95); 
 --glass-bg: rgba(255, 255, 255, 0.85); 
 --border-color: rgba(148, 163, 184, 0.2); 
 --text-primary: #1e293b; 
 --text-secondary: #475569; /* Kontrast artırıldı */
 --text-muted: #64748b;    /* Kontrast artırıldı */
 /* Color Variants */ 
 --blue-color: #2563eb; 
 --green-color: #10b981; 
 --indigo-color: #4f46e5; 
 --orange-color: #f59e0b; 
 /* Modern Shadows */ 
 --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04); 
 --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08); 
 --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12); 
 --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.15); 
 /* Modern Spacing */ 
 --border-radius: 16px; 
 --border-radius-sm: 8px; 
 --border-radius-lg: 24px; 
 --spacing-xs: 0.5rem; 
 --spacing-sm: 0.75rem; 
 --spacing-md: 1rem; 
 --spacing-lg: 1.5rem; 
 --spacing-xl: 2rem; 
 /* Tipografik Ölçek (1.250 - Major Third) */
 --font-size-xs: 0.64rem;  /* ~10.24px */
 --font-size-sm: 0.8rem;   /* ~12.8px */
 --font-size-base: 1rem;   /* 16px (default) */
 --font-size-md: 1.25rem;  /* 20px */
 --font-size-lg: 1.563rem; /* ~25px */
 --font-size-xl: 1.953rem; /* ~31px */
 --font-size-xxl: 2.441rem;/* ~39px */

 --spacing-xl: 2rem; 
 /* Layout - WITH TOP HEADER */ 
 --app-vh: 100vh; 
 --header-height: 65px;
 --sidebar-width: 180px; 
 --viewer-sidebar-width: 250px; 
 /* Panel Heights for Viewer */ 
 --selection-form-content-height: 190px; 
 --panel-header-height: 35px; 
 --panel-gap: var(--spacing-md); 
}
* { 
 box-sizing: border-box; 
 -webkit-user-select: none; /* Safari */
 -moz-user-select: none; /* Firefox */
 -ms-user-select: none; /* IE10+/Edge */
 user-select: none; /* Standard */
}

/* Allow text selection for input fields and editable content */
input, textarea, [contenteditable="true"] {
 -webkit-user-select: text;
 -moz-user-select: text;
 -ms-user-select: text;
 user-select: text;
}

body { 
 background: var(--light-bg); 
 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
 color: var(--text-primary); 
 min-height: var(--app-vh); 
 margin: 0; 
 overflow-x: hidden;
 line-height: 1.6;
 font-weight: 400; 
 -webkit-font-smoothing: antialiased;
 -moz-osx-font-smoothing: grayscale;
}

/* Main App Wrapper - TWO COLUMN LAYOUT */ 
.app-wrapper { 
 display: grid; 
 grid-template-columns: var(--sidebar-width) 1fr; 
 min-height: var(--app-vh); 
 background: var(--light-bg); 
 width: 100vw; 
}

/* ============================================================================
   APP HEADER - TOP OF MAIN CONTENT ONLY
   ============================================================================ */
.app-header {
 position: sticky;
 top: 0;
 height: var(--header-height);
 background: var(--card-bg);
 backdrop-filter: blur(20px);
 border-bottom: 1px solid var(--border-color);
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0 1.5rem;
 z-index: 100;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Header Left - Current Machine Info */
.app-header-left {
 flex: 1;
 display: flex;
 align-items: center;
}

/* Current Machine Info - Simple Text Display with Badge */
.current-machine-info {
 display: flex;
 align-items: center;
 gap: 0.5rem;
}

.current-machine-info .machine-label {
 color: var(--text-muted);
 font-size: 0.8rem;
 font-weight: 400;
}

.current-machine-info .machine-name {
 color: var(--text-primary);
 font-weight: 600;
 font-size: 0.85rem;
}

.current-machine-info .machine-badge {
 margin-left: 0.3rem;
}

/* Change Machine Button */
.btn-change-machine {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 padding: 0.5rem 0.9rem;
 background: var(--primary-color);
 color: white;
 border: none;
 border-radius: 6px;
 font-size: 0.75rem;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.2s ease;
}

.btn-change-machine:hover {
 background: var(--primary-dark);
 transform: translateY(-1px);
 box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-change-machine i {
 font-size: 0.75rem;
}

/* Header Right - Actions */
.app-header-right {
 display: flex;
 align-items: center;
 gap: 1rem;
}

.header-btn {
 width: 40px;
 height: 40px;
 border: none;
 background: transparent;
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 color: var(--text-secondary);
 transition: all 0.2s ease;
 position: relative;
}

.header-btn:hover {
 background: rgba(102, 126, 234, 0.1);
 color: var(--primary-color);
 transform: translateY(-1px);
}

.header-btn i {
 font-size: 1.1rem;
}

.notification-dot {
 position: absolute;
 top: 8px;
 right: 8px;
 width: 8px;
 height: 8px;
 background: var(--danger-color);
 border-radius: 50%;
 border: 2px solid var(--card-bg);
 animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
 0%, 100% { opacity: 1; transform: scale(1); }
 50% { opacity: 0.7; transform: scale(1.1); }
}

/* Header User Menu */
.header-user-menu {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding-left: 1rem;
 border-left: 1px solid var(--border-color);
}

.header-user-info {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 padding: 0.5rem 1rem;
 background: rgba(102, 126, 234, 0.05);
 border-radius: 8px;
 cursor: pointer;
 transition: all 0.2s ease;
}

.header-user-info:hover {
 background: rgba(102, 126, 234, 0.1);
}

.header-user-info i {
 font-size: 1.4rem;
 color: var(--primary-color);
}

.header-user-info span {
 color: var(--text-primary);
 font-weight: 600;
 font-size: 0.85rem;
}
/* ============================================================================
   LEFT SIDEBAR - NAVIGATION (FULL HEIGHT)
   ============================================================================ */
.dashboard-sidebar { 
 position: fixed; 
 top: 0;
 left: 0; 
 width: var(--sidebar-width); 
 height: 100vh;
 background: var(--card-bg);
 backdrop-filter: blur(10px);
 border-right: 1px solid var(--border-color);
 overflow-y: hidden;
 display: flex;
 flex-direction: column;
 padding: 0.5rem 0.4rem;
 z-index: 1000;
 box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
}
.logo-section { 
 display: flex; 
 flex-direction: row;
 align-items: center; 
 gap: 0.6rem; 
 margin-bottom: 0.5rem; 
 padding: 0.75rem 0.6rem;
 border-bottom: 1px solid var(--border-color);
 cursor: pointer;
}

.logo-section:hover {
 background: rgba(102, 126, 234, 0.05);
}
.logo-icon { 
 width: 32px; 
 height: 32px; 
 background: var(--primary-gradient); 
 border-radius: 8px; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 color: white; 
 font-size: 1rem; 
}
.logo-text { 
 text-align: center;
 display: none; /* Logo metni gizle - daha kompakt */
}
.logo-text h3 { 
 margin: 0; 
 font-size: 0.8rem; 
 font-weight: 700; 
 color: var(--text-primary); 
}
.logo-text span { 
 color: var(--primary-color); 
 font-size: 0.65rem; 
 font-weight: 500; 
}
/* Navigation - NO SCROLL COMPACT */ 
.dashboard-nav {
 display: flex;
 flex-direction: column;
 gap: 0;
 flex: 1;
 overflow: hidden;
}

.nav-group { 
 margin-bottom: 0;
 padding: 0.25rem 0;
}

/* Group Header - Ultra Compact */
.nav-group-header {
 display: flex;
 align-items: center;
 gap: 0.35rem;
 padding: 0.3rem 0.5rem;
 margin-bottom: 0.25rem;
 font-size: 0.6rem;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: 0.05em;
 color: var(--text-muted);
 background: rgba(102, 126, 234, 0.05);
 border-radius: 4px;
}

.nav-group-header i {
 font-size: 0.65rem;
 color: var(--primary-color);
 opacity: 0.7;
}

.nav-group-header.admin {
 background: rgba(139, 92, 246, 0.08);
}

.nav-group-header.admin i {
 color: var(--indigo-color);
}

/* Navigation Divider - Compact */
.nav-divider {
 height: 1px;
 background: linear-gradient(90deg, transparent, var(--border-color), transparent);
 margin: 0.4rem 0.5rem;
 opacity: 0.5;
}

/* Navigation Items - Ultra Compact */
.nav-item { 
 display: flex; 
 flex-direction: column; 
 align-items: center; 
 gap: 0.15rem; 
 padding: 0.35rem 0.2rem; 
 border-radius: 5px; 
 color: var(--text-secondary); 
 text-decoration: none; 
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
 margin-bottom: 0.15rem;
 margin-left: 0.2rem;
 margin-right: 0.2rem;
 position: relative; 
 font-size: 0.6rem; 
 text-align: center;
 font-weight: 500;
}

.nav-item:hover { 
 background: rgba(102, 126, 234, 0.12); 
 color: var(--primary-color);
 transform: translateX(2px);
 box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.nav-item.active { 
 background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
 color: white; 
 box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
 transform: translateX(3px);
 font-weight: 600;
}

/* ============================================================================
   CART LIST - DESKTOP & SHARED STYLES
   ============================================================================ */
.cart-list-area {
  display: block;
  padding: var(--spacing-sm);
  overflow-y: auto;
  background: var(--card-bg);
}

/* Optimal Okunabilir Sepet Tasarımı */
.cart-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.cart-item-machine-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 600;
  color: #dc2626;
  background: transparent;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.cart-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #667eea;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cart-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.cart-item:hover::before {
  opacity: 1;
}

.cart-item-active {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.04);
}

.cart-item-active::before {
  opacity: 1;
}

/* İçerik Alanı */
.cart-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

/* Ürün Adı */
.cart-item-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Detaylar */
.cart-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.cart-detail-badge {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  background: #f1f5f9;
  border-radius: 3px;
  font-size: 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.cart-detail-badge.primary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-weight: 600;
}

/* Sağ Taraf Aksiyonlar */
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.15rem 0.25rem;
}

.cart-qty-btn {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  font-family: Arial, sans-serif;
}

.cart-qty-btn:hover {
  background: #667eea;
  border-color: #667eea;
  color: #ffffff;
}

.cart-qty-btn:active {
  transform: scale(0.95);
}

.cart-qty-value {
  min-width: 18px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
}

.cart-item-delete {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: #dc2626;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  font-family: Arial, sans-serif;
}

.cart-item-delete:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.cart-item-delete:active {
  transform: scale(0.95);
}

/* Alt Bölüm - Kontroller */
.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.cart-qty-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-qty-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  height: 32px;
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 1);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.qty-btn:active {
  background: rgba(102, 126, 234, 0.2);
  transform: scale(0.95);
}

.qty-input {
  width: 45px;
  height: 32px;
  border: none;
  border-left: 1px solid rgba(226, 232, 240, 1);
  border-right: 1px solid rgba(226, 232, 240, 1);
  text-align: center;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  outline: none;
}

.qty-input:focus {
  background: rgba(102, 126, 234, 0.03);
}

/* Aksiyon Butonları */
.cart-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-show-in-svg {
  width: 36px;
  height: 32px;
  border: 1.5px solid rgba(226, 232, 240, 1);
  background: #ffffff;
  color: var(--primary-color);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-show-in-svg:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-remove-from-cart {
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 6px;
  background: #ffffff;
  color: var(--danger-color);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-remove-from-cart:hover {
  background: #fef2f2;
  border-color: var(--danger-color);
  transform: translateY(-1px);
}

.btn-remove-from-cart i {
  font-size: 0.7rem;
}

.empty-state-compact { text-align: center; padding: 1.5rem; }
.empty-state-compact .icon { font-size: 2rem; color: var(--text-muted); }
.empty-state-compact .text { color: var(--text-secondary); }

.nav-item.active::before {
 content: '';
 position: absolute;
 left: -0.25rem;
 top: 50%;
 transform: translateY(-50%);
 width: 3px;
 height: 70%;
 background: white;
 border-radius: 0 3px 3px 0;
}

.nav-item i { 
 width: 14px; 
 text-align: center; 
 font-size: 0.75rem;
 transition: transform 0.3s ease;
}

.nav-item:hover i {
 transform: scale(1.08);
}

.nav-item.active i {
 transform: scale(1.12);
}

.nav-item span { 
 line-height: 1.1; 
 display: block;
}

/* Notification Badge */
.notification-badge { 
 background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
 color: white; 
 font-size: 0.5rem; 
 padding: 0.1rem 0.25rem; 
 border-radius: 8px; 
 font-weight: 700; 
 position: absolute; 
 top: 0.25rem; 
 right: 0.25rem;
 box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
 animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
 0%, 100% { 
   transform: scale(1); 
   opacity: 1;
 }
 50% { 
   transform: scale(1.05); 
   opacity: 0.9;
 }
}
/* User Profile - NO SCROLL COMPACT */ 
.user-profile { 
 margin-top: auto; 
 padding-top: 0.5rem; 
 border-top: 1px solid var(--border-color); 
 text-align: center;
 flex-shrink: 0;
}
.user-avatar img { 
 width: 24px; 
 height: 24px; 
 border-radius: 5px; 
 object-fit: cover; 
 margin: 0 auto; 
}
.user-info { 
 margin: 0.3rem 0; 
}
.user-info h6 { 
 margin: 0; 
 font-weight: 600; 
 color: var(--text-primary); 
 font-size: 0.65rem;
 line-height: 1.2;
}
.user-info span { 
 color: var(--text-muted); 
 font-size: 0.55rem; 
}
.btn-upgrade { 
 width: 100%; 
 padding: 0.35rem; 
 background: linear-gradient(135deg, #f59e0b, #d97706); 
 color: white; 
 border: none; 
 border-radius: 4px; 
 font-weight: 600; 
 font-size: 0.58rem; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 gap: 0.2rem; 
 transition: all 0.2s ease; 
}
.btn-upgrade:hover { 
 transform: translateY(-1px); 
 box-shadow: var(--shadow-md); 
}
/* ============================================================================
   MAIN CONTENT AREA (RIGHT SIDE)
   ============================================================================ */
.dashboard-main { 
 margin-left: var(--sidebar-width);
 min-height: 100vh;
 display: flex;
 flex-direction: column;
 width: calc(100vw - var(--sidebar-width)); 
 max-width: none; 
 background: var(--light-bg);
}
/* Page Content - BELOW HEADER (NO SCROLL HERE) */ 
.page-content { 
 display: none; 
 flex: 1;
 padding: 0.7rem;
 width: 100%; 
 max-width: none; 
 min-width: 0; 
 overflow: hidden; /* Main area no scroll */
 height: calc(100vh - var(--header-height));
}
.page-content.active { 
 display: flex;
 flex-direction: column;
 width: 100%; 
}
/* Dashboard Header - COMPACT */ 
.dashboard-header { 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 margin-bottom: 0.6rem; 
 padding-bottom: 0.5rem; 
 border-bottom: 1px solid var(--border-color); 
 flex-wrap: wrap; 
 gap: 0.75rem; 
 width: 100%; 
}
.header-left h1 { 
 font-size: 1.1rem; 
 font-weight: 700; 
 margin: 0; 
 color: var(--text-primary); 
}
.subtitle { 
 color: var(--text-muted); 
 font-size: 0.7rem; 
}
.header-right { 
 display: flex; 
 align-items: center; 
 gap: 0.75rem; 
 flex-wrap: wrap; 
}
.date-info, .time-info { 
 display: flex; 
 align-items: center; 
 gap: 0.3rem; 
 color: var(--text-secondary); 
 font-size: 0.75rem; 
 background: var(--glass-bg); 
 padding: 0.3rem 0.6rem; 
 border-radius: 4px; 
 border: 1px solid var(--border-color); 
 white-space: nowrap; 
}
.btn-custom { 
 background: var(--primary-color); 
 color: white; 
 border: none; 
 padding: 0.3rem 0.8rem; 
 border-radius: 4px; 
 font-weight: 500; 
 font-size: 0.75rem; 
 transition: all 0.2s ease; 
 white-space: nowrap; 
}
.btn-custom:hover { 
 background: var(--primary-dark); 
 transform: translateY(-1px); 
}
/* KPI Cards - COMPACT (NO SCROLL) */ 
.kpi-cards { 
 display: grid; 
 grid-template-columns: repeat(4, 1fr); 
 gap: 0.7rem; 
 margin-bottom: 0.7rem; 
 width: 100%;
 flex-shrink: 0; /* Don't shrink */
}
.kpi-card { 
 background: var(--card-bg); 
 backdrop-filter: blur(20px); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius); 
 padding: 0.75rem; 
 box-shadow: var(--shadow-glass); 
 display: flex; 
 align-items: center; 
 gap: 0.6rem; 
 transition: all 0.3s ease; 
 min-height: 70px; 
 width: 100%; 
}
.kpi-card:hover { 
 transform: translateY(-2px); 
 box-shadow: var(--shadow-lg); 
}
.kpi-icon { 
 width: 36px; 
 height: 36px; 
 border-radius: 6px; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 color: white; 
 font-size: 1rem; 
 flex-shrink: 0; 
}
.kpi-icon.blue { background: linear-gradient(135deg, var(--blue-color), #2563eb); }
.kpi-icon.green { background: linear-gradient(135deg, var(--green-color), #059669); }
.kpi-icon.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.kpi-icon.indigo { background: linear-gradient(135deg, var(--indigo-color), #4338ca); }
.kpi-content { 
 flex: 1; 
 min-width: 0; 
}
.kpi-content h3 { 
 font-size: 1.4rem; 
 font-weight: 700; 
 margin: 0; 
 color: var(--text-primary); 
 line-height: 1; 
}
.kpi-content p { 
 margin: 0.2rem 0; 
 color: var(--text-secondary); 
 font-weight: 500; 
 font-size: 0.7rem; 
}
.kpi-change { 
 font-size: 0.6rem; 
 display: flex; 
 align-items: center; 
 gap: 0.15rem; 
}
.kpi-change.positive { color: var(--success-color); } 
.kpi-change.negative { color: var(--danger-color); } 
.kpi-change.neutral { color: var(--text-muted); } 

/* User Machine Registrations Table */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.modern-table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modern-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.modern-table tbody tr {
  transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
  background-color: #f8fafc;
  transform: translateX(2px);
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

.modern-table code {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-family: 'Courier New', monospace;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modern-card {
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.modern-card:hover {
  box-shadow: var(--shadow-md);
}

/* Form Control Static */
.form-control-static {
  padding: 0.5rem 0;
  margin: 0;
  color: #1e293b;
  font-size: 0.95rem;
  min-height: 1.5rem;
}

.form-control-static:empty::before {
  content: '-';
  color: #94a3b8;
}

/* Profile Avatar */
.profile-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Card Header */
.card-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 2px solid #e2e8f0;
}

.card-header h5 {
  margin: 0;
  color: #475569;
  font-weight: 600;
  font-size: 1rem;
}

/* Content Wrapper */
.content-wrapper {
  padding: 1.5rem;
}

/* Registrations Stats */
.registrations-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.stat-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.stat-icon.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-icon.bg-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.bg-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-info h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.stat-info p {
  margin: 0;
  font-size: 0.813rem;
  color: #64748b;
  font-weight: 500;
}

/* Login Logs Stats */
.login-logs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-icon.bg-indigo {
  background: linear-gradient(135deg, var(--indigo-color), #4338ca);
}

/* Logs Filters */
.logs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

/* Login Logs Table */
.login-logs-table {
  width: 100%;
}

.login-logs-table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 600;
  color: #475569;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.login-logs-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.login-logs-table tbody tr:hover {
  background: #f8fafc;
}

.log-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.log-action-badge.login {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.log-action-badge.login i {
  color: #16a34a;
}

.log-action-badge.logout {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.log-action-badge.logout i {
  color: #d97706;
}

.log-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.log-user-info strong {
  font-size: 0.875rem;
  color: #1e293b;
}

.log-user-info small {
  font-size: 0.75rem;
  color: #64748b;
}

.log-user-agent {
  font-size: 0.75rem;
  color: #64748b;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
}

.log-timestamp {
  font-size: 0.813rem;
  color: #475569;
  white-space: nowrap;
}

.log-ip {
  font-family: 'Courier New', monospace;
  font-size: 0.813rem;
  color: #64748b;
  background: #f8fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Logs Pagination */
.logs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 2px solid #f1f5f9;
}

.logs-pagination-info {
  font-size: 0.875rem;
  color: #64748b;
}

.logs-pagination-info strong {
  color: #1e293b;
  font-weight: 600;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-load-more:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-load-more i {
  font-size: 1rem;
}

/* Registrations Grid (Card View) */
.registrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.registration-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.registration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.registration-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.registration-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.registration-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.registration-card-title {
  flex: 1;
  min-width: 0;
}

.registration-card-title h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-card-title p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  font-family: 'Courier New', monospace;
}

.registration-card-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.registration-card-body {
  margin-bottom: 1rem;
}

.registration-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.registration-info-row i {
  width: 20px;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.registration-info-label {
  color: #64748b;
  min-width: 80px;
}

.registration-info-value {
  color: #1e293b;
  font-weight: 500;
  flex: 1;
}

.registration-card-footer {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.registration-card-footer .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  font-size: 0.813rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.registration-card-footer .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
}

.registration-card-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.registration-card-footer .btn-outline {
  background: white;
  color: var(--primary-color);
  border: 2px solid #e2e8f0;
}

.registration-card-footer .btn-outline:hover {
  background: #f8fafc;
  border-color: var(--primary-color);
}

/* Loading State */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #94a3b8;
}

.loading-state i {
  color: var(--primary-color);
  opacity: 0.6;
}

.loading-state p {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.empty-state i {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.empty-state .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Professional Table View */
.professional-table-container {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-bottom: 3px solid var(--primary-color);
}

.table-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.table-title i {
  font-size: 1.125rem;
  color: var(--primary-color);
}

.table-actions {
  display: flex;
  gap: 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.search-box input {
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  width: 250px;
  transition: all 0.3s ease;
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.professional-table-wrapper {
  overflow-x: auto;
}

.professional-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.professional-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.professional-table thead th {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.professional-table thead .th-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.professional-table thead .th-content i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.professional-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

.professional-table tbody tr:hover {
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: inset 4px 0 0 var(--primary-color);
}

.professional-table tbody td {
  padding: 1.25rem 1.5rem;
  color: #334155;
  font-size: 0.875rem;
  vertical-align: middle;
}

.professional-table .col-number {
  width: 60px;
  text-align: center;
  font-weight: 600;
  color: #64748b;
}

.professional-table .col-machine {
  min-width: 280px;
}

.professional-table .col-dates {
  min-width: 200px;
}

.professional-table .col-status {
  width: 120px;
  text-align: center;
}

.professional-table .col-actions {
  width: 180px;
  text-align: right;
}

.machine-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.machine-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.machine-info-details h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.938rem;
  font-weight: 600;
  color: #1e293b;
}

.machine-info-details p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  font-family: 'Courier New', monospace;
}

.date-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.date-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.813rem;
}

.date-item i {
  width: 16px;
  color: #94a3b8;
  font-size: 0.75rem;
}

.date-label {
  color: #64748b;
  min-width: 70px;
}

.date-value {
  color: #334155;
  font-weight: 500;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.action-buttons .btn {
  padding: 0.5rem 1rem;
  font-size: 0.813rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.action-buttons .btn-view {
  background: white;
  color: #3b82f6;
  border: 1.5px solid #e2e8f0;
}

.action-buttons .btn-view:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.action-buttons .btn-open {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
}

.action-buttons .btn-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-buttons .btn-open:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.loading-cell {
  text-align: center;
  padding: 3rem !important;
}

.loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #94a3b8;
  font-size: 1rem;
}

.loading-content i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* Simple Profile Header - Minimal */
.profile-header-simple {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.profile-avatar-simple {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.avatar-status-simple {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.625rem;
}

.profile-info-simple {
  flex: 1;
  min-width: 0;
}

.profile-info-simple h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.profile-info-simple p {
  margin: 0.125rem 0 0 0;
  font-size: 0.813rem;
  color: #64748b;
}

.profile-meta-simple {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.meta-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}

.meta-badge i {
  color: var(--primary-color);
  font-size: 0.75rem;
}

/* Account Grid Layout - 2 Columns */
.account-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1.5rem;
  height: calc(100vh - var(--header-height) - 180px);
}

.account-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.account-right {
  display: flex;
  flex-direction: column;
}

/* Info Cards */
.info-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #e2e8f0;
}

.info-card-compact {
  flex: 1;
  min-height: 0;
}

.info-card-full {
  flex: 1;
  min-height: 0;
}

.info-card-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.info-card-icon.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.info-card-icon.bg-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.info-card-icon.bg-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.info-card-icon.bg-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.info-card-title h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.info-card-title p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.info-card-body {
  padding: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.info-item {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item:hover {
  background: #f8fafc;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #64748b;
  font-size: 0.813rem;
  font-weight: 500;
}

.info-label i {
  width: 20px;
  color: var(--primary-color);
  font-size: 0.875rem;
}

.info-value {
  color: #1e293b;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: right;
}

.permissions-count {
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

#account-permissions-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

#account-permissions-list > div:not(.loading-permissions) {
  overflow-y: auto;
  padding: 1rem 1.25rem;
  flex: 1;
  min-height: 0;
}

.permission-item {
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.permission-item:last-child {
  margin-bottom: 0;
}

.permission-item:hover {
  background: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.loading-permissions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.25rem;
  color: #94a3b8;
  flex: 1;
}

.loading-permissions i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* Activity Timeline Compact */
.activity-timeline-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.activity-item-compact:last-child {
  border-bottom: none;
}

.activity-item-compact:hover {
  background: #f8fafc;
}

.activity-item-compact i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 8px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.activity-item-compact div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.activity-item-compact strong {
  font-size: 0.813rem;
  color: #1e293b;
  font-weight: 600;
}

.activity-item-compact span {
  font-size: 0.75rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Activity Timeline (Original - Not Used) */
.activity-timeline {
  position: relative;
  padding-left: 2rem;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #e2e8f0 100%);
}

.activity-item {
  position: relative;
  padding-bottom: 2rem;
  display: flex;
  gap: 1.5rem;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  z-index: 1;
}

.activity-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.activity-content p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

/* Chart Section - COMPACT (SCROLLABLE) */
.chart-section {
 margin-bottom: 0.7rem; 
 overflow: hidden; 
 width: 100%;
 flex: 1; /* Take remaining space */
 display: flex;
 flex-direction: column;
 min-height: 0; /* Important for flex scroll */
}
.chart-header { 
 padding: 0.6rem 0.8rem; 
 border-bottom: 1px solid var(--border-color); 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 background: var(--glass-bg); 
 flex-wrap: wrap; 
 gap: 0.5rem; 
 width: 100%; 
}
.chart-header h3 { 
 margin: 0; 
 color: var(--text-primary); 
 font-weight: 600; 
 font-size: 0.85rem; 
}
.chart-tabs { 
 display: flex; 
 gap: 0.3rem; 
 flex-wrap: wrap; 
}
.tab-btn { 
 padding: 0.3rem 0.6rem; 
 border: 1px solid var(--border-color); 
 background: transparent; 
 border-radius: 4px; 
 color: var(--text-secondary); 
 font-size: 0.7rem; 
 transition: all 0.2s ease; 
 white-space: nowrap; 
}
.tab-btn.active { 
 background: var(--primary-color); 
 color: white; 
 border-color: var(--primary-color); 
}
.chart-container { 
 height: 200px; 
 padding: 0.6rem; 
 position: relative; 
 width: 100%; 
}
/* Metric Cards - COMPACT (NO SCROLL) */ 
.metric-cards { 
 display: grid; 
 grid-template-columns: repeat(4, 1fr); 
 gap: 0.7rem; 
 width: 100%;
 flex-shrink: 0; /* Don't shrink */
}
.metric-card {
 padding: 0.7rem; 
 display: flex; 
 align-items: center; 
 gap: 0.75rem; 
 min-height: 70px; 
 width: 100%; 
}
.metric-icon { 
 width: 32px; 
 height: 32px; 
 border-radius: 6px; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 color: white; 
 font-size: 0.85rem; 
 flex-shrink: 0; 
}
.metric-icon.blue { background: var(--blue-color); } 
.metric-icon.green { background: var(--green-color); } 
.metric-icon.orange { background: var(--orange-color); } 
.metric-icon.indigo { background: var(--indigo-color); } 
.metric-content { 
 flex: 1; 
 min-width: 0; 
}
.metric-content h4 { 
 font-size: 1rem; 
 font-weight: 700; 
 margin: 0; 
 color: var(--text-primary); 
 line-height: 1; 
}
.metric-content p { 
 margin: 0.1rem 0; 
 color: var(--text-secondary); 
 font-size: 0.65rem; 
}
.metric-trend { 
 font-size: 0.65rem; 
 font-weight: 600; 
}
.metric-trend.positive { color: var(--success-color); } 
.metric-trend.negative { color: var(--danger-color); } 
/* ============================================================================ */
/* MACHINE MANAGEMENT PAGE STYLES */
/* ============================================================================ */
.machines-management { 
 width: 100%; 
 max-width: none; 
 padding: 0;
 display: flex;
 flex-direction: column;
 height: 100%;
 overflow: hidden; /* No scroll on container */
}
/* Machines Header - Modern & Clean (NO SCROLL) */ 
.machines-header { 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 margin-bottom: 0.7rem; 
 padding-bottom: 0.5rem; 
 border-bottom: 1px solid var(--border-color); 
 flex-wrap: wrap; 
 gap: 0.75rem;
 flex-shrink: 0; /* Don't shrink */
}
.machines-header-left h1 { 
 font-size: 1.1rem; 
 font-weight: 600; 
 margin: 0; 
 color: var(--text-primary); 
 letter-spacing: -0.5px;
}
.machines-subtitle { 
 color: var(--text-muted); 
 font-size: 0.7rem; 
 margin-top: 0.15rem; 
 display: block; 
 font-weight: 400;
}
.machines-header-right { 
 display: flex; 
 align-items: center; 
 gap: 0.75rem; 
 flex-wrap: wrap; 
}
/* Machines Stats - Minimal & Professional (NO SCROLL) */ 
.machines-stats { 
 display: grid; 
 grid-template-columns: repeat(4, 1fr); 
 gap: 0.7rem; 
 margin-bottom: 0.7rem;
 flex-shrink: 0; /* Don't shrink */
}
.stat-card {
 padding: 0.6rem 0.8rem; 
 display: flex; 
 align-items: center; 
 gap: 0.6rem;
 border-left: 3px solid transparent;
 transition: all 0.2s ease;
 min-height: 60px;
}
.stat-card:hover { 
 border-left-color: var(--primary-color);
 transform: translateX(2px);
}
.stat-icon { 
 width: 32px; 
 height: 32px; 
 border-radius: 6px; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 font-size: 0.85rem; 
 flex-shrink: 0;
 background: var(--glass-bg);
}
.stat-icon.blue { 
 color: var(--blue-color);
 background: rgba(59, 130, 246, 0.1);
} 
.stat-icon.green { 
 color: var(--green-color);
 background: rgba(34, 197, 94, 0.1);
} 
.stat-icon.orange { 
 color: var(--orange-color);
 background: rgba(249, 115, 22, 0.1);
} 
.stat-icon.indigo { 
 color: var(--indigo-color);
 background: rgba(79, 70, 229, 0.1);
} 
.stat-content { 
 flex: 1; 
 min-width: 0; 
}
.stat-content h3 { 
 font-size: 1.5rem; 
 font-weight: 600; 
 margin: 0; 
 color: var(--text-primary); 
 line-height: 1.2; 
}
.stat-content p { 
 margin: 0.125rem 0 0; 
 color: var(--text-secondary); 
 font-size: 0.75rem; 
 font-weight: 500;
 text-transform: uppercase;
 letter-spacing: 0.5px;
}
.stat-change { 
 display: none; /* Hide for minimal design */
}
.stat-change.positive { color: var(--success-color); } 
.stat-change.negative { color: var(--danger-color); } 
.stat-change.neutral { color: var(--text-muted); } 
/* Machines Section */ 
.machines-section {
 flex: 1; /* Take remaining space */
 display: flex;
 flex-direction: column;
 overflow: hidden;
 min-height: 0; /* Important for flex scroll */
}

/* Section Headers - Consistent Styling */
.section-header-simple {
 margin-bottom: 0.6rem;
 flex-shrink: 0;
}

.section-title {
 font-size: 0.95rem;
 font-weight: 600;
 color: var(--text-primary);
 margin: 0 0 0.15rem 0;
 letter-spacing: -0.3px;
}

.section-subtitle {
 font-size: 0.7rem;
 color: var(--text-muted);
 margin: 0;
 font-weight: 400;
}

.section-header { 
 padding: 1.5rem 2rem; 
 border-bottom: 1px solid var(--border-color); 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 background: var(--glass-bg); 
}
.section-header h2 { 
 margin: 0; 
 color: var(--text-primary); 
 font-weight: 600; 
 font-size: 1.25rem; 
}
.view-controls { 
 display: flex; 
 gap: 0.5rem; 
}
.view-toggle { 
 width: 40px; 
 height: 40px; 
 border: 1px solid var(--border-color); 
 background: transparent; 
 border-radius: 6px; 
 color: var(--text-secondary); 
 cursor: pointer; 
 transition: all 0.2s ease; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
}
.view-toggle:hover { 
 background: var(--primary-color); 
 color: white; 
 border-color: var(--primary-color); 
}
.view-toggle.active { 
 background: var(--primary-color); 
 color: white; 
 border-color: var(--primary-color); 
}
/* Machines Container */ 
.machines-container { 
 padding: 2rem; 
 min-height: 400px; 
}
/* Grid View */ 
.machines-container.grid-view { 
 display: grid; 
 grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
 gap: 2rem; 
}
/* List View */ 
.machines-container.list-view { 
 display: flex; 
 flex-direction: column; 
 gap: 1rem; 
}
/* Machine Management Card (Grid) */ 
.machine-mgmt-card { 
 background: var(--glass-bg); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius); 
 overflow: hidden; 
 transition: all 0.3s ease; 
 cursor: pointer; 
 position: relative; 
}
.machine-mgmt-card:hover { 
 transform: translateY(-4px); 
 box-shadow: var(--shadow-lg); 
 border-color: var(--primary-color); 
}
.machine-mgmt-card.current { 
 border-color: var(--success-color); 
 box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); 
}
.machine-mgmt-card.current::before { 
 content: ''; 
 position: absolute; 
 top: 1rem; 
 right: 1rem; 
 width: 12px; 
 height: 12px; 
 background: var(--success-color); 
 border-radius: 50%; 
 z-index: 2; 
}
.machine-mgmt-card.current::after { 
 content: 'Aktif'; 
 position: absolute; 
 top: 0.7rem; 
 right: 2.5rem; 
 background: var(--success-color); 
 color: white; 
 font-size: 0.7rem; 
 font-weight: 600; 
 padding: 0.2rem 0.5rem; 
 border-radius: 12px; 
 z-index: 2; 
}
.machine-thumb-mgmt { 
 width: 100%; 
 height: 200px; 
 background: var(--light-bg); 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 overflow: hidden; 
 position: relative; 
}
.machine-thumb-mgmt img { 
 width: 100%; 
 height: 100%; 
 object-fit: contain; 
 transition: transform 0.3s ease; 
}
.machine-mgmt-card:hover .machine-thumb-mgmt img { 
 transform: scale(1.05); 
}
.machine-thumb-mgmt .fallback-icon { 
 font-size: 3rem; 
 color: var(--text-muted); 
 opacity: 0.5; 
}
.machine-mgmt-info { 
 padding: 1.5rem; 
}
.machine-mgmt-header { 
 display: flex; 
 justify-content: space-between; 
 align-items: flex-start; 
 margin-bottom: 1rem; 
}
.machine-mgmt-name { 
 font-size: 1.2rem; 
 font-weight: 600; 
 color: var(--text-primary); 
 margin: 0; 
 line-height: 1.2; 
}
.machine-mgmt-id { 
 background: rgba(102, 126, 234, 0.1); 
 color: var(--primary-color); 
 font-size: 0.7rem; 
 font-weight: 600; 
 padding: 0.25rem 0.5rem; 
 border-radius: 12px; 
 text-transform: uppercase; 
}
.machine-mgmt-description { 
 color: var(--text-secondary); 
 font-size: 0.9rem; 
 line-height: 1.4; 
 margin-bottom: 1rem; 
}
.machine-mgmt-stats { 
 display: grid; 
 grid-template-columns: 1fr 1fr; 
 gap: 1rem; 
 margin-bottom: 1.5rem; 
}
.mgmt-stat { 
 text-align: center; 
 padding: 0.75rem; 
 background: rgba(248, 250, 252, 0.5); 
 border-radius: 8px; 
 border: 1px solid rgba(148, 163, 184, 0.1); 
}
.mgmt-stat-value { 
 font-size: 1.1rem; 
 font-weight: 700; 
 color: var(--text-primary); 
 margin: 0; 
 line-height: 1; 
}
.mgmt-stat-label { 
 font-size: 0.75rem; 
 color: var(--text-muted); 
 margin: 0.25rem 0 0 0; 
 text-transform: uppercase; 
 letter-spacing: 0.02em; 
}
.machine-mgmt-actions { 
 display: flex; 
 gap: 0.75rem; 
}
.btn-mgmt { 
 flex: 1; 
 padding: 0.75rem 1rem; 
 border: none; 
 border-radius: 8px; 
 font-weight: 500; 
 font-size: 0.875rem; 
 cursor: pointer; 
 transition: all 0.2s ease; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 gap: 0.5rem; 
 text-decoration: none; 
}
.btn-mgmt-primary { 
 background: var(--primary-gradient); 
 color: white; 
 box-shadow: var(--shadow-sm); 
}
.btn-mgmt-primary:hover { 
 transform: translateY(-1px); 
 box-shadow: var(--shadow-md); 
}
.btn-mgmt-outline { 
 background: transparent; 
 color: var(--text-secondary); 
 border: 1px solid var(--border-color); 
}
.btn-mgmt-outline:hover { 
 background: var(--glass-bg); 
 color: var(--text-primary); 
 border-color: var(--primary-color); 
}
/* List View Styles */ 
.machine-mgmt-card.list-item { 
 display: flex; 
 align-items: center; 
 padding: 1.5rem; 
 margin-bottom: 0; 
}
.machine-mgmt-card.list-item .machine-thumb-mgmt { 
 width: 120px; 
 height: 80px; 
 margin-right: 1.5rem; 
 flex-shrink: 0; 
}
.machine-mgmt-card.list-item .machine-mgmt-info { 
 flex: 1; 
 padding: 0; 
 display: flex; 
 align-items: center; 
 justify-content: space-between; 
}
.machine-mgmt-card.list-item .machine-mgmt-content { 
 flex: 1; 
}
.machine-mgmt-card.list-item .machine-mgmt-header { 
 margin-bottom: 0.5rem; 
}
.machine-mgmt-card.list-item .machine-mgmt-description { 
 margin-bottom: 0; 
 font-size: 0.8rem; 
}
.machine-mgmt-card.list-item .machine-mgmt-stats { 
 display: flex; 
 gap: 1rem; 
 margin: 0; 
 margin-left: 2rem; 
}
.machine-mgmt-card.list-item .mgmt-stat { 
 background: transparent; 
 border: none; 
 padding: 0; 
 text-align: left; 
}
.machine-mgmt-card.list-item .machine-mgmt-actions { 
 margin-left: 2rem; 
 flex-shrink: 0; 
}
/* Empty State */ 
.machines-empty { 
 text-align: center; 
 padding: 4rem 2rem; 
 color: var(--text-muted); 
}
.machines-empty i { 
 font-size: 4rem; 
 margin-bottom: 1rem; 
 opacity: 0.5; 
}
.machines-empty h3 { 
 margin-bottom: 0.5rem; 
 color: var(--text-secondary); 
}
.machines-empty p { 
 margin-bottom: 2rem; 
}
/* Loading State */ 
.machines-loading { 
 display: flex; 
 flex-direction: column; 
 align-items: center; 
 justify-content: center; 
 padding: 4rem 2rem; 
 color: var(--text-muted); 
}
.machines-loading .loading-spinner { 
 width: 40px; 
 height: 40px; 
 border: 3px solid var(--border-color); 
 border-top: 3px solid var(--primary-color); 
 border-radius: 50%; 
 animation: spin 1s linear infinite; 
 margin-bottom: 1rem; 
}
.machines-loading p { 
 margin: 0; 
 font-size: 0.9rem; 
}

/* General Modal Styles (for custom non-Bootstrap modals only) */
/* DO NOT apply to Bootstrap modals (.modal.fade) */
.custom-modal-overlay:not(.modal) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 1rem;
  overflow-y: auto;
}

/* Legacy support - keep old class name for any remaining references */
.modal-overlay:not(.modal) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 1rem;
  overflow-y: auto;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin: auto;
  border: 1px solid var(--border-color);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.5);
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: var(--danger-color);
  color: white;
}

.modal-body {
  padding: 1.5rem;
}

/* Detail rows for machine details and similar modals */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row strong {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 120px;
}

.detail-row span {
  color: var(--text-secondary);
  text-align: right;
}

.status-active {
  color: var(--success-color) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--glass-bg);
  position: sticky;
  bottom: 0;
}

/* Modal Styles for Machine Details */ 
.machine-details-modal .custom-modal-overlay { 
 position: absolute; 
 inset: 0; 
 background: rgba(0, 0, 0, 0.5); 
 backdrop-filter: blur(10px); 
 z-index: 1;
}
.machine-details-modal .modal-content { 
 background: var(--card-bg); 
 border-radius: var(--border-radius-lg); 
 box-shadow: var(--shadow-lg); 
 max-width: 600px; 
 width: 100%; 
 max-height: 80vh; 
 overflow-y: auto; 
 position: relative; 
 z-index: 1; 
}
.machine-details-modal .modal-header { 
 padding: 1.5rem 2rem; 
 border-bottom: 1px solid var(--border-color); 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 background: var(--glass-bg); 
}
.machine-details-modal .modal-header h2 { 
 margin: 0; 
 color: var(--text-primary); 
 font-size: 1.25rem; 
}
.machine-details-modal .modal-close { 
 background: none; 
 border: none; 
 color: var(--text-muted); 
 font-size: 1.2rem; 
 cursor: pointer; 
 padding: 0.5rem; 
 border-radius: 4px; 
 transition: all 0.2s ease; 
}
.machine-details-modal .modal-close:hover { 
 background: var(--danger-color); 
 color: white; 
}
.machine-details-modal .modal-body { 
 padding: 2rem; 
}
.machine-details-modal .detail-row { 
 display: flex; 
 justify-content: space-between; 
 align-items: center; 
 padding: 0.75rem 0; 
 border-bottom: 1px solid rgba(148, 163, 184, 0.1); 
}
.machine-details-modal .detail-row:last-child { 
 border-bottom: none; 
}
.machine-details-modal .detail-row strong { 
 color: var(--text-primary); 
 font-weight: 600; 
 min-width: 120px; 
}
.machine-details-modal .detail-row span { 
 color: var(--text-secondary); 
 text-align: right; 
}
.machine-details-modal .status-active { 
 color: var(--success-color) !important; 
 display: flex; 
 align-items: center; 
 gap: 0.5rem; 
}
.machine-details-modal .modal-footer { 
 padding: 1.5rem 2rem; 
 border-top: 1px solid var(--border-color); 
 display: flex; 
 gap: 1rem; 
 justify-content: flex-end; 
 background: var(--glass-bg); 
}
/* SVG Viewer Styles - NO HEADER NOW */ 
.svg-viewer-container { 
 display: grid; 
 grid-template-columns: 1fr var(--viewer-sidebar-width); 
 grid-template-rows: 1fr; /* Only one row now */
 gap: 0.7rem; 
 height: 100%;
 width: 100%;
 overflow: hidden; /* No scroll on container */
}
/* VIEWER HEADER REMOVED - Model badge now in app-header */
.machine-badge { 
 padding: 0.15rem 0.5rem; 
 background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); 
 color: white; 
 border-radius: 50px; 
 font-size: 0.65rem; 
 font-weight: 500; 
 white-space: nowrap; 
}
/* Viewer Content - GRID LAYOUT FOR SVG AND PART LIST */ 
.viewer-content { 
 background: var(--card-bg); 
 backdrop-filter: blur(20px); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius); 
 box-shadow: var(--shadow-glass); 
 display: grid;
 grid-template-rows: auto 1fr auto; /* header, svg, part-list */
 overflow: hidden; /* No scroll here */
 position: relative; 
 width: 100%;
 height: 100%; /* Full height */
 gap: 0;
}
.content-header { 
 padding: 0.6rem 0.8rem; 
 border-bottom: 1px solid var(--border-color); 
 background: var(--glass-bg); 
 display: flex; 
 align-items: center;
 flex-shrink: 0; /* Don't shrink */ 
 justify-content: space-between; 
 height: 60px; 
 flex-shrink: 0; 
 flex-wrap: wrap; 
 gap: 1rem; 
 width: 100%; 
}
.machine-info { 
 display: flex; 
 align-items: center; 
 gap: var(--spacing-md); 
 min-width: 0; 
}
.machine-name { 
 font-size: 1rem; 
 font-weight: 600; 
 color: var(--text-primary); 
 margin: 0; 
}
/* SVG Container - MIDDLE ROW IN GRID */ 
.svg-container { 
 position: relative; 
 overflow: hidden; 
 background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%); 
 width: 100%;
 height: 100%; /* Take all available space */
 min-height: 0; /* Important for grid */
}
#svg-wrapper { 
 width: 100%; 
 height: 100%; 
 position: absolute; 
 top: 0; 
 left: 0; 
 right: 0; 
 bottom: 0; 
 overflow: hidden; 
 cursor: grab; 
}
#svg-wrapper.grabbing { cursor: grabbing; }
#svg-stage { 
 width: 100%; 
 height: 100%; 
 position: absolute; 
 top: 0; 
 left: 0; 
 overflow: hidden; 
 display: block; 
}
#svg-stage svg { 
 width: 100%; 
 height: 100%; 
 display: block; 
 background: transparent; 
 user-select: none; 
 touch-action: none; 
 max-width: 100%; 
 max-height: 100%; 
}
/* Loading Overlay */ 
#svg-loading { 
 position: absolute; 
 inset: 0; 
 z-index: 20; 
 background: rgba(255, 255, 255, 0.95); 
 backdrop-filter: blur(10px); 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 flex-direction: column; 
 gap: var(--spacing-md); 
 transition: opacity 0.3s ease; 
}
.loading-spinner { 
 width: 40px; 
 height: 40px; 
 border: 3px solid var(--border-color); 
 border-top: 3px solid var(--primary-color); 
 border-radius: 50%; 
 animation: spin 1s linear infinite; 
}
@keyframes spin { 
 0% { transform: rotate(0deg); } 
 100% { transform: rotate(360deg); } 
}
.loading-text { 
 font-size: 0.8rem; 
 font-weight: 500; 
 color: var(--text-secondary); 
}
/* Controls */ 
.controls-overlay { 
 position: absolute; 
 z-index: 15; 
 display: flex; 
 gap: var(--spacing-sm); 
}
.zoom-controls { 
 top: var(--spacing-lg); 
 right: var(--spacing-lg); 
 flex-direction: column; 
}
.control-btn { 
 width: 36px; 
 height: 36px; 
 background: var(--card-bg); 
 backdrop-filter: blur(20px); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius-sm); 
 box-shadow: var(--shadow-md); 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 color: var(--text-primary); 
 cursor: pointer; 
 transition: all 0.2s ease; 
 font-size: 0.85rem; 
}
.control-btn:hover { 
 background: var(--primary-color); 
 color: white; 
 transform: translateY(-1px); 
 box-shadow: var(--shadow-lg); 
}
.control-btn:active { 
 transform: translateY(0); 
}
.control-btn:disabled { 
 opacity: 0.5; 
 cursor: not-allowed; 
 transform: none; 
}
/* Viewer Sidebar - ULTRA KOMPAKT */ 
.viewer-sidebar { 
 display: flex; 
 flex-direction: column; 
 gap: var(--panel-gap); 
 width: 100%;
 height: 100%; /* Full height */
 overflow: hidden; /* No scroll on sidebar itself */
}
.sidebar-panel { 
 background: var(--card-bg); 
 backdrop-filter: blur(20px); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius); 
 box-shadow: var(--shadow-glass); 
 overflow: hidden; 
 display: flex; 
 flex-direction: column; 
 flex-shrink: 0; 
}
.sidebar-panel:first-child { 
 height: calc(var(--selection-form-content-height) + var(--panel-header-height)); 
}
.sidebar-panel:last-child { 
 flex: 1; 
}
.panel-header { 
 height: var(--panel-header-height); 
 padding: 0.3rem 0.5rem; 
 background: var(--glass-bg); 
 border-bottom: 1px solid var(--border-color); 
 display: flex; 
 align-items: center; 
 justify-content: space-between; 
 flex-shrink: 0; 
}
.panel-title { 
 font-size: 0.65rem; 
 font-weight: 600; 
 color: var(--text-primary); 
 margin: 0; 
 display: flex; 
 align-items: center; 
 gap: 0.25rem; 
}
.panel-title .icon { 
 color: var(--primary-color); 
 font-size: 0.55rem; 
}
.cart-header-info { 
 display: flex; 
 align-items: center; 
 gap: 0.3rem; 
 font-size: 0.55rem; 
 color: var(--text-secondary); 
 background: rgba(102, 126, 234, 0.1); 
 padding: 0.1rem 0.3rem; 
 border-radius: 6px; 
 margin-left: 0.2rem; 
}
.cart-total-badge { 
 background: var(--primary-color); 
 color: white; 
 font-size: 0.5rem; 
 font-weight: 600; 
 padding: 0.06rem 0.2rem; 
 border-radius: 4px; 
 min-width: 0.8rem; 
 text-align: center; 
}
.panel-body { 
 flex: 1; 
 padding: 0.3rem; 
 overflow-y: auto; 
 min-height: 0; 
}
.sidebar-panel:first-child .panel-body { 
 height: var(--selection-form-content-height); 
 flex-shrink: 0; 
 display: flex; 
 flex-direction: column; 
}
/* Selection Content */ 
#selected-part-content { 
 display: flex; 
 flex-direction: column; 
 height: 100%; 
}
.selection-form-area { 
 flex: 1; 
 overflow-y: auto; 
 margin-bottom: 0.3rem; 
}
.selection-button-area { 
 flex-shrink: 0; 
 margin-top: auto; 
}
/* Form Elements */ 
.form-group-compact { 
 margin-bottom: 0.15rem; 
}
.form-label-compact { 
 font-size: 0.45rem; 
 font-weight: 600; 
 color: var(--text-secondary); 
 margin-bottom: 0.05rem; 
 display: block; 
 text-transform: uppercase; 
 letter-spacing: 0.02em; 
}
.form-value-compact { 
 font-size: 0.6rem; 
 color: var(--text-primary); 
 background: rgba(248, 250, 252, 0.6); 
 border: 1px solid rgba(148, 163, 184, 0.12); 
 border-radius: 2px; 
 padding: 0.1rem 0.2rem; 
 word-break: break-word; 
 line-height: 1.1; 
 min-height: 0.8rem; 
 display: flex; 
 align-items: center; 
 transition: all 0.2s ease; 
}
.form-value-compact:hover { 
 background: rgba(248, 250, 252, 0.9); 
 border-color: rgba(148, 163, 184, 0.2); 
}
.form-value-compact.empty { 
 color: var(--text-muted); 
 font-style: italic; 
}
/* Buttons - Modern & Compact */ 
.btn-modern { 
 padding: 0.5rem 0.9rem; 
 border: none; 
 border-radius: 6px; 
 font-weight: 500; 
 font-size: 0.8rem; 
 cursor: pointer; 
 transition: all 0.2s ease; 
 display: inline-flex; 
 align-items: center; 
 gap: 0.4rem; 
 text-decoration: none; 
 position: relative; 
 overflow: hidden;
 white-space: nowrap;
}

.btn-modern i {
 font-size: 0.75rem;
}
.btn-primary { 
 background: var(--primary-gradient); 
 color: white; 
 box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25); 
}
.btn-primary:hover { 
 transform: translateY(-1px); 
 box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35); 
}
.btn-outline { 
 background: white; 
 color: var(--text-primary); 
 border: 1px solid var(--border-color); 
}
.btn-outline:hover { 
 background: rgba(102, 126, 234, 0.05); 
 border-color: var(--primary-color);
 color: var(--primary-color);
}
.btn-danger { 
 background: var(--danger-color); 
 color: white; 
}
.btn-sm { 
 padding: 0.1rem 0.25rem; 
 font-size: 0.45rem; 
 border-radius: 3px; 
}
/* Hotspot Styles */ 
[id^="hotspot."], 
[id^="hotspot-"], 
[data-hotspot] { 
 cursor: pointer; 
 pointer-events: all; 
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
 fill: transparent !important; 
 stroke: transparent !important; 
 opacity: 0; 
}
.hotspot-highlight { 
 stroke: var(--primary-color) !important; 
 stroke-width: 2px !important; 
 fill: rgba(102, 126, 234, 0.2) !important; 
 opacity: 0.7 !important; 
 filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3)); 
}
.hotspot-active { 
 stroke: var(--success-color) !important; 
 stroke-width: 2.5px !important; 
 fill: rgba(16, 185, 129, 0.25) !important; 
 opacity: 0.8 !important; 
 filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.4)); 
}
/* Form Elements */ 
.form-control-modern { 
 padding: var(--spacing-sm) var(--spacing-md); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius-sm); 
 background: var(--card-bg); 
 color: var(--text-primary); 
 font-size: 0.75rem; 
 transition: all 0.2s ease; 
}
.form-control-modern:focus { 
 outline: none; 
 border-color: var(--primary-color); 
 box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); 
}
.quantity-input-compact { 
 padding: 0.15rem 0.25rem; 
 border: 1px solid rgba(148, 163, 184, 0.12); 
 border-radius: 3px; 
 margin-bottom: 0.1rem; 
 background: rgba(248, 250, 252, 0.4); 
 transition: all 0.2s ease; 
 cursor: pointer; 
 position: relative; 
 min-height: auto; 
}
.quantity-input-compact:focus { 
 outline: none; 
 border-color: var(--primary-color); 
 box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.2); 
}
/* Cart Header */ 
.cart-header {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  flex-wrap: wrap;
}
/* Cart Items */ 
.cart-list-area {
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.clear-cart-top-btn {
  width: 100%; margin-bottom: 0.5rem;
}
/* Desktop Cart Item - Flexbox Layout */
.cart-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cart-item:hover { 
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.cart-item-active { 
  background: #f0f4ff;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Left: Part Info */
.cart-item-text-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cart-item-name { 
  font-weight: 600; 
  color: #0f172a; 
  font-size: 0.9375rem; 
  line-height: 1.4; 
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-details { 
  font-size: 0.75rem; 
  color: #64748b;
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
}

.cart-item-info { 
  display: flex; 
  align-items: center; 
  gap: 0.375rem;
  flex-wrap: wrap;
}

.cart-info-item { 
  background: #f1f5f9; 
  padding: 0.1875rem 0.5rem; 
  border-radius: 4px; 
  font-size: 0.75rem; 
  white-space: nowrap; 
  font-weight: 500; 
  color: #475569;
  line-height: 1.2;
}

/* Right: Controls */
.cart-item-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Desktop Cart Quantity Controls */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  min-width: 110px;
  transition: all 0.2s ease;
}

/* Desktop Cart Quantity Input */
.cart-item .quantity-input-compact,
.cart-item .qty-input { 
  width: 60px;
  height: 36px;
  font-size: 0.9375rem;
  padding: 0 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  background: white;
  color: #0f172a;
  transition: all 0.2s ease;
}

.cart-item .qty-input:hover {
  border-color: #94a3b8;
}

.cart-item .qty-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Desktop Cart Quantity Controls (if using +/- buttons) */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  height: 36px;
  min-width: 110px;
  transition: all 0.2s ease;
}

.qty-controls:hover {
  border-color: #94a3b8;
}

.qty-btn {
  width: 32px;
  height: 36px;
  padding: 0;
  border: none;
  background: #f8fafc;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: #667eea;
  color: white;
}

.qty-btn:active {
  transform: scale(0.92);
}

.qty-controls .qty-input { 
  width: 46px;
  flex: 1;
  height: 36px;
  font-size: 0.9375rem;
  padding: 0;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  font-weight: 600;
  text-align: center;
  background: white;
  color: #0f172a;
}

/* Show Button */
.btn-show-in-svg {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #cbd5e1;
  background: white;
  color: #667eea;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-show-in-svg:hover { 
  background: #667eea;
  border-color: #667eea;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-show-in-svg:active {
  transform: scale(0.95);
}

/* Remove Button */
.btn-remove-from-cart,
.remove-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #fca5a5;
  background: white;
  color: #ef4444;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-remove-from-cart:hover,
.remove-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-remove-from-cart:active,
.remove-btn:active {
}
#clear-cart-btn { 
 padding: 0.08rem 0.2rem !important; 
 font-size: 0.4rem !important; 
}
/* Empty State */ 
.empty-state-compact { 
 text-align: center; 
 padding: 0.5rem 0.25rem; 
 color: var(--text-muted); 
}
.empty-state-compact .icon { 
 font-size: 0.7rem; 
 margin-bottom: 0.15rem; 
 opacity: 0.5; 
}
.empty-state-compact .text { 
 font-size: 0.55rem; 
 margin: 0; 
}
/* Info Message */ 
.info-message-compact { 
 font-size: 0.4rem; 
 color: var(--danger-color); 
 margin-bottom: 0.15rem; 
 padding: 0.1rem 0.2rem; 
 background: rgba(239, 68, 68, 0.08); 
 border-radius: 2px; 
 border-left: 2px solid var(--danger-color); 
}
/* Machine Selector - GENİŞLETİLMİŞ */ 
.sidebar-panel.unified-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar-nav-tabs {
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0.5rem 0;
  background: var(--glass-bg);
  flex-shrink: 0;
}
.sidebar-nav-tabs .nav-item {
  flex: 1;
}
.sidebar-nav-tabs .nav-link {
  border: none;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.6rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.sidebar-nav-tabs .nav-link:hover {
  color: var(--primary-color);
}
.sidebar-nav-tabs .nav-link.active {
  background: var(--card-bg);
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}
.sidebar-content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.tab-pane {
  position: absolute;
  inset: 0;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}
.tab-pane#cart-panel {
  padding: 0;
}
.cart-tab-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

#machine-selector { 
 position: fixed; 
 inset: 0; 
 background: rgba(0, 0, 0, 0.5); 
 backdrop-filter: blur(10px); 
 z-index: 5000; 
 display: none; 
 align-items: center; 
 justify-content: center; 
 padding: var(--spacing-xl); 
}
#machine-selector.show { display: flex; }
.machine-selector-content { 
 background: var(--card-bg); 
 border-radius: var(--border-radius-lg); 
 box-shadow: var(--shadow-lg); 
 max-width: 1600px; 
 width: 95%; 
 max-height: 90vh; 
 overflow-y: auto; 
 padding: var(--spacing-xl); 
}
.machine-grid { 
 display: grid; 
 grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
 gap: var(--spacing-lg); 
 margin-top: var(--spacing-lg); 
 min-height: 300px;
}

/* Empty State for Machine Grid */
.machine-grid-empty-state {
 grid-column: 1 / -1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 3rem 1rem;
 text-align: center;
}

.machine-grid-empty-state .empty-state-icon {
 width: 80px;
 height: 80px;
 border-radius: 50%;
 background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.05));
 display: flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 1.5rem;
}

.machine-grid-empty-state .empty-state-icon i {
 font-size: 2rem;
 color: var(--primary-color);
}

.machine-grid-empty-state h4 {
 font-size: 1.25rem;
 font-weight: 600;
 color: var(--text-primary);
 margin-bottom: 0.5rem;
}

.machine-grid-empty-state p {
 font-size: 0.875rem;
 color: var(--text-muted);
 max-width: 400px;
 margin: 0 auto;
}

.machine-card { 
 background: var(--glass-bg); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius); 
 padding: var(--spacing-lg); 
 transition: all 0.3s ease; 
 cursor: pointer; 
}
.machine-card:hover { 
 transform: translateY(-2px); 
 box-shadow: var(--shadow-lg); 
 border-color: var(--primary-color); 
}
.machine-thumb { 
 width: 100%; 
 aspect-ratio: 16 / 9; 
 background: var(--light-bg); 
 border-radius: var(--border-radius-sm); 
 margin-bottom: var(--spacing-md); 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 overflow: hidden; 
}
.machine-thumb img { 
 width: 100%; 
 height: 100%; 
 object-fit: contain; 
 transition: transform 0.3s ease; 
}
.machine-card:hover .machine-thumb img { 
 transform: scale(1.02); 
}
.machine-card-name { 
 font-size: 1.1rem; 
 font-weight: 600; 
 color: var(--text-primary); 
 margin-bottom: var(--spacing-xs); 
}
.machine-description { 
 font-size: 0.875rem; 
 color: var(--text-secondary); 
 margin-bottom: var(--spacing-md); 
 line-height: 1.5; 
}
/* Quick Add Popup */ 
#quick-add-popup {
  position: absolute;
  z-index: 3000;
  display: none;
  width: auto; /* Genişliği içeriğe göre ayarla */
  min-width: 190px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.2s ease-out; /* Animasyon zaten var, kullanmaya devam */
  padding: var(--spacing-sm);
}

/* ==========================================================================
   Cart Visual Refresh (Desktop & Shared)
   ==========================================================================
   Bold but clean styling for cart cards, chips, and controls.
   Keeps legacy structure; overrides earlier cart rules.
   Palette: deep navy base + coral/midnight blue accents.
   ========================================================================= */
:root {
  --cart-surface: linear-gradient(135deg, #f8fafc 0%, #eef2ff 60%, #e0f2fe 100%);
  --cart-card: #ffffff;
  --cart-chip: #e7eef7;
  --cart-chip-text: #1f2a44;
  --cart-border: #d7e0ed;
  --cart-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --cart-hover-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  --cart-accent: #ff6b6b;
  --cart-accent-2: #4d7cfe;
}

.sidebar-panel.unified-panel {
  background: var(--cart-surface);
}

.cart-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e5edff 60%, #e0f2fe 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 12px 12px 10px 10px;
  margin: 0.25rem 0.5rem 0.35rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.cart-list-area {
  background: transparent;
  padding: 0.75rem 0.85rem;
  gap: 0.55rem;
}

.cart-item {
  background: var(--cart-card);
  border: 1px solid var(--cart-border);
  border-radius: 12px;
  box-shadow: var(--cart-shadow);
  padding: 0.85rem 1rem;
  gap: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--cart-hover-shadow);
  border-color: rgba(77, 124, 254, 0.6);
}

.cart-item-active {
  border-color: rgba(77, 124, 254, 0.9);
  box-shadow: 0 0 0 2px rgba(77, 124, 254, 0.15), var(--cart-hover-shadow);
  background: linear-gradient(135deg, #f1f5ff 0%, #e8f0ff 100%);
}

.cart-item-name {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.cart-info-item {
  background: var(--cart-chip);
  color: var(--cart-chip-text);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  letter-spacing: 0.01em;
}

.cart-item-controls {
  gap: 0.45rem;
}

.qty-controls {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.qty-btn {
  background: transparent;
  color: #1f2937;
}

.qty-btn:hover {
  background: #4d7cfe;
  color: #fff;
}

.qty-input,
.cart-item .qty-input {
  background: #fff;
  font-weight: 700;
  border-left: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.btn-show-in-svg {
  border-color: rgba(77, 124, 254, 0.4);
  color: #1d4ed8;
  background: #f8fbff;
}

.btn-show-in-svg:hover {
  background: linear-gradient(135deg, #4d7cfe, #6ea8ff);
  color: #fff;
  border-color: transparent;
}

.btn-remove-from-cart,
.remove-btn {
  border-color: rgba(255, 107, 107, 0.55);
  color: #b91c1c;
  background: #fff5f5;
}

.btn-remove-from-cart:hover,
.remove-btn:hover {
  background: linear-gradient(135deg, #ff6b6b, #ff8f70);
  color: #fff;
  border-color: transparent;
}

.empty-state-compact {
  padding: 1.75rem 1rem;
  color: #475569;
}

.empty-state-compact .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.65rem;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(77,124,254,0.18), rgba(255,255,255,0.9));
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-size: 1.25rem;
}

.empty-state-compact .text {
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

#quick-add-popup .btn-close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  font-size: 0.6rem;
  opacity: 0.6;
  padding: 0.4rem;
}
.qap-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}
.qap-part-code {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--border-radius-sm);
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.qap-message {
  font-size: 0.75rem;
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
  border-left: 2px solid var(--danger-color);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.qap-footer {
  display: flex;
  align-items: stretch; /* Buton ve stepper aynı yükseklikte olsun */
  gap: var(--spacing-sm);
}

.quantity-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.stepper-btn {
  background: var(--glass-bg);
  border: none;
  color: var(--text-secondary);
  width: 26px;
  height: 100%; /* Yüksekliği footer'a göre ayarla */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.stepper-btn:hover {
  background: var(--primary-color);
  color: white;
}
#quick-add-popup .quantity-input-compact {
  width: 38px;
  height: 100%; /* Yüksekliği footer'a göre ayarla */
  font-size: 0.8rem;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 0;
}
.qap-footer .btn-modern {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  flex-grow: 1; /* Buton kalan boşluğu doldursun */
  border-radius: 6px;
}

/* Tüm tarayıcılarda sayısal giriş alanlarındaki okları gizle */
.quantity-input-compact[type=number]::-webkit-outer-spin-button,
.quantity-input-compact[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input-compact[type=number] {
  /* Firefox için */
  -moz-appearance: textfield;
  /* Standart */
  appearance: textfield;
}
/* Coming Soon */ 
.coming-soon { 
 display: flex; 
 flex-direction: column; 
 align-items: center; 
 justify-content: center; 
 height: 60vh; 
 text-align: center; 
 color: var(--text-muted); 
}
.coming-soon i { 
 font-size: 3rem; 
 margin-bottom: 1rem; 
 opacity: 0.5; 
}
.coming-soon h2 { 
 margin-bottom: 0.5rem; 
 color: var(--text-secondary); 
 font-size: 1.35rem; 
}
.coming-soon p { 
 font-size: 0.9rem; 
}
/* Responsive Design */ 
@media (max-width: 1400px) { 
 .kpi-cards { 
  grid-template-columns: 1fr 1fr 1fr; 
 } 
 .metric-cards { 
  grid-template-columns: repeat(2, 1fr); 
 } 
 .machines-stats { 
  grid-template-columns: repeat(2, 1fr); 
 } 
}
@media (max-width: 1200px) { 
 .kpi-cards { 
  grid-template-columns: repeat(2, 1fr); 
 } 
 .metric-cards { 
  grid-template-columns: repeat(2, 1fr); 
 } 
 .dashboard-header { 
  flex-direction: column; 
  align-items: flex-start; 
 } 
 .header-right { 
  width: 100%; 
  justify-content: flex-start; 
 } 
 .machines-container.grid-view { 
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
 } 
}
@media (max-width: 968px) { 
 :root { 
  --sidebar-width: 150px; 
  --viewer-sidebar-width: 200px; 
 } 
 .dashboard-main { 
  padding: 0.75rem; 
 } 
 .svg-viewer-container { 
  grid-template-columns: 1fr 200px; 
 } 
}
@media (max-width: 768px) { 
 .app-wrapper { 
  grid-template-columns: 1fr; 
 } 
 .dashboard-sidebar { 
  position: relative; 
  width: 100%; 
  height: auto; 
  padding: 0.75rem; 
 } 
 .logo-section { 
  flex-direction: row; 
  justify-content: center; 
 } 
 .nav-item { 
  flex-direction: row; 
  gap: 0.5rem; 
  text-align: left; 
 } 
 .dashboard-main { 
  margin-left: 0; 
  padding: 0.75rem; 
 } 
 .kpi-cards { 
  grid-template-columns: 1fr; 
 } 
 .metric-cards { 
  grid-template-columns: 1fr; 
 } 
 .machines-stats { 
  grid-template-columns: 1fr; 
 } 
 .chart-header { 
  flex-direction: column; 
  align-items: flex-start; 
 } 
 .chart-tabs { 
  width: 100%; 
  justify-content: flex-start; 
 } 
 /* SVG viewer mobile layout now handled by mobile.css */ 
 .machines-header { 
  flex-direction: column; 
  align-items: flex-start; 
 } 
 .machines-container.grid-view { 
  grid-template-columns: 1fr; 
 } 
 .section-header { 
  padding: 1rem; 
  flex-direction: column; 
  gap: 1rem; 
  align-items: flex-start; 
 } 
 .machines-container { 
  padding: 1rem; 
 } 
 .machine-mgmt-card.list-item { 
  flex-direction: column; 
  align-items: flex-start; 
 } 
 .machine-mgmt-card.list-item .machine-thumb-mgmt { 
  width: 100%; 
  height: 150px; 
  margin-right: 0; 
  margin-bottom: 1rem; 
 } 
 .machine-mgmt-card.list-item .machine-mgmt-info { 
  flex-direction: column; 
  align-items: flex-start; 
  width: 100%; 
 } 
 .machine-mgmt-card.list-item .machine-mgmt-stats, 
 .machine-mgmt-card.list-item .machine-mgmt-actions { 
  margin-left: 0; 
  width: 100%; 
 } 
}
/* Scrollbar */ 
::-webkit-scrollbar { 
 width: 3px; 
 height: 3px; 
}
::-webkit-scrollbar-track { 
 background: rgba(248, 250, 252, 0.5); 
 border-radius: 1px; 
}
::-webkit-scrollbar-thumb { 
 background: rgba(148, 163, 184, 0.3); 
 border-radius: 1px; 
}
::-webkit-scrollbar-thumb:hover { 
 background: rgba(148, 163, 184, 0.5); 
}
/* Animation Utils */ 
.fade-in { 
 animation: fadeIn 0.3s ease-out; 
}
@keyframes fadeIn { 
 from { 
  opacity: 0; 
  transform: translateY(10px); 
 } 
 to { 
  opacity: 1; 
  transform: translateY(0); 
 } 
}
/* Error States */ 
.error-overlay { 
 position: absolute; 
 inset: 0; 
 background: rgba(255, 255, 255, 0.95); 
 backdrop-filter: blur(10px); 
 display: flex; 
 flex-direction: column; 
 align-items: center; 
 justify-content: center; 
 gap: var(--spacing-lg); 
 z-index: 30; 
 text-align: center; 
 padding: var(--spacing-xl); 
}
.error-icon { 
 width: 64px; 
 height: 64px; 
 background: linear-gradient(135deg, var(--danger-color), #dc2626); 
 border-radius: 50%; 
 display: flex; 
 align-items: center; 
 justify-content: center; 
 color: white; 
 font-size: 1.5rem; 
}
.notification { 
 position: fixed; 
 top: var(--spacing-lg); 
 right: var(--spacing-lg); 
 z-index: 6000; 
 padding: var(--spacing-md) var(--spacing-lg); 
 background: var(--card-bg); 
 backdrop-filter: blur(20px); 
 border: 1px solid var(--border-color); 
 border-radius: var(--border-radius-sm); 
 box-shadow: var(--shadow-lg); 
 display: flex; 
 align-items: center; 
 gap: var(--spacing-sm); 
 font-weight: 500; 
 font-size: 0.875rem; 
 animation: slideIn 0.3s ease-out; 
}
@keyframes slideIn { 
 from { 
  transform: translateX(100%); 
  opacity: 0; 
 } 
 to { 
  transform: translateX(0); 
  opacity: 1; 
 } 
}
.notification.success { border-left: 4px solid var(--success-color); } 
.notification.error { border-left: 4px solid var(--danger-color); } 
.notification.warning { border-left: 4px solid var(--warning-color); } 
.notification.info { border-left: 4px solid var(--primary-color); } 
/* Additional Dashboard Animations */ 
.kpi-card, .metric-card, .chart-section { 
 animation: slideUp 0.5s ease-out; 
}
@keyframes slideUp { 
 from { 
  opacity: 0; 
  transform: translateY(20px); 
 } 
 to { 
  opacity: 1; 
  transform: translateY(0); 
 } 
}
/* Real-time Updates */ 
.kpi-content h3, .metric-content h4 { 
 transition: all 0.3s ease; 
}
.kpi-content h3.updating, .metric-content h4.updating { 
 transform: scale(1.05); 
 color: var(--primary-color); 
}
/* === Seçili Parça Paneli === */
.sidebar-panel:first-child .panel-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group-compact {
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  transition: all 0.2s ease;
}

.form-group-compact:hover {
  background: #f1f5f9;
  border-color: var(--primary-color);
}

.form-label-compact {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  display: block;
}

.form-value-compact {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* === Sepet Paneli === */
.cart-item {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  background: rgba(248, 250, 252, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.cart-item:hover {
  background: rgba(102, 126, 234, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.cart-item-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cart-qty-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.quantity-input-compact {
  width: 32px;
  height: 1.3rem;
  font-size: 0.65rem;
  border-radius: 4px;
}

/* Remove butonu */
.remove-btn {
  background: var(--danger-color);
  color: white;
  border: none;
  font-size: 0.6rem;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.remove-btn:hover {
  background: #b91c1c;
}

/* Cart Footer - Order Action Buttons */
.cart-footer {
  padding: 15px;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  display: none; /* Hidden by default, shown when cart has items */
}

.cart-footer.show {
  display: block;
}

/* Login Overlay Styles (Theme-Aligned) */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--light-bg);
  backdrop-filter: blur(15px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-box {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.login-logo .fa-cogs { 
  font-size: 1.75rem; 
  background: var(--primary-gradient);
  background-clip: text; /* Standart özellik (Firefox vb. için) */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-logo h3 { 
  margin: 0; 
  font-size: 1.75rem; 
  font-weight: 700;
  color: var(--text-primary);
}

.login-title {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-error-message {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 3px solid var(--danger-color);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group-login {
  position: relative;
}

.input-group-login i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-group-login input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  background: var(--light-bg);
  transition: all 0.2s ease;
}
.input-group-login input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.btn-login {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-md);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Input Group Styles (for code regeneration buttons) */
.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
}

.input-group .btn-outline-secondary {
  background: var(--light-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-group .btn-outline-secondary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.input-group .btn i {
  transition: transform 0.3s ease;
}

.input-group .btn:hover i {
  transform: rotate(180deg);
}

/* User Management Page Styles */
.users-management {
  width: 100%;
  max-width: none;
  padding: 0;
}

.users-container {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.user-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  transition: all 0.3s ease;
}

.user-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--glass-bg);
}

.user-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.user-card-info {
  flex-grow: 1;
}

.user-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.user-card-username {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-card-role {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
}
.user-card-role.admin { background-color: rgba(239, 68, 68, 0.1); color: var(--danger-color); }
.user-card-role.user { background-color: rgba(102, 126, 234, 0.1); color: var(--primary-color); }

.user-card-body { padding: 1.5rem; }
.permissions-title { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.75rem; }
.permissions-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.permission-tag { background: rgba(16, 185, 129, 0.1); color: var(--success-color); padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.permission-tag-empty { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.permission-tag-admin { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.permission-tag.disabled { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); text-decoration: line-through; }

.user-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-edit-permissions {
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
}

.btn-edit-permissions:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Permissions Modal Styles */
.permissions-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.permissions-modal .custom-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.permissions-modal .modal-content {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.permissions-modal .modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
}

.permissions-modal .modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.permissions-modal .modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.permissions-modal .modal-close:hover {
  background: var(--danger-color);
  color: white;
}

.permissions-modal .modal-body {
  padding: 2rem;
  overflow-y: auto;
}

.permissions-modal .modal-subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.machine-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.machine-checkbox-item {
  display: block;
}

.machine-checkbox-item input {
  margin-right: 0.75rem;
}

.machine-checkbox-item label {
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
}

.machine-check-name {
  font-weight: 500;
  color: var(--text-primary);
}

.machine-check-id {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.permissions-modal .modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  background: var(--glass-bg);
}

/* Parts Database Page Styles - Compact */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.table-container {
  overflow-x: auto;
  margin: 1rem 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--light-bg);
}

.table th {
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
  font-size: 0.85rem;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(102, 126, 234, 0.03);
}

.table .btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  border-radius: 5px;
  font-size: 0.9rem;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.15rem;
}

.table .btn-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.table .btn-icon.text-danger {
  color: var(--danger-color);
}

.table .btn-icon.text-danger:hover,
.table .btn-icon.btn-danger:hover {
  background: var(--danger-color);
  color: white;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0 1rem;
}

/* Form Styles for Modals */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.form-control:disabled {
  background: var(--light-bg);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin: 0 -0.5rem;
}

.form-row .form-group {
  flex: 1;
  padding: 0 0.5rem;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.custom-control {
  position: relative;
  display: block;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.custom-control-input {
  position: absolute;
  left: 0;
  z-index: -1;
  opacity: 0;
}

.custom-control-label {
  position: relative;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: var(--text-primary);
}

.custom-control-label::before {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  content: "";
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.custom-control-input:checked ~ .custom-control-label::after {
  position: absolute;
  top: 0.5rem;
  left: -1.25rem;
  display: block;
  width: 0.5rem;
  height: 0.25rem;
  content: "";
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
}

.modal-large {
  max-width: 900px;
  width: 90%;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.header-left h1 {
  margin: 0 0 0.3rem 0;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.header-left .subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.header-right {
  display: flex;
  gap: 0.75rem;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================================
   ORDER MANAGEMENT STYLES
   ============================================================================ */

.orders-list {
  display: grid;
  gap: 1.5rem;
}

.order-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.order-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.order-number {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.order-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-icon.text-danger:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-icon.btn-warning {
  color: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-icon.btn-warning:hover {
  background: var(--warning-color);
  color: white;
}

.order-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.order-info > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.order-info i {
  color: var(--primary-color);
  width: 16px;
}

.order-notes {
  padding: 0.75rem;
  background: rgba(102, 126, 234, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.order-notes i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-secondary { background: #6c757d; color: white; }
.badge-warning { background: var(--warning-color); color: white; }
.badge-info { background: #0dcaf0; color: white; }
.badge-primary { background: var(--primary-color); color: white; }
.badge-success { background: var(--success-color); color: white; }
.badge-danger { background: var(--danger-color); color: white; }

/* Order Detail Modal */
.order-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row strong {
  color: var(--text-primary);
}

.order-items-table {
  overflow-x: auto;
  margin: 1rem 0;
}

.order-items-table table {
  width: 100%;
  border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.order-items-table th {
  background: rgba(102, 126, 234, 0.05);
  font-weight: 600;
  color: var(--text-primary);
}

.status-update-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  padding: 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: var(--border-radius-sm);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.history-status {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.history-comment {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.history-user {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.modal-large {
  max-width: 900px;
  width: 90%;
}

.btn-pagination {
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pagination:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-pagination.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.w-100 {
  width: 100%;
}

.mb-2 {
  margin-bottom: 0.5rem;
}



/* ============================================================================
   HIERARCHICAL MACHINE SELECTION STYLES
   ============================================================================ */

.hierarchy-selectors,
.hierarchy-selectors-modal {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.hierarchy-selectors .form-label,
.hierarchy-selectors-modal .form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
}

.hierarchy-selectors .form-select,
.hierarchy-selectors-modal .form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-primary);
  background-color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hierarchy-selectors .form-select:hover,
.hierarchy-selectors-modal .form-select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hierarchy-selectors .form-select:focus,
.hierarchy-selectors-modal .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.hierarchy-selectors .form-select:disabled,
.hierarchy-selectors-modal .form-select:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.6;
}

.hierarchy-selectors .form-select-lg {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
}

/* Machine Card Styles */
.machine-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
}

.machine-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.machine-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.machine-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.machine-card:hover .machine-card-image img {
  transform: scale(1.05);
}

.machine-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.machine-card:hover .machine-card-overlay {
  opacity: 1;
}

.btn-view-machine {
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.btn-view-machine:hover {
  transform: scale(1.05);
}

.machine-card-content {
  padding: var(--spacing-lg);
}

.machine-card-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

.machine-card-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-md) 0;
  line-height: 1.5;
}

.machine-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.badge-secondary {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
}

/* Machines Container Grid */
.machines-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

/* View Controls */
.view-controls {
  display: flex;
  gap: var(--spacing-sm);
}

.view-toggle {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.view-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.view-toggle.active {
  background: var(--primary-gradient);
  border-color: var(--primary-color);
  color: white;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .hierarchy-selectors .row {
    flex-direction: column;
  }
  
  .machines-container {
    grid-template-columns: 1fr;
  }
  
  .machine-card-image {
    height: 150px;
  }
}


/* ============================================================================
   THREE PANEL MACHINE SELECTION LAYOUT
   ============================================================================ */

.ms-three-panel-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  flex: 1; /* Take remaining space */
  min-height: 0; /* Important for flex scroll */
  overflow: hidden;
}

.ms-panel {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.ms-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.5);
}

.ms-panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ms-panel-title i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.ms-panel-count {
  background: var(--primary-color);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.ms-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.ms-panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ms-panel-item:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.04);
  transform: translateX(2px);
}

.ms-panel-item.active {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.08);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.ms-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.ms-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  font-size: 1.125rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.ms-item-thumb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 1);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.ms-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ms-item-text {
  flex: 1;
  min-width: 0;
}

.ms-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-item-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-item-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ms-panel-item:hover .ms-item-arrow {
  transform: translateX(3px);
  color: var(--primary-color);
}

.ms-item-action {
  margin-left: 0.5rem;
}

.btn-open-viewer {
  padding: 0.5rem 0.875rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8125rem;
  font-size: var(--font-size-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-open-viewer:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ms-machine-item {
  border-left: 4px solid var(--primary-color);
}

.ms-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

.ms-panel-empty i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.25;
  color: var(--text-muted);
}

.ms-panel-empty p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
}

.ms-back-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ms-back-button:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Scrollbar Styling */
.ms-panel-body::-webkit-scrollbar {
  width: 8px;
}

.ms-panel-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.ms-panel-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.ms-panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1200px) {
  .ms-three-panel-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .ms-panel {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .ms-panel-header {
    padding: var(--spacing-md);
  }
  
  .ms-panel-title {
    font-size: var(--font-size-base);
  }
  
  .ms-item-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .ms-item-thumb {
    width: 48px;
    height: 48px;
  }
}


/* ============================================================================
   ADD MACHINE MODAL - Enhanced Styling
   ============================================================================ */

#addMachineModal .modal-dialog {
  max-width: 800px;
}

#addMachineModal .modal-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: 0;
}

#addMachineModal .modal-header .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

#addMachineModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* Alert Styles for all modals */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-info {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bae6fd;
  color: #075985;
}

.alert-info a {
  color: #0369a1;
  font-weight: 600;
  text-decoration: underline;
}

.alert-info a:hover {
  color: #075985;
}

#addMachineModal .alert-info {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--border-radius-sm);
  color: #075985;
}

#addMachineModal .form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#addMachineModal .form-label i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

#addMachineModal .form-control,
#addMachineModal .form-select {
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--border-color);
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#addMachineModal .form-control:focus,
#addMachineModal .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

#addMachineModal .form-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

#addMachineModal hr {
  border-top: 2px solid var(--border-color);
  opacity: 0.3;
}

#addMachineModal h6 {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

#addMachineModal h6 i {
  margin-right: 0.75rem;
  color: var(--primary-color);
}

#addMachineModal .modal-footer {
  border-top: 2px solid var(--border-color);
  padding: 1rem 1.5rem;
}

#addMachineModal .btn {
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

#addMachineModal .btn-primary {
  background: var(--primary-gradient);
  border: none;
}

#addMachineModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#addMachineModal .btn-secondary {
  background: #e2e8f0;
  color: var(--text-primary);
  border: none;
}

#addMachineModal .btn-secondary:hover {
  background: #cbd5e1;
}

/* Add New Machine Button */
#btn-add-new-machine {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  background: var(--primary-gradient);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

#btn-add-new-machine:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.25);
}

#btn-add-new-machine i {
  margin-right: 0.5rem;
}

/* ============================================================================
   EDIT MACHINE BUTTON - Machine Panel Items
   ============================================================================ */

.ms-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-edit-machine {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-machine:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: scale(1.05);
}

.btn-edit-machine i {
  font-size: 0.875rem;
}

/* Adjust machine item for multiple buttons */
.ms-machine-item .ms-item-content {
  flex: 1;
}

.ms-machine-item .ms-item-actions {
  flex-shrink: 0;
}

/* Responsive: Stack buttons on smaller screens */
@media (max-width: 768px) {
  .ms-item-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .btn-edit-machine {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================================
   CASCADING DROPDOWNS - New Category Inputs
   ============================================================================ */

#new-product-group-input,
#new-machine-type-input,
#new-machine-model-input {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#new-product-group-value,
#new-machine-type-value,
#new-machine-model-value {
  border: 2px dashed var(--primary-color);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

#new-product-group-value:focus,
#new-machine-type-value:focus,
#new-machine-model-value:focus {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Highlight NEW option in dropdowns */
#machine-product-group option[value='__NEW__'],
#machine-machine-type option[value='__NEW__'],
#machine-machine-model option[value='__NEW__'] {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  font-weight: 600;
  color: var(--primary-color);
}

/* ============================================================================
   MACHINE PARTS MANAGEMENT MODAL
   ============================================================================ */

.parts-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.parts-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.parts-stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.parts-stat-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.parts-stat-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.parts-panel {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  height: 500px;
  display: flex;
  flex-direction: column;
}

.parts-panel-header {
  padding: 1rem;
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.parts-panel-header h6 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.parts-panel-header input {
  max-width: 200px;
}

.parts-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.part-item:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.04);
  transform: translateX(2px);
}

.part-item-content {
  flex: 1;
  min-width: 0;
}

.part-item-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
  margin-bottom: 0.25rem;
}

.part-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.part-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
}

.btn-part-action {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-part-add {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.btn-part-add:hover {
  background: rgba(34, 197, 94, 0.2);
  transform: scale(1.05);
}

.btn-part-remove {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-part-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
}

.btn-part-edit {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.btn-part-edit:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: scale(1.05);
}

/* ========================================
   TEMPLATE MANAGEMENT STYLES
   ======================================== */

.template-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.template-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.template-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.template-card-title i {
  font-size: 1rem;
  color: var(--primary-color);
}

.template-card-category {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  border-radius: 4px;
  font-weight: 500;
}

.template-card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem 0;
  line-height: 1.5;
}

.template-card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.template-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.template-stat i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.875rem;
}

.template-stat .stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.template-stat .stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.template-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.template-card-actions .btn {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem;
  border-radius: 6px;
}

.template-status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.template-status-active {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.template-status-inactive {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
}

.template-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.template-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.template-empty-state h6 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.template-empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ========================================
   PART LIST PANEL (Alt Panel)
   ======================================== */
.part-list-panel {
  background: white;
  border-radius: 0;
  border-top: 2px solid #e2e8f0;
  overflow: hidden;
  margin: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 280px; /* Fixed height */
  max-height: 280px; /* Ensure it doesn't exceed */
  position: relative;
}

/* Override inline display:none when JS shows the panel */
.part-list-panel[style*="display: flex"],
.part-list-panel[style*="display:flex"] {
  display: flex !important;
}

.part-list-panel.collapsed {
  height: 40px; /* Only show header when collapsed */
  max-height: 40px;
}

.part-list-header {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.part-list-header h6 {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  margin: 0;
}

.part-list-content {
  flex: 1; /* Take remaining space */
  overflow-y: auto !important; /* Force scroll */
  overflow-x: hidden;
  background: white;
  position: relative;
  min-height: 0; /* Important for flex scroll */
  max-height: calc(280px - 42px); /* Total height minus header */
}

/* Part List Content Scrollbar */
.part-list-content::-webkit-scrollbar {
  width: 6px;
}

.part-list-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.part-list-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.part-list-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Part List Table - Minimal & Compact */
.part-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  display: table; /* Ensure proper table layout */
  table-layout: fixed; /* Fixed layout for consistent column widths */
}

.part-list-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.part-list-table thead th {
  padding: 0.4rem 0.6rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #f8fafc;
}

.part-list-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.part-list-table tbody tr:hover {
  background: #f8fafc;
}

.part-list-table tbody tr.selected {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.part-list-table tbody tr.selected td:first-child {
  padding-left: calc(0.6rem - 3px);
}

.part-list-table tbody td {
  padding: 0.45rem 0.6rem;
  color: #1e293b;
  vertical-align: middle;
  user-select: none;
  font-size: 0.75rem;
}

.part-list-table tbody td:first-child {
  font-weight: 500;
  color: #3b82f6;
  padding-left: 0.6rem;
}

.part-list-table .part-code {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  font-weight: 600;
}

.part-list-table .part-name {
  color: #475569;
  font-size: 0.75rem;
}

.part-list-table .part-quantity {
  text-align: center;
  font-weight: 600;
  color: #10b981;
  font-size: 0.75rem;
}

.part-list-table .part-actions {
  text-align: right;
}

.part-list-table .part-actions {
  display: flex;
  gap: 0.2rem;
  justify-content: flex-end;
  align-items: center;
}

.part-list-table .btn-show-part,
.part-list-table .btn-add-cart {
  padding: 0.25rem 0.4rem;
  font-size: 0.65rem;
  border: none;
  color: white;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
}

.part-list-table .btn-show-part {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.part-list-table .btn-show-part:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.part-list-table .btn-add-cart {
  background: var(--primary-gradient);
}

.part-list-table .btn-add-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.part-list-table .btn-show-part:active,
.part-list-table .btn-add-cart:active {
  transform: translateY(0);
}

/* Scrollbar Styling */
.part-list-content::-webkit-scrollbar {
  width: 8px;
}

.part-list-content::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.part-list-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.part-list-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Empty State */
.part-list-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #94a3b8;
}

.part-list-empty i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================================
   USER MANAGEMENT - MODERN TABLE VIEW
   ============================================================ */

/* Stats Cards */
.stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.stats-icon.bg-primary { background: var(--primary-gradient); }
.stats-icon.bg-success { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.stats-icon.bg-info { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.stats-icon.bg-warning { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stats-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.stats-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Search Box */
.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-box input {
  padding-left: 2.5rem;
}

/* Table Improvements */
#users-table {
  margin-bottom: 0;
}

#users-table thead th {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
  padding: 0.7rem 0.85rem;
  white-space: nowrap;
  font-size: 0.8rem;
}

#users-table tbody td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  font-size: 0.85rem;
}

#users-table .sortable {
  cursor: pointer;
  user-select: none;
}

#users-table .sortable:hover {
  background: #f1f5f9;
}

#users-table .sortable i {
  font-size: 0.75rem;
  color: #cbd5e1;
  transition: color 0.2s;
}

#users-table .sortable:hover i {
  color: #64748b;
}

#users-table .sortable.asc i::before {
  content: "\f0d8";
  color: var(--primary-color);
}

#users-table .sortable.desc i::before {
  content: "\f0d7";
  color: var(--primary-color);
}

/* User Badge Styles - Minimalist */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.user-badge i {
  font-size: 0.9rem;
}

.user-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
}

.user-contact-info .email {
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-contact-info .email i {
  font-size: 0.75rem;
}

.user-contact-info .phone {
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-contact-info .phone i {
  font-size: 0.75rem;
}

.role-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.role-badge.admin {
  background: var(--primary-gradient);
  color: white;
}

.role-badge.customer {
  background: #e0e7ff;
  color: #4f46e5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge i {
  font-size: 0.7rem;
}

.status-badge.active {
  background: #dcfce7;
  color: #16a34a;
}

.status-badge.inactive {
  background: #fee2e2;
  color: #dc2626;
}

.status-badge i {
  font-size: 0.625rem;
}

.permissions-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 280px;
}

.permission-mini-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #475569;
  white-space: nowrap;
}

.permission-mini-tag.all {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
  color: #92400e;
  font-weight: 600;
}

.permissions-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: #e0e7ff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4f46e5;
}

/* Action Buttons - Minimalist */
.user-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-actions .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 5px;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.user-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.user-actions .btn i {
  font-size: 0.75rem;
  margin-right: 0.3rem;
}

.user-actions .btn-edit {
  background: #eff6ff;
  color: #3b82f6;
  border: 1px solid #bfdbfe;
}

.user-actions .btn-edit:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-actions .btn-permissions {
  background: #fef3c7;
  color: #f59e0b;
  border: 1px solid #fde68a;
}

.user-actions .btn-permissions:hover {
  background: #f59e0b;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.user-actions .btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.user-actions .btn-delete:hover:not(:disabled) {
  background: #dc2626;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.user-actions .btn-delete:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
}

/* Card Header - Compact */
.card-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.85rem 1rem;
}

.card-body {
  padding: 1rem;
}

.card-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-card {
    margin-bottom: 1rem;
  }
  
  .user-actions {
    flex-direction: column;
  }
  
  .permissions-preview {
    max-width: 100%;
  }

  /* Account Grid Responsive */
  .account-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  /* Registration Cards Responsive */
  .registrations-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-box {
    padding: 1rem;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .registrations-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .registration-card {
    padding: 1rem;
  }

  .registration-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .registration-card-title h3 {
    font-size: 1rem;
  }

  .registration-card-footer .btn {
    padding: 0.5rem;
    font-size: 0.813rem;
  }

  .registration-info-label {
    min-width: 60px;
    font-size: 0.813rem;
  }

  .registration-info-value {
    font-size: 0.813rem;
  }

  .page-header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .page-title-wrapper {
    text-align: center;
  }

  /* Profile Header Simple Responsive */
  .profile-header-simple {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .profile-meta-simple {
    width: 100%;
    justify-content: center;
  }

  /* Professional Table Responsive */
  .table-header-bar {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .table-title {
    font-size: 1rem;
  }

  .search-box input {
    width: 100%;
  }

  .professional-table thead th {
    padding: 1rem;
    font-size: 0.75rem;
  }

  .professional-table tbody td {
    padding: 1rem;
  }

  .machine-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .machine-info-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .date-info {
    gap: 0.375rem;
  }

  .date-item {
    font-size: 0.75rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 0.375rem;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }



  /* Info Cards Responsive */
  .info-card-header {
    padding: 1rem;
  }

  .info-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .info-card-title h3 {
    font-size: 0.938rem;
  }

  .info-card-body {
    padding: 1rem;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .info-label {
    width: 100%;
  }

  .info-value {
    width: 100%;
    text-align: left;
  }

  .activity-timeline {
    padding-left: 1.5rem;
  }

  .activity-timeline::before {
    left: 14px;
  }

  .activity-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .activity-content h4 {
    font-size: 0.875rem;
  }

  .activity-content p {
    font-size: 0.75rem;
  }
}
