@font-face { font-family: "Gilroy"; src: url("/static/fonts/Gilroy-Light.ttf"); font-weight: 300; }
@font-face { font-family: "Gilroy"; src: url("/static/fonts/Gilroy-Regular.ttf"); font-weight: 400; }
@font-face { font-family: "Gilroy"; src: url("/static/fonts/Gilroy-Medium.ttf"); font-weight: 500; }
@font-face { font-family: "Gilroy"; src: url("/static/fonts/Gilroy-Bold.ttf"); font-weight: 700; }
@font-face { font-family: "Gilroy"; src: url("/static/fonts/Gilroy-Heavy.ttf"); font-weight: 800; }

:root {
  --orange: #FA4C07;
  --orange-hover: #FF6326;
  --orange-active: #C93D05;
  --navy: #273037;
  --navy-dark: #1C252C;
  --grey-muted: #8C99A3;
  --grey-secondary: #6B7882;
  --border: #E1E6EA;
  --border-strong: #C9D1D7;
  --bg-alt: #F4F6F8;
  --track-bg: #E8ECEF;
  --success: #1F8A5B;
  --success-bg: #E6F4ED;
  --warn: #E0951A;
  --warn-bg: #FCF1DD;
  --warn-text: #8A6415;
  --warn-border: #F3DDAE;
  --error: #D8412F;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Gilroy", sans-serif;
  color: var(--navy);
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; }
input, select, button { font-family: inherit; font-size: 14px; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow.on-dark { color: #FF9466; }

h1 { font-size: 2.25rem; font-weight: 800; margin: 8px 0 4px; color: var(--navy); }
h2 { font-size: 1.375rem; font-weight: 700; margin: 0; }
p.subtitle { color: var(--grey-secondary); font-size: 14.5px; margin: 0 0 24px; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-alt);
  background-image:
    repeating-linear-gradient(0deg, rgba(250,76,7,0.07) 0px, rgba(250,76,7,0.07) 1px, transparent 1px, transparent 44px),
    repeating-linear-gradient(90deg, rgba(250,76,7,0.07) 0px, rgba(250,76,7,0.07) 1px, transparent 1px, transparent 44px);
}
.login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(28,37,44,0.12), 0 4px 12px rgba(28,37,44,0.08);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
}
.login-card img.symbol { height: 36px; margin-bottom: 16px; }
.login-card h1 { font-size: 28px; margin-top: 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--grey-secondary); }
.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.field input:focus { outline: none; border-color: var(--orange); }
.error-msg { color: var(--error); font-size: 13px; font-weight: 700; margin: 0 0 16px; }
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--orange); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-primary:active { background: var(--orange-active); transform: scale(0.98); }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--navy); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-small { padding: 6px 12px; font-size: 13px; }

/* Header */
header.app-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
}
header.app-header.dark { background: rgba(28,37,44,0.92); border-bottom-color: #333e46; }
header.app-header img.logo { height: 24px; }
header.app-header .right { display: flex; align-items: center; gap: 16px; }
header.app-header .company { text-align: right; font-size: 13px; }
header.app-header .company .name { font-weight: 700; }
header.app-header .company .contact { color: var(--grey-muted); }
header.app-header.dark .company .name, header.app-header.dark .company .contact { color: #fff; }

main.content { max-width: 1200px; margin: 0 auto; padding: 40px 32px 96px; }

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(28,37,44,.06), 0 1px 3px rgba(28,37,44,.08);
  padding: 32px;
  margin-bottom: 24px;
}
.card.highlight { box-shadow: 0 4px 12px rgba(28,37,44,.08), 0 2px 4px rgba(28,37,44,.06); }
.card.dashed { border: 1px dashed var(--border-strong); text-align: center; color: var(--grey-secondary); box-shadow: none; }

.pack-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; margin-bottom: 20px; }
.pack-name { font-size: 28px; font-weight: 700; margin: 4px 0; }
.pack-valid { color: var(--grey-secondary); font-size: 13.5px; }
.pack-stats { display: flex; gap: 24px; }
.pack-stat { text-align: center; padding: 0 20px; border-left: 1px solid var(--border); }
.pack-stat:first-child { border-left: none; }
.pack-stat .num { font-size: 26px; font-weight: 700; }
.pack-stat .num.navy { color: var(--navy); }
.pack-stat .num.orange { color: var(--orange); }
.pack-stat .lbl { font-size: 12px; color: var(--grey-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.progress-track { background: var(--track-bg); height: 10px; border-radius: 999px; overflow: hidden; }
.progress-fill { background: var(--orange); height: 100%; border-radius: 999px; }
.progress-label { font-size: 13px; color: var(--grey-secondary); margin-top: 8px; }

.banner-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin-top: 16px; }

table.tasks { width: 100%; border-collapse: collapse; }
table.tasks th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--grey-muted); font-weight: 700; padding: 8px 4px; border-bottom: 1px solid var(--border); }
table.tasks td { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.chip { border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; display: inline-block; border: none; cursor: default; }
.chip.fet { background: var(--success-bg); color: var(--success); }
.chip.en_curs { background: var(--warn-bg); color: var(--warn); }
button.chip { cursor: pointer; }
.del-btn { border: none; background: none; color: var(--grey-muted); cursor: pointer; font-size: 16px; }
.del-btn:hover { color: var(--error); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 16px; }
.inline-form .field { margin-bottom: 0; min-width: 140px; flex: 1; }
select { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fff; }

.demo-block { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.demo-block p { font-size: 12.5px; color: var(--grey-muted); margin: 0 0 8px; }
.demo-btns { display: flex; flex-direction: column; gap: 6px; }
