/* Go Lucky Ops & FSMS — Brand-Aligned Styles */
/* Palette: Blue #4278bd, Orange #E8941A, Cream #ede9e6, Black #0A0A0A, White #FFFFFF */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: linear-gradient(160deg, #0A0A0A 0%, #1a1a1a 40%, #4278bd 100%); color: #0A0A0A; min-height: 100vh; }

/* ─── Header ─── */
header { background: #FFFFFF; padding: 8px 20px 6px; display: flex; flex-direction: column; align-items: center; border-bottom: 2px solid #E8941A; box-shadow: 0 2px 10px rgba(10,10,10,0.06); position: relative; }
header img { height: 90px; margin-bottom: 0; }
.header-right { text-align: center; }
.header-right .app-label { color: #0A0A0A; font-size: 14px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; }
.header-right .date { color: #6b7280; font-size: 12px; margin-top: 3px; }
.menu-toggle { position: absolute; top: 16px; right: 16px; }

/* ─── Alert Banner ─── */
.cert-alert { background: #FEF2F2; border-bottom: 2px solid #EF4444; padding: 12px 20px; font-size: 14px; color: #EF4444; font-weight: bold; text-align: center; cursor: pointer; }
.cert-alert:hover { background: #FEE2E2; }

/* ─── Hamburger Menu ─── */
.menu-toggle { background: none; border: none; cursor: pointer; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.menu-toggle span { display: block; width: 22px; height: 2.5px; background: #0A0A0A; border-radius: 2px; transition: all 0.2s; }
.menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }
.menu-overlay.open { display: block; }
.menu-drawer { position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background: #FFFFFF; z-index: 60; transition: right 0.25s ease; box-shadow: -4px 0 20px rgba(0,0,0,0.15); overflow-y: auto; }
.menu-drawer.open { right: 0; }
nav { display: none; }
.menu-drawer button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: #0A0A0A; font-family: inherit; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #ede9e6; transition: background 0.15s; text-align: left; }
.menu-drawer button:hover { background: #ede9e6; }
.menu-drawer button.active { color: #4278bd; background: #e8eff8; border-left: 3px solid #4278bd; }

/* ─── App Container ─── */
#app { padding: 16px; max-width: 900px; margin: 0 auto; }
#main-app { background: #FFFFFF; max-width: 900px; margin: 0 auto; min-height: 100vh; box-shadow: 0 0 40px rgba(0,0,0,0.3); }

/* ─── Cards ─── */
.card { background: #FFFFFF; border: 1.5px solid #d9d4cf; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #ede9e6; color: #0A0A0A; text-transform: uppercase; letter-spacing: 0.5px; }
.card-orange { border-color: #E8941A; background: #FFFFFF; }
.card-blue { border-color: #4278bd; background: #FFFFFF; }
.card-green { border-color: #22C55E; background: #FFFFFF; }
.card-yellow { border-color: #E8941A; background: #FFFFFF; }

/* ─── Grid Layouts ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }

/* ─── Form Fields ─── */
.field { margin-bottom: 2px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: #6b7280; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid #d9d4cf; border-radius: 8px; font-size: 16px; background: #FFFFFF; font-family: inherit; color: #0A0A0A; transition: border-color 0.15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #4278bd; box-shadow: 0 0 0 3px rgba(66,120,189,0.12); }

/* ─── Buttons ─── */
.btn { width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s; text-transform: uppercase; letter-spacing: 0.5px; }
.btn:hover { opacity: 0.88; }
.btn-orange { background: #E8941A; color: #FFFFFF; }
.btn-blue { background: #4278bd; color: #FFFFFF; }
.btn-green { background: #22C55E; color: #FFFFFF; }
.btn-red { background: #EF4444; color: #FFFFFF; }
.btn-yellow { background: #E8941A; color: #FFFFFF; }

/* ─── Log Items ─── */
.log-item { padding: 10px 0; border-bottom: 1px solid #ede9e6; font-size: 15px; }
.log-item:last-child { border-bottom: none; }
.muted { color: #6b7280; }

/* ─── Badges ─── */
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; margin-right: 4px; font-weight: 600; }
.badge-green { background: #F0FDF4; color: #16A34A; }
.badge-blue { background: #e8eff8; color: #4278bd; }
.badge-red { background: #FEF2F2; color: #DC2626; }
.badge-orange { background: #fdf3e2; color: #E8941A; }

/* ─── Dashboard ─── */
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { border-radius: 12px; padding: 14px; border: 1.5px solid; background: #FFFFFF; }
.progress-bar-bg { background: #ede9e6; border-radius: 99px; height: 8px; margin: 8px 0 12px; }
.progress-bar { height: 8px; border-radius: 99px; transition: width 0.5s; }
.fsms-item { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #ede9e6; font-size: 15px; }

/* ─── Checklist ─── */
.check-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #ede9e6; cursor: pointer; }
.check-item input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: #4278bd; }

/* ─── FSMS Acknowledgment Box ─── */
.fsms-ack-box { background: #e8eff8; border: 1.5px solid #4278bd; border-radius: 10px; padding: 14px; margin-top: 12px; font-size: 15px; }
.fsms-ack-box strong { color: #4278bd; }
.fsms-ack-box label { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; cursor: pointer; line-height: 1.5; color: #0A0A0A; }
.fsms-ack-box input[type=checkbox] { accent-color: #4278bd; margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; }

/* ─── Sections ─── */
.section { display: none; }
.section.active { display: block; }

/* ─── PIN Login Screen ─── */
.pin-screen { position: fixed; inset: 0; background: linear-gradient(160deg, #0A0A0A 0%, #1a1a1a 40%, #4278bd 100%); display: flex; align-items: center; justify-content: center; flex-direction: column; z-index: 100; }
.pin-screen img { height: 120px; margin-bottom: 6px; filter: brightness(0) invert(1); }
.pin-screen .pin-subtitle { color: #E8941A; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 28px; text-align: center; max-width: 320px; padding: 0 16px; line-height: 1.4; }
.pin-screen p { color: rgba(255,255,255,0.75); margin-bottom: 14px; font-size: 13px; }
.pin-screen input { padding: 14px; font-size: 24px; text-align: center; border-radius: 12px; border: 2px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.95); color: #0A0A0A; width: 220px; letter-spacing: 10px; font-family: inherit; }
.pin-screen input:focus { outline: none; border-color: #E8941A; }
.pin-screen button { margin-top: 12px; padding: 13px 40px; background: #E8941A; color: #FFFFFF; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; width: 220px; font-family: inherit; }
.pin-screen button:hover { opacity: 0.9; }
.pin-screen .error { color: #EF4444; font-size: 13px; margin-top: 10px; min-height: 20px; }

/* ─── Info Banners ─── */
.info-banner { border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.info-banner-blue { background: #e8eff8; border: 1px solid #4278bd; color: #4278bd; }
.info-banner-yellow { background: #fdf3e2; border: 1px solid #E8941A; color: #E8941A; }
.info-banner-orange { background: #fdf3e2; border: 1px solid #E8941A; color: #E8941A; }

/* ─── Responsive ─── */
/* On tablets and larger phones, use wider grids */
@media (min-width: 601px) {
  .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  #main-app { max-width: 100%; box-shadow: none; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  header img { height: 28px; }
}
