/* RodDede Car Paint Shop Plugin - Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f172a;
  --accent: #38bdf8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-lg: 16px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* RodDede Ecosystem Top Navigation Bar */
.roddede-eco-bar {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 15, 29, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 20px;
  font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif;
  font-size: 13px;
}

.roddede-eco-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.roddede-eco-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.roddede-eco-links {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.roddede-eco-link {
  color: #94a3b8;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.roddede-eco-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.roddede-eco-link.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

/* Main App Header */
.app-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
  color: white;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.shop-title {
  margin: 6px 0 2px 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.shop-subtitle {
  margin: 0;
  font-size: 14px;
  color: #cbd5e1;
}

/* Nav Tabs */
.nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  max-width: 1600px;
  margin: 0 auto;
}

.nav-tab-btn {
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--primary);
  background: #f8fafc;
}

.nav-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

/* App Main Container */
.app-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Metric Cards */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  border-left: 6px solid var(--primary);
}

.metric-card.alert {
  border-left-color: var(--danger);
}

.metric-card.success {
  border-left-color: var(--success);
}

.metric-card.warning {
  border-left-color: var(--warning);
}

.metric-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin: 8px 0 4px 0;
  font-family: 'Plus Jakarta Sans', monospace;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-col {
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  border: 1px solid #e2e8f0;
}

.kanban-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #cbd5e1;
}

.kanban-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-badge {
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  border: 1px solid #cbd5e1;
}

.kanban-cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.car-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border-left: 4px solid var(--primary);
}

.car-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.car-plate {
  display: inline-block;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  font-family: monospace;
  font-size: 14px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.car-model {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.car-info {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  font-size: 11.5px;
}

/* Green Job Order Sheet (Soft Mint Pastel #eaf6eb) */
.job-order-sheet {
  background-color: #eaf6eb;
  border: 2px solid #064e3b;
  border-radius: 8px;
  padding: 24px;
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.sheet-header {
  border-bottom: 2px solid #064e3b;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-title {
  text-align: center;
  flex: 1;
}

.sheet-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #064e3b;
  letter-spacing: 0.5px;
}

.sheet-title p {
  margin: 2px 0 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
}

.order-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.order-col-header {
  background: #064e3b;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.order-items-list {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(6, 78, 59, 0.2);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(6, 78, 59, 0.15);
}

/* Workshop Timer Station */
.station-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.station-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.station-timer-display {
  background: #0f172a;
  color: #38bdf8;
  font-family: 'Courier New', monospace;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  letter-spacing: 2px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Photo Gallery Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.photo-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.photo-thumb-wrapper {
  position: relative;
  height: 190px;
  background: #0f172a;
  overflow: hidden;
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-thumb:hover {
  transform: scale(1.05);
}

.photo-watermark {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.3;
  font-family: monospace;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

/* Print Styles */
@media print {
  .roddede-eco-bar,
  .app-header,
  .nav-tabs-wrapper,
  .no-print,
  button,
  .btn {
    display: none !important;
  }
  
  body, .app-container {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .job-order-sheet {
    box-shadow: none !important;
    border: 2px solid #000 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    page-break-after: always;
  }
}
