:root {
  --bg: #efe8db;
  --panel: rgba(255, 252, 247, 0.94);
  --panel-strong: #fffaf1;
  --text: #1e2b32;
  --muted: #6a7478;
  --line: rgba(30, 43, 50, 0.12);
  --primary: #0b5d5b;
  --primary-strong: #083f3d;
  --accent: #c7773a;
  --danger: #ac4d35;
  --success: #22785e;
  --warning: #a86327;
  --shadow: 0 20px 44px rgba(40, 35, 24, 0.12);
  --radius: 24px;
  --radius-sm: 18px;
  --font-ui: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(199, 119, 58, 0.24), transparent 30%),
    radial-gradient(circle at bottom left, rgba(11, 93, 91, 0.14), transparent 28%),
    linear-gradient(160deg, #e4dccd 0%, #f7f3eb 48%, #ece4d6 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

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

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -90px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(199, 119, 58, 0.22), rgba(11, 93, 91, 0.05));
}

.hero-copy {
  max-width: 840px;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  font-family: var(--font-display);
}

.hero-text {
  margin: 16px 0 0;
  max-width: 65ch;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 220px;
  z-index: 1;
}

.status-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(11, 93, 91, 0.08);
  border: 1px solid rgba(11, 93, 91, 0.12);
}

.status-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.content-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.dashboard {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.1fr 0.9fr;
}

.panel {
  padding: 24px;
  border-radius: var(--radius);
  animation: rise 420ms ease both;
}

.panel-head,
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2,
.section-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-head p,
.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.stats-grid,
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card,
.report-card {
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 242, 230, 0.88));
  border: 1px solid var(--line);
}

.stat-card h3,
.report-card span {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  display: block;
}

.stat-card strong,
.report-card strong {
  font-size: 1.9rem;
  color: var(--primary-strong);
}

.alerts-list,
.report-list {
  display: grid;
  gap: 12px;
}

.alert-item,
.report-list li,
.empty-state {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.alert-item strong {
  display: block;
  margin-bottom: 4px;
}

.alert-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.alert-item.danger {
  border-right: 5px solid var(--danger);
}

.alert-item.warning {
  border-right: 5px solid var(--warning);
}

.alert-item.success {
  border-right: 5px solid var(--success);
}

.employee-form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.form-section-head {
  margin-bottom: 14px;
}

.form-section-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.form-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.compact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(11, 93, 91, 0.5);
  box-shadow: 0 0 0 3px rgba(11, 93, 91, 0.12);
  transform: translateY(-1px);
}

.full-width {
  grid-column: 1 / -1;
}

.filters-row,
.report-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filters-row input,
.filters-row select {
  min-width: 220px;
}

.primary-button,
.ghost-button,
.table-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.table-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.ghost-button {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--line);
}

.table-wrapper,
.report-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 14px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(11, 93, 91, 0.04);
}

tbody tr:hover {
  background: rgba(11, 93, 91, 0.04);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.tag.active,
.tag.approved {
  background: rgba(34, 120, 94, 0.12);
  color: var(--success);
}

.tag.pending,
.tag.prep {
  background: rgba(199, 119, 58, 0.14);
  color: #9b5a2c;
}

.tag.closed,
.tag.rejected,
.tag.stopped {
  background: rgba(172, 77, 53, 0.12);
  color: var(--danger);
}

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

.table-button {
  padding: 8px 12px;
  background: rgba(11, 93, 91, 0.08);
  color: var(--primary-strong);
}

.table-button.danger {
  background: rgba(172, 77, 53, 0.12);
  color: var(--danger);
}

.report-panel {
  overflow: hidden;
}

.report-toolbar {
  margin-bottom: 18px;
}

.report-output {
  display: grid;
  gap: 18px;
}

.report-sheet {
  display: grid;
  gap: 18px;
}

.report-hero {
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(11, 93, 91, 0.1), rgba(255, 255, 255, 0.94));
}

.report-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
}

.report-hero h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-display);
}

.report-meta {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-block {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.report-block.full-width {
  grid-column: 1 / -1;
}

.report-block h4 {
  margin: 0;
  font-size: 1.1rem;
}

.report-block p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .dashboard,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 100%);
    margin-top: 16px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hero {
    flex-direction: column;
  }

  .form-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .filters-row input,
  .filters-row select {
    min-width: 0;
    width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  body.printing-report .hero,
  body.printing-report .content-grid > :not(#reportPanel) {
    display: none !important;
  }

  body.printing-report .app-shell {
    width: 100%;
    margin: 0;
  }

  body.printing-report #reportPanel {
    box-shadow: none;
    border: 0;
    background: #fff;
    padding: 0;
  }

  body.printing-report #reportPanel .section-title,
  body.printing-report #reportPanel .report-toolbar {
    display: none !important;
  }

  body.printing-report #reportPanel .report-hero,
  body.printing-report #reportPanel .report-card,
  body.printing-report #reportPanel .report-block,
  body.printing-report #reportPanel .report-table-wrapper {
    break-inside: avoid;
    box-shadow: none;
    background: #fff;
  }
}
