/* Mobile-First Industrial UI Design System for PPIC GIIC-B Chemical Inventory - Clean Light Mode */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap');

:root {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  
  --primary: #2563eb;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --accent-purple: #9333ea;
  --accent-purple-gradient: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #2563eb;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* Mobile Header Bar */
.mobile-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mobile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 600;
}

/* Main Container */
.mobile-container {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Mobile Mode Segmented Switcher */
.mode-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  margin-bottom: 1.25rem;
  gap: 4px;
}

.mode-tab {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  touch-action: manipulation;
}

.mode-tab.active.inbound {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.mode-tab.active.outbound {
  background: var(--accent-purple-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25);
}

/* Form Container Card */
.form-mobile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.5rem;
}

.form-group-m {
  margin-bottom: 1.1rem;
}

.form-label-m {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.req {
  color: var(--danger);
}

.input-m, .select-m {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: #0f172a;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  min-height: 48px;
  transition: all 0.2s ease;
}

.input-m:focus, .select-m:focus {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.drum-lot-field, .drum-no-field, .drum-custom-part {
  text-transform: uppercase;
}

/* Chemical Type Selection Grid Buttons */
.chem-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.chem-type-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.8rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  min-height: 48px;
  touch-action: manipulation;
}

.chem-type-btn:hover {
  border-color: #2563eb;
  color: #0f172a;
}

.chem-type-btn.active {
  background: #eff6ff;
  border: 2px solid #2563eb;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.chem-type-btn[data-part="TM-20"].active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.chem-type-btn[data-part="Rikezai"].active {
  background: #faf5ff;
  border-color: #a855f7;
  color: #7e22ce;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.chem-type-btn[data-part="Wash Benzine"].active {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* Native Date Picker Mobile Touch Optimization */
input[type="date"] {
  color-scheme: light;
  cursor: pointer;
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: none;
  opacity: 0.75;
  padding: 6px;
  width: 24px;
  height: 24px;
}

/* Mobile Camera Capture Button */
.cam-btn-m {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.9rem;
  width: 100%;
  cursor: pointer;
  min-height: 52px;
}

/* Mobile Sticky Bottom Submit Bar */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
}

.btn-submit-m {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-submit-m.outbound {
  background: var(--accent-purple-gradient);
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.3);
}

/* Stock List Title */
.stock-list-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
