/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
* { box-sizing: border-box; }

:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --text: #18212b;
  --muted: #6b7785;
  --border: #dfe4ea;
  --dark: #151c24;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --ok: #16803a;
  --ok-bg: #ecfdf3;
  --warning: #b15c00;
  --warning-bg: #fff7e8;
  --danger: #c62828;
  --danger-bg: #fff0f0;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea, select {
  font: inherit;
}

button, a {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */

.topbar {
  height: 72px;
  background: var(--dark);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 24px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
}

.top-search {
  flex: 1 1;
  max-width: 680px;
}

.top-search input {
  width: 100%;
  margin: 0;
  border: 0;
  background: #26313d;
  color: white;
}

.top-search input::placeholder {
  color: #aeb8c3;
}

.user {
  margin-left: auto;
  font-size: 14px;
  color: #cbd5e1;
}

/* LAYOUT */

.shell {
  display: flex;
  min-height: calc(100vh - 72px);
}

.sidebar {
  width: 230px;
  flex: 0 0 230px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
}

.sidebar a {
  display: block;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar a:hover {
  background: #f0f3f6;
}

.content {
  width: 100%;
  max-width: 1500px;
  padding: 30px;
}

/* TYPOGRAPHY */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

h2 {
  margin: 0 0 16px;
}

p {
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 7px;
}

/* BUTTONS */

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  filter: brightness(.96);
}

.button.secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.button.dark {
  background: var(--dark);
}

.button.danger {
  background: var(--danger);
}

.button.large {
  min-height: 58px;
  padding: 0 24px;
  font-size: 17px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* CARDS */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,.035);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stat-value {
  font-size: 34px;
  font-weight: 900;
  margin-top: 8px;
}

.section {
  margin-top: 24px;
}

/* STATUS */

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.status.warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.status.error {
  color: var(--danger);
  background: var(--danger-bg);
}

/* DASHBOARD */

.quick-actions {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
  margin-top: 20px;
}

.quick-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quick-card.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.quick-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
}

.quick-card.primary .muted {
  color: #dbeafe;
}

/* MACHINES */

.machine-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.machine-toolbar input {
  flex: 1 1;
}

input, textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd3dc;
  border-radius: 10px;
  background: white;
  color: var(--text);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}

.machine-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.machine-row {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 1fr 1fr auto;
  grid-gap: 20px;
  gap: 20px;
  align-items: center;
}

.machine-row:hover {
  border-color: #9ca9b7;
}

.machine-name {
  font-size: 18px;
  font-weight: 900;
}

.machine-meta {
  margin-top: 5px;
  font-size: 14px;
  color: var(--muted);
}

.machine-data-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.machine-data-value {
  font-weight: 800;
}

/* MACHINE DETAIL */

.machine-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.machine-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.machine-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-top: 18px;
}

.machine-action {
  min-height: 95px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: 900;
}

.machine-action span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 5px;
}

.two-column {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-gap: 18px;
  gap: 18px;
  margin-top: 20px;
}

.todo-item,
.history-item {
  border-top: 1px solid var(--border);
  padding: 15px 0;
}

.todo-item:first-of-type,
.history-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* MOBILE BOTTOM BAR */

.mobile-nav {
  display: none;
}

/* TABLET */

@media (max-width: 1000px) {
  .sidebar {
    width: 180px;
    flex-basis: 180px;
  }

  .content {
    padding: 22px;
  }

  .stats-grid,
  .machine-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .machine-row {
    grid-template-columns: 1.5fr 1fr auto;
  }

  .machine-row .hide-tablet {
    display: none;
  }

  .machine-action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* PHONE */

@media (max-width: 700px) {
  body {
    padding-bottom: 72px;
  }

  .topbar {
    height: 62px;
    padding: 0 15px;
  }

  .brand {
    font-size: 17px;
  }

  .top-search,
  .user {
    display: none;
  }

  .shell {
    display: block;
    min-height: calc(100vh - 62px);
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .page-header {
    display: block;
  }

  .page-header .actions {
    margin-top: 15px;
  }

  h1 {
    font-size: 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-value {
    font-size: 27px;
  }

  .card {
    padding: 16px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: 90px;
  }

  .machine-toolbar {
    display: block;
  }

  .machine-toolbar .button {
    width: 100%;
    margin-top: 9px;
  }

  .machine-row {
    display: block;
  }

  .machine-row > div:not(:first-child) {
    margin-top: 12px;
  }

  .machine-detail-grid,
  .machine-action-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .machine-action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: white;
    border-top: 1px solid var(--border);
    z-index: 200;
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
  }

  .mobile-nav .scan {
    background: var(--primary);
    color: white;
  }
}

