/* ============================================================
   SHARED COMPONENT STYLES (employee + admin pages both use these)
   ============================================================ */

.dynamic-input-row{display:flex;align-items:center;gap:4px}.dynamic-btn{min-height:30px;height:30px;padding:0 8px;font-size:14px;line-height:1}.dynamic-inputs-container{display:flex;flex-direction:column;gap:7px;margin-top:7px}.shared-control-wrap{align-items:center}.shared-pill{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:999px;background:#f7faf7;box-shadow:0 4px 14px rgba(28,55,31,.08);padding:6px 10px}.pill-btn{width:30px;height:30px;min-height:30px;border:0;border-radius:999px;padding:0;font-weight:900;line-height:1}.pill-btn-remove{background:#edf2ed;color:#637067}.pill-btn-add{background:var(--green);color:#fff}.pill-btn:disabled{opacity:.45}.pill-label{font-size:13px;font-weight:800;color:var(--muted);white-space:nowrap}

.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.no-margin{margin:0!important}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.field.full,.group{grid-column:1/-1}
.group{border:1px solid var(--line);border-radius:12px;padding:15px;background:#fbfdfb}
.group-title{font-weight:800;margin-bottom:12px}
.group-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.group-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}

.autocomplete-selected{grid-column:1/-1;border:1px solid #b8d5b3;background:#f0f8ee;border-radius:11px;padding:12px 14px}
.note-success{color:var(--green-dark)!important}
.note-error{color:var(--danger)!important}

/* History / Shift log */
.history-card{margin-top:16px}
.history-list{display:grid;gap:12px;margin-top:16px}
.history-item{border:1px solid var(--line);border-radius:12px;background:#fbfdfb;overflow:hidden}
.history-item summary{cursor:pointer;padding:14px;display:grid;grid-template-columns:1fr auto;gap:6px 14px}
.history-title{font-weight:800;color:var(--green-dark)}
.history-meta{font-size:13px;color:var(--muted)}
.history-output{grid-row:1/3;grid-column:2;font-size:18px;font-weight:800}
.history-output small{display:block;font-size:11px;color:var(--muted)}
.history-empty{text-align:center;color:var(--muted);padding:24px}
.history-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px;border-top:1px solid var(--line);padding:14px}
.history-detail{background:#fff;border:1px solid var(--line);border-radius:9px;padding:9px}
.history-label{font-size:11px;color:var(--muted);font-weight:700}
.history-value{margin-top:3px;font-size:14px;font-weight:800;color:var(--green-dark)}

/* ============================================================
   CADIVI MES Dark Forest Theme — Admin pages
   ============================================================ */

/* CADIVI MES Dark Forest Theme. Designed for 1366px - Full HD. */
:root {
  --green: #257a45;
  --green-dark: #073d29;
  --green-deep: #052f21;
  --pale: #f4f7f4;
  --ink: #101c13;
  --muted: #5e6b61;
  --line: #d2ded4;
  --danger: #b42318;
  --blue: #175cd3;
  --shadow: 0 4px 20px rgba(5, 47, 33, 0.08);
  --shadow-lg: 0 12px 36px rgba(5, 47, 33, 0.12);
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --transition-speed: 0.2s;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--pale);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100dvh;
  background: var(--pale);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* Base UI components */
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  transition: box-shadow var(--transition-speed);
}

.section-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--green-dark);
}

.small-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--green-dark);
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

label {
  font-weight: 700;
  font-size: 13px;
  color: var(--green-dark);
}

.required:after {
  content: ' *';
  color: var(--danger);
}

input, textarea, select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #b8c7bc;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 12px;
  outline: none;
  color: var(--ink);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 122, 69, 0.15);
}

input[readonly], input:disabled, select:disabled {
  background: #eaeee9;
  color: #55665a;
  border-color: #cbd4cd;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  min-height: 38px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: background var(--transition-speed), transform var(--transition-speed);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--green);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e6338;
}

.btn-secondary {
  background: #e2eae3;
  color: var(--green-dark);
}

.btn-secondary:hover {
  background: #d4ded6;
}

.btn-blue {
  background: #e1ecf4;
  color: var(--blue);
}

.btn-blue:hover {
  background: #d0e0ec;
}

.btn-danger {
  background: #feebeb;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fdd5d5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.status {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status.success {
  background: #e8f5e9;
  color: #1e4620;
  border: 1px solid #c8e6c9;
}

.status.error {
  background: #feebeb;
  color: #8c1d18;
  border: 1px solid #f9d5d5;
}

.status.info {
  background: #e8f0fe;
  color: #1a4380;
  border: 1px solid #d2e3fc;
}

.note {
  font-size: 12px;
  color: var(--muted);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 47, 33, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loading-box {
  width: min(100%, 360px);
  padding: 24px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.loading-ring {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border: 4px solid #eaeee9;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
}

.loading-ring span {
  font-size: 12px;
  font-weight: 800;
  color: var(--green-dark);
  animation: loading-spin-reverse 1s linear infinite;
}

.loading-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--green-dark);
}

.loading-message {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.loading-progress {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #eaeee9;
}

.loading-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.15s linear;
}

.loading-error .loading-ring {
  border-top-color: var(--danger);
}

.loading-error .loading-title {
  color: var(--danger);
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-spin-reverse {
  to { transform: rotate(-360deg); }
}

/* Autocomplete style */
.autocomplete {
  position: relative;
}

.suggestion-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;
}

.suggestion-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--pale);
  background: #ffffff;
  padding: 10px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: var(--pale);
}

.suggestion-title {
  font-weight: 700;
  color: var(--green-dark);
}

.suggestion-meta {
  font-size: 11px;
  color: var(--muted);
}

/* ============================================================
   EMPLOYEE APP STYLES (Mobile First)
   ============================================================ */

.employee-page{overscroll-behavior-y:none;background:linear-gradient(180deg,#eef6f0 0,#f5f8f5 260px)}
.employee-page.modal-open{overflow:hidden;touch-action:none}
.employee-topbar{position:relative;padding:calc(17px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 17px max(16px,env(safe-area-inset-left));background:linear-gradient(135deg,#174b31,#347148);color:#fff}
.employee-topbar .top-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:820px;margin:auto}
.employee-topbar .brand{font-size:20px;font-weight:800}.employee-topbar .sub{font-size:13px;opacity:.85}
.employee-main{width:calc(100% - 32px);max-width:900px;margin:16px auto;padding:0 0 42px}
.network-badge{flex:0 0 auto;border:1px solid rgba(255,255,255,.42);border-radius:999px;padding:6px 10px;background:rgba(255,255,255,.12);font-size:12px;font-weight:800;white-space:nowrap}.network-badge:before{content:'';display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#9bf089}.network-badge.offline{background:#781d18}.network-badge.offline:before{background:#ffb4ad}
.eyebrow{margin-bottom:7px;color:#447151;font-size:11px;font-weight:900;letter-spacing:.12em}.privacy-note{margin:14px 0 0;color:var(--muted);font-size:12px;text-align:center}
.employee-page .login-card{max-width:460px;margin:clamp(10px,4vh,44px) auto 0}.employee-page .login-card form{display:grid;gap:15px;margin-top:20px}.lookup-box{white-space:pre-line;border:1px dashed #b8c9ba;border-radius:11px;padding:12px;background:#f7faf7;color:var(--muted);font-size:13px;line-height:1.55}.lookup-loading{color:#2157a4;background:#eef5ff;border-color:#b9cdf1}.lookup-found{color:#225d31;background:#ecf8ed;border-color:#9ecaa4;font-weight:700}.lookup-error{color:#9f251d!important;background:#fff0ef!important;border-color:#efb3ae!important}.password-wrap{position:relative}.password-wrap input{padding-right:70px}.password-toggle{position:absolute;top:4px;right:4px;bottom:4px;min-width:58px;border:0;border-radius:8px;background:#edf3ee;color:#2b5b38;font-weight:800;touch-action:manipulation}.btn-block{width:100%;margin-top:3px}.btn-danger-soft{background:#fff0ef;color:#a4261d}.btn-save{width:100%;min-height:56px;font-size:17px;box-shadow:0 8px 22px rgba(47,113,65,.24)}.btn.is-loading{cursor:wait}
.password-choice-divider{display:flex;align-items:center;gap:10px;color:#869188;font-size:12px;font-weight:800;text-transform:uppercase;margin:10px 0}.password-choice-divider:before,.password-choice-divider:after{content:'';height:1px;flex:1;background:#dce5dc}.password-choice-note{margin:-4px 0 0;color:var(--muted);font-size:12px;line-height:1.5;text-align:center}
.employee-summary-card{border-top:4px solid #3a7b4b}.employee-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.employee-summary-head .section-title{overflow-wrap:anywhere}.compact-actions{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap}.compact-actions .btn{text-decoration:none;text-align:center;flex:1 1 auto}
.form-section{margin-top:16px;scroll-margin-top:16px}.section-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}.section-heading h2{margin:0;font-size:19px}.section-heading p{margin:3px 0 0;color:var(--muted);font-size:13px}.step{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#e2f2e3;color:#285f36;font-size:16px;font-weight:900}.warning-step{background:#fff0c7;color:#8c5100}.field-help{color:var(--muted);font-size:12px;line-height:1.45;margin-top:4px}.inline-pills{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:8px}.pill{display:inline-flex;align-items:center;max-width:100%;border-radius:999px;padding:5px 9px;background:#eaf4e8;color:#2b6036;font-size:12px;font-weight:800;overflow-wrap:anywhere}
.employee-page #employeeApp>.card{width:100%;max-width:900px;min-width:0;margin-left:auto;margin-right:auto}
.employee-page #employeeApp>.form-section:nth-of-type(n+4),.employee-page #employeeApp>.save-card,.employee-page #employeeApp>.history-card{content-visibility:auto;contain-intrinsic-size:auto 460px}

/* QR tools */
.qr-launch,.qr-launch-card{border:1px solid #b8d8bb;background:linear-gradient(145deg,#fff,#f1f9f0);border-radius:12px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:14px}.qr-launch-copy{min-width:0}.qr-launch-title{font-weight:800;color:var(--green-dark)}.qr-launch .note{margin-top:3px}.qr-action-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:10px;margin-bottom:17px}.qr-main-btn{font-size:16px}.qr-parts{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.qr-parts span{border-radius:8px;padding:8px 10px;background:#eef6eb;color:#295c36;font-size:13px;font-weight:800}
.qr-modal{position:fixed;inset:0;z-index:1000;background:rgba(8,17,10,.88);display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.qr-dialog{width:min(100%,520px);max-height:100%;overflow:auto;background:#101712;color:#fff;border:1px solid rgba(255,255,255,.17);border-radius:18px;padding:16px;box-shadow:0 20px 70px rgba(0,0,0,.45)}.qr-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.qr-title{font-size:20px;font-weight:800}.qr-subtitle{color:#c9d6cb}.qr-close{width:44px;height:44px;flex:0 0 44px;border:1px solid rgba(255,255,255,.3);border-radius:50%;background:rgba(255,255,255,.1);color:#fff;font-size:25px;line-height:1}.qr-reader{position:relative;margin-top:14px;overflow:hidden;border-radius:15px;background:#000;aspect-ratio:3/4;max-height:68dvh}.qr-video{width:100%;height:100%;display:block;object-fit:cover}.qr-guide{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,rgba(0,0,0,.42),transparent 18%,transparent 82%,rgba(0,0,0,.42)),linear-gradient(to bottom,rgba(0,0,0,.32),transparent 25%,transparent 75%,rgba(0,0,0,.32))}.qr-frame{position:absolute;left:50%;top:50%;width:min(72%,300px);aspect-ratio:1;transform:translate(-50%,-50%);border:3px solid #a9ee96;border-radius:18px;box-shadow:0 0 0 999px rgba(0,0,0,.12)}.qr-frame:before{content:'';position:absolute;left:8%;right:8%;top:10%;height:2px;background:linear-gradient(90deg,transparent,#7cff69,transparent);box-shadow:0 0 12px #7cff69;animation:qrscan 2.2s ease-in-out infinite}
.qr-status{margin-top:12px;border-radius:10px;padding:11px;background:#1e2921;color:#dce8de;line-height:1.45}.qr-status.success{background:#193f24;color:#bdf1c5}.qr-status.error{background:#4b1c19;color:#ffd1cc}.qr-result{max-height:90px;overflow:auto;margin:10px 0 0;padding:10px;border-radius:8px;background:#071009;color:#bbf1c3;white-space:pre-wrap;overflow-wrap:anywhere}.qr-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}.qr-control{border:1px solid rgba(255,255,255,.26);background:#24332a;color:#fff}.qr-help{margin:12px 0 0;color:#b9c9bd;font-size:12px}.qr-reader{touch-action:none}
@keyframes qrscan{0%{top:10%;opacity:0}10%{opacity:1}90%{opacity:1}100%{top:90%;opacity:0}}

/* Employee helpers and forms */
.helper-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:17px}.helper-card{min-width:0;border:1px solid var(--line);border-radius:12px;padding:11px;background:#fafcfa}.helper-card>label{display:block;margin-bottom:7px}.helper-search{position:relative}.helper-search input{padding-right:45px}.clear-helper{position:absolute;right:4px;top:4px;width:38px;height:36px;border:0;border-radius:8px;background:#edf2ed;color:#526258;font-size:22px;line-height:1}.helper-result{min-height:38px;padding-top:8px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}.helper-result.is-loading{color:#285aa0}.helper-selected{color:#28643a;font-weight:800}.helper-choice{width:100%;border:0;border-radius:8px;padding:8px;background:#e7f5e7;color:#245c34;text-align:left;font-size:12px;font-weight:800}
.downtime-grid{display:grid;gap:12px}.downtime-row{display:grid;grid-template-columns:minmax(120px,.65fr) minmax(0,1.7fr);gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfdfb}.process-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.empty-state{border:1px dashed var(--line);border-radius:11px;padding:18px;color:var(--muted);text-align:center;background:#fafcfa}.process-fields>.empty-state{grid-column:1/-1}.handover-alert{border:2px solid #e9b949;background:#fffaf0}.handover-item{display:grid;gap:10px;border:1px solid #ecd291;border-radius:12px;padding:14px;background:#fff}.handover-item+.handover-item{margin-top:10px}.handover-item p{margin:0;white-space:pre-wrap}.save-card{position:relative;margin-top:16px;border-color:#aed4b5;background:#f8fcf8}.shift-history-item{padding:14px}.shift-history-item+.shift-history-item{margin-top:10px}

@media(max-width:760px){.helper-grid{grid-template-columns:1fr}.process-fields{grid-template-columns:1fr}.employee-main{margin-top:14px}.employee-summary-card,.form-section,.save-card,.history-card{border-radius:14px}.group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.employee-topbar .top-inner{align-items:flex-start}.employee-topbar .brand{font-size:16px;line-height:1.3}.employee-main{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));margin-top:10px}.employee-page .card{padding:15px}.employee-page input,.employee-page textarea,.employee-page select{font-size:16px;min-height:50px}.employee-page .btn{min-height:48px;padding:11px 13px}.employee-page textarea{min-height:100px}.qr-action-grid{grid-template-columns:1fr}.compact-actions{display:grid;grid-template-columns:1fr 1fr}.compact-actions .btn:last-child:nth-child(odd){grid-column:1/-1}.downtime-row{grid-template-columns:1fr}.section-heading{margin-bottom:15px}.section-heading h2{font-size:18px}.qr-dialog{width:100%;height:100%;max-height:none;border:0;border-radius:0;padding:calc(12px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column}.qr-reader{flex:1;min-height:260px;max-height:none;aspect-ratio:auto}.qr-modal{padding:0}.qr-controls{grid-template-columns:1fr 1fr}.employee-summary-head{align-items:flex-start}.network-badge{padding:5px 8px;font-size:10px}}
@media(max-width:374px){.employee-topbar .top-inner{display:block}.network-badge{display:inline-block;margin-top:8px}.compact-actions,.qr-controls{grid-template-columns:1fr}.compact-actions .btn{grid-column:1!important}.employee-page .card{padding:13px}.section-heading{gap:9px}.step{flex-basis:31px;width:31px;height:31px}.qr-frame{width:78%}}

@media(max-width:767px){.employee-page{overflow-x:hidden}.employee-main{margin-top:12px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:max(24px,env(safe-area-inset-bottom))}.employee-page .card{padding:16px}.grid,.group-grid,.group-grid.two,.grid.three-columns,.helper-grid,.process-fields,.downtime-row{grid-template-columns:minmax(0,1fr)}.employee-page input,.employee-page textarea,.employee-page select{font-size:16px;min-height:46px}.employee-page textarea{min-height:100px}.employee-page .btn,.password-toggle,.clear-helper{min-height:44px}.employee-page .btn{padding:10px 14px}.shared-pill{flex-wrap:wrap}.qr-action-grid{grid-template-columns:1fr}.compact-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.compact-actions .btn:last-child:nth-child(odd){grid-column:1/-1}.section-heading{margin-bottom:15px}.section-heading h2{font-size:18px}.qr-dialog{width:calc(100% - 24px);max-width:none;max-height:calc(100dvh - 24px);padding:calc(12px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column}.qr-reader{flex:1;min-height:240px;max-height:56dvh;aspect-ratio:auto}.qr-controls{grid-template-columns:1fr 1fr}.employee-summary-head{align-items:flex-start}.network-badge{padding:5px 8px;font-size:10px}}
@media(max-width:767px) and (orientation:landscape){.employee-main{padding-bottom:max(16px,env(safe-area-inset-bottom))}.qr-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}.qr-reader{min-height:180px;max-height:42dvh}}

/* Employee production order card only */
.employee-page .production-order-card {
  display: block;
  min-width: 0;
  padding: 32px;
  overflow: hidden;
  border: 1px solid #b8d8bb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(5, 47, 33, .07);
}

.production-order-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "intro intro"
    "actions data"
    "info info";
  gap: 24px;
  align-items: stretch;
  min-width: 0;
}

.production-order-intro {
  grid-area: intro;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #dbe5dc;
}

.production-order-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.production-order-heading .step {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  font-size: 24px;
}

.production-order-heading h2 {
  min-width: 0;
  margin: 0;
  color: #10271a;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  white-space: normal;
}

.production-order-guide {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
  text-align: left;
}

.production-order-icon-tile {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  border-radius: 22px;
  background: #e8f5e9;
  color: #257a45;
}

.production-order-icon-tile svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.production-order-guide p {
  max-width: 260px;
  margin: 0;
  color: #5e6b61;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.production-order-actions {
  grid-area: actions;
  display: flex;
  min-width: 0;
  padding: 12px 24px 12px 0;
  border-right: 1px solid #dbe5dc;
  flex-direction: column;
  justify-content: center;
}

.production-order-card .qr-main-btn,
.production-order-card .production-order-manual-btn {
  width: 100%;
  margin: 0;
  border-radius: 13px;
  font-size: 22px;
  font-weight: 700;
}

.production-order-card .qr-main-btn {
  min-height: 84px;
  background: #257a45;
  color: #fff;
}

.production-order-card .production-order-manual-btn {
  min-height: 76px;
  border: 2px solid #257a45;
  background: #fff;
  color: #073d29;
}

.production-order-card .production-order-manual-btn:hover {
  background: #f2f8f2;
}

.production-order-card .qr-main-btn svg,
.production-order-card .production-order-manual-btn svg {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.production-order-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: #718078;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}

.production-order-divider::before,
.production-order-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #d3ddd5;
}

.production-order-data {
  grid-area: data;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.production-order-card .production-order-qr-field label,
.production-order-status-label {
  color: #294c36;
  font-size: 14px;
  font-weight: 700;
}

.production-order-card #qrText {
  min-height: 76px;
  max-height: 140px;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid #bcc8bf;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  resize: vertical;
}

.production-order-card .qr-parts {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.production-order-card .production-order-status-card {
  min-width: 0;
}

.production-order-card .production-order-status-card strong {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 74px;
  margin-top: 6px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  border-radius: 11px;
  background: #edf7ed;
  color: #174d2a;
  font-size: 19px;
  line-height: 1.35;
}

.production-order-info {
  grid-area: info;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid #c8dced;
  border-radius: 11px;
  background: #f1f7fc;
  color: #294b68;
  font-size: 16px;
  line-height: 1.45;
}

.production-order-info svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media(min-width:768px) and (max-width:1199px) {
  .employee-page .production-order-card {
    padding: 24px;
  }

  .production-order-content {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:
      "intro intro"
      "actions data"
      "info info";
    gap:20px;
  }

  .production-order-intro {
    flex-wrap:wrap;
    padding-bottom:16px;
  }

  .production-order-heading {
    flex:1 1 220px;
    gap:10px;
  }

  .production-order-guide {
    flex:1 1 280px;
  }

  .production-order-actions {
    padding:8px 20px 8px 0;
  }

  .production-order-heading .step {
    flex-basis:50px;
    width:50px;
    height:50px;
    font-size:20px;
  }

  .production-order-heading h2 {
    font-size:23px;
  }

  .production-order-icon-tile {
    width:82px;
    height:82px;
    flex-basis:82px;
  }

  .production-order-card .qr-main-btn,
  .production-order-card .production-order-manual-btn {
    font-size:18px;
    white-space:normal;
  }
}

@media(min-width:1200px) {
  .production-order-content {
    grid-template-columns:minmax(0,.72fr) minmax(0,1.35fr) minmax(0,.95fr);
    grid-template-areas:
      "intro actions data"
      "info info info";
    column-gap:0;
    row-gap:28px;
  }

  .production-order-intro {
    display:block;
    padding-right:28px;
    padding-bottom:0;
    border-right:1px solid #dbe5dc;
    border-bottom:0;
  }

  .production-order-guide {
    flex-direction:column;
    justify-content:center;
    min-height:190px;
    padding-top:22px;
    text-align:center;
  }

  .production-order-guide p {
    max-width:190px;
  }

  .production-order-actions {
    padding:12px 28px;
  }

  .production-order-data {
    padding-left:28px;
  }
}

@media(max-width:767px) {
  .employee-page .production-order-card {
    width: 100%;
    margin-left: 0;
    padding: 18px;
    border-radius: 18px;
  }

  .production-order-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "actions"
      "data"
      "info";
    row-gap: 22px;
  }

  .production-order-intro,
  .production-order-actions,
  .production-order-data {
    padding:0;
    border-right:0;
  }

  .production-order-intro {
    display:block;
    border-bottom:0;
  }

  .production-order-heading {
    gap: 12px;
  }

  .production-order-heading .step {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 20px;
  }

  .production-order-heading h2 {
    font-size: 24px;
  }

  .production-order-guide {
    flex-direction:column;
    min-height:0;
    padding-top:20px;
    text-align:center;
  }

  .production-order-icon-tile {
    width: 86px;
    height: 86px;
  }

  .production-order-guide p {
    max-width: 260px;
    font-size: 15px;
  }

  .production-order-card .qr-main-btn {
    min-height: 64px;
    font-size: 20px;
  }

  .production-order-card .production-order-manual-btn {
    min-height: 58px;
    font-size: 17px;
    white-space: normal;
  }

  .production-order-card #qrText {
    min-height: 82px;
  }

  .production-order-card .production-order-status-card strong {
    min-height: 64px;
    font-size: 18px;
  }

  .production-order-info {
    align-items: flex-start;
    padding: 14px;
    font-size: 15px;
  }
}
