/*
 * SmitPlan application styles. Plain CSS (Propshaft).
 */

:root {
  --navy: #1a1a2e;
  --navy-soft: #2a2a45;
  --accent: #e8743b;
  --accent-dark: #c95d29;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e4e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --green: #1f9d57;
  --green-bg: #e8f5e9;
  --red: #d13438;
  --red-bg: #fdecec;
  --yellow-bg: #fff9c4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); margin: .25rem 0 0; font-size: .9rem; }

/* Buttons */
.button {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .9rem;
  padding: .55rem .9rem; border-radius: 8px; text-decoration: none; line-height: 1;
}
.button:hover { background: var(--accent-dark); }
.button--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button--ghost:hover { background: rgba(232, 116, 59, .08); }
.button--sm { font-size: .8rem; padding: .4rem .65rem; }
form.button_to { display: inline; }

/* Page header */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}

/* Cockpit */
.cockpit { display: grid; gap: 1rem; }
.week-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; border-left: 4px solid var(--green);
}
.week-card--shortage { border-left-color: var(--red); }
.week-card__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.week-card__title { color: var(--navy); letter-spacing: .03em; }
.week-card__range { color: var(--muted); font-size: .9rem; flex: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .85rem 0; }
.stat {
  background: var(--bg); border-radius: 8px; padding: .55rem .7rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat__value { font-size: 1.15rem; font-weight: 700; }
.stat--positive { background: var(--green-bg); } .stat--positive .stat__value { color: var(--green); }
.stat--negative { background: var(--red-bg); } .stat--negative .stat__value { color: var(--red); }

table.deals { width: 100%; border-collapse: collapse; font-size: .9rem; }
.deals th, .deals td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.deals th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.deals .num { text-align: right; font-variant-numeric: tabular-nums; }
.deals__row--indicative { background: var(--yellow-bg); }

/* Simple auth/landing welcome */
.welcome { max-width: 28rem; margin: 4rem auto; background: var(--card); padding: 2rem;
  border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.welcome h1 { color: var(--navy); margin-bottom: .5rem; }

/* Planboard */
.planboard-scroll { overflow-x: auto; }
table.planboard { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.planboard th, .planboard td { border: 1px solid var(--line); vertical-align: top; }
.planboard thead th { background: var(--navy); color: #fff; padding: .5rem; font-size: .85rem; font-weight: 600; }
.planboard__corner { width: 150px; }
.planboard__emp { background: var(--bg); padding: .5rem .6rem; font-weight: 600; text-align: left; white-space: nowrap; }
.planboard__cell { min-width: 150px; height: 64px; padding: .35rem; }
.planboard__cell:hover { background: #fafbfc; }

.tray { margin-top: 1.25rem; background: var(--card); border: 1px dashed var(--accent); border-radius: var(--radius); padding: .85rem 1rem; }
.tray__title { color: var(--navy); margin-bottom: .5rem; font-size: 1rem; }
.tray__list { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 48px; }

.wo-card { position: relative; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: .4rem 2.6rem .4rem .55rem; margin-bottom: .35rem; cursor: grab; box-shadow: var(--shadow); }
.wo-card__copyform { position: absolute; top: 5px; right: 5px; margin: 0; }
.wo-card__copy { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 5px; font-size: .62rem; font-weight: 600; padding: .12rem .32rem; cursor: pointer; line-height: 1.2; }
.wo-card__copy:hover { border-color: var(--accent); color: var(--accent); }
.wo-card__group { display: inline-block; margin-top: .25rem; font-size: .66rem; font-weight: 700; color: var(--accent-dark); background: rgba(232, 116, 59, .12); border-radius: 4px; padding: .06rem .35rem; }
.wo-card:active { cursor: grabbing; }
.wo-card__title { display: block; font-weight: 600; font-size: .82rem; }
.wo-card__meta { display: block; color: var(--muted); font-size: .72rem; }
.wo-card--klaar_gezet { border-left-color: #2f6df6; }
.wo-card--opgehaald { border-left-color: #46b1e1; }
.wo-card--compleet { border-left-color: var(--muted); }
.wo-card--afgehandeld { border-left-color: #9aa1ad; opacity: .75; }

/* App bar (signed-in chrome) */
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #fff; padding: .6rem 1.25rem; }
.app-bar__brand { color: #fff; font-weight: 800; letter-spacing: .02em; text-decoration: none; font-size: 1.05rem; }
.app-bar__nav { display: flex; align-items: center; gap: 1rem; }
.app-bar__nav a { color: #dfe3ea; text-decoration: none; font-size: .9rem; font-weight: 600; }
.app-bar__nav a:hover { color: #fff; }
.app-bar__logout { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 8px; padding: .35rem .7rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.app-bar__logout:hover { background: rgba(255, 255, 255, .12); }

/* Flash */
.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.flash--notice { background: var(--green-bg); color: var(--green); }
.flash--alert { background: var(--red-bg); color: var(--red); }

/* Forms */
.field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .82rem; font-weight: 600; }
.form input[type=email], .form input[type=password], .form input[type=text] {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; background: #fff;
}
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.button--block { width: 100%; padding: .7rem; font-size: .95rem; margin-top: .25rem; }

/* Auth pages */
.auth { display: flex; justify-content: center; padding-top: 2.5rem; }
.auth__card { width: 100%; max-width: 24rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.auth__brand { color: var(--accent); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.auth__title { color: var(--navy); margin: .25rem 0 1.25rem; }
.auth__foot { margin-top: 1rem; font-size: .88rem; }
.auth__foot a { color: var(--accent); text-decoration: none; }
.auth__foot a:hover { text-decoration: underline; }
.home-links { display: flex; gap: .5rem; margin: 1rem 0; justify-content: center; }
