/* Global Design Tokens & Variables */
:root {
  /* Common Palette */
  --primary: #4fb428;         /* Logo Green (R:79 G:180 B:40) */
  --primary-hover: #3f961e;
  --primary-light: rgba(79, 180, 40, 0.1);
  --secondary: #3b82f6;       /* Blue */
  --secondary-hover: #2563eb;
  --secondary-light: rgba(59, 130, 246, 0.1);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  
  /* Status Colors */
  --status-pending: #f59e0b;
  --status-inprogress: #3b82f6;
  --status-external: #8b5cf6;
  --status-waiting: #ec4899;
  --status-completed: #10b981;
  --status-delivered: #64748b;
  --status-closed: #111827;
  --status-canceled: #ef4444;

  /* Typography */
  --font-family: 'Prompt', 'Inter', -apple-system, sans-serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Light Theme Specific (Default) */
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --blur-amount: 12px;
}

/* Dark Theme overrides */
[data-theme="dark"] {
  --bg-app: #0b0f19;
  --bg-card: #151c2c;
  --bg-sidebar: #0e1322;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.2), 0 2px 4px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.15);
  --glass-bg: rgba(21, 28, 44, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Main Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling (Desktop) */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-white);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 12px;
}

.sidebar-logo {
  background-image: url('logo.jpg');
  background-size: 96.3px 40px;
  background-position: 0px 0px;
  background-repeat: no-repeat;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(79, 180, 40, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text p {
  font-size: 10px;
  color: var(--primary);
  font-weight: 500;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.sidebar-link.active {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(79, 180, 40, 0.2);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-normal);
}

/* Header bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title h2 {
  font-size: 24px;
  font-weight: 600;
}

.page-title p {
  font-size: 14px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Interactive Role Switcher & Theme toggle */
.role-switcher-badge {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-toggle-theme {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-toggle-theme:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.btn-toggle-theme svg {
  width: 18px;
  height: 18px;
}

/* Bottom Navigation (Mobile Only) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border-top: 1px solid var(--border-color);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  flex-grow: 1;
  height: 100%;
  gap: 4px;
  cursor: pointer;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* Dashboard Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-color, var(--primary));
}

.stat-info h3 {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.stat-icon {
  background-color: var(--accent-light, var(--primary-light));
  color: var(--accent-color, var(--primary));
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

/* Charts & Lists in Dashboard */
.dashboard-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-card-header h3 {
  font-size: 18px;
  font-weight: 600;
}

/* Workload List */
.workload-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
}

.workload-tech-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.workload-tech-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.workload-badges {
  display: flex;
  gap: 8px;
}

.workload-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.workload-badge.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.workload-badge.in-progress {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.workload-badge.completed {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

/* Kanban Board Styling */
.kanban-view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.kanban-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select, .search-input {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus, .search-input:focus {
  border-color: var(--primary);
}

.kanban-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
  min-height: calc(100vh - 250px);
}

.kanban-column {
  flex: 0 0 300px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 250px);
  box-shadow: var(--shadow-sm);
}

.kanban-column-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.kanban-column-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--col-color, var(--primary));
}

.column-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-title {
  font-size: 14px;
  font-weight: 600;
}

.column-count {
  background-color: var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kanban-cards-area {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 150px;
}

/* Kanban Cards */
.kanban-card {
  background-color: var(--bg-app);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

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

.kanban-card:active {
  cursor: grabbing;
}

.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.card-tag.device_repair {
  background-color: rgba(79, 180, 40, 0.1);
  color: #4fb428;
}

.card-tag.system_repair {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.card-tag.installation {
  background-color: rgba(236, 72, 153, 0.1);
  color: #db2777;
}

.card-tag.cm_pm {
  background-color: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.card-job-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  float: right;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  clear: both;
}

.card-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
}

.card-tech {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.card-tech svg {
  width: 12px;
  height: 12px;
}

/* Mobile Column Quick Shift Selector */
.mobile-only-quick-shift {
  display: none;
}

/* JobList Table Styles */
.job-list-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.job-list-controls {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.job-table th {
  background-color: var(--bg-app);
  padding: 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.job-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.job-table tr:hover td {
  background-color: rgba(79, 180, 40, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge.status-pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge.status-in_progress {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.badge.status-external_claim {
  background-color: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.badge.status-waiting {
  background-color: rgba(236, 72, 153, 0.1);
  color: #db2777;
}

.badge.status-completed {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge.status-delivered {
  background-color: rgba(100, 116, 139, 0.1);
  color: #475569;
}

.badge.status-closed {
  background-color: rgba(17, 24, 39, 0.1);
  color: #111827;
}

.badge.status-canceled {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 180, 40, 0.2);
}

.btn-secondary {
  background-color: var(--bg-app);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-icon-only svg {
  width: 16px;
  height: 16px;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Form Styles */
.form-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  max-width: 800px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.form-header h3 {
  font-size: 20px;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.form-grid-full {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-section-title {
  grid-column: span 2;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Modals / Detail Overlays */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalEnter var(--transition-fast) forwards;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  flex-grow: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-app);
}

/* Detail view styles */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item-full {
  grid-column: span 2;
}

.detail-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.detail-value {
  font-size: 14px;
  font-weight: 500;
}

.detail-value-box {
  background-color: var(--bg-app);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Quick Action Links */
.contact-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.contact-btn.tel {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.contact-btn.line {
  background-color: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

.contact-btn.maps {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Tech Management Specific Styles */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tech-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.tech-avatar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
}

.tech-info {
  flex-grow: 1;
}

.tech-info h4 {
  font-size: 15px;
  font-weight: 600;
}

.tech-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Mobile-First Card View (When table is hidden) */
.mobile-cards-list {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.mobile-job-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px 16px 84px 16px; /* Extra padding bottom for bottom nav */
  }
  
  .top-header .mobile-only {
    display: flex !important;
    margin-right: 12px;
  }
  
  .bottom-nav {
    display: flex;
  }
  
  .dashboard-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid-full {
    grid-column: span 1;
  }
  
  .form-section-title {
    grid-column: span 1;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-item-full {
    grid-column: span 1;
  }
  
  /* Hide standard table, show card list */
  .job-table-wrapper {
    display: none;
  }
  
  .mobile-cards-list {
    display: flex;
  }
  
  .job-list-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .job-list-controls > * {
    width: 100%;
  }
  
  .mobile-only-quick-shift {
    display: block;
  }
}

/* Login Screen Styles */
.login-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0e1322 0%, #151c2c 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: rgba(21, 28, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  padding: 40px 32px;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  text-align: center;
  color: #f8fafc;
}

.login-logo-img {
  background-image: url('logo.jpg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 140px;
  height: 60px;
  margin: 0 auto 16px auto;
  border-radius: 6px;
}

.login-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-card p {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.login-card form {
  text-align: left;
}

.login-card .form-group {
  margin-bottom: 18px;
}

.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #cbd5e1;
}

.login-card .form-control {
  background-color: #0b0f19;
  border: 1px solid #1e293b;
  color: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  outline: none;
  font-size: 14px;
  font-family: var(--font-family);
}

.login-card .form-control:focus {
  border-color: var(--primary);
}

.login-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 20px;
  padding: 10px;
  background-color: rgba(255,255,255,0.03);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

/* Responsive Utilities */
@media (min-width: 769px) {
  .desktop-only {
    display: inline !important;
  }
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

