:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #d9e2ec;
  --blue: #1f5eff;
  --blue-dark: #143fb3;
  --green: #12b76a;
  --yellow: #f79009;
  --red: #f04438;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

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

.app-header {
  background: #101828;
  color: white;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
}

.brand h1 {
  margin: 0;
  font-size: 1.4rem;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.brand-text p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.brand p {
  margin: 2px 0 0;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-nav button {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.app-nav button.active,
.app-nav button:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.app-shell {
  padding: 28px;
  max-width: 1300px;
  margin: 0 auto;
}

.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
}

.page-title {
  margin-bottom: 20px;
}

.page-title h2 {
  margin: 0;
  font-size: 2rem;
}

.page-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.kpi-card,
.panel,
.equipment-card,
.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 8px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.panel h3 {
  margin-top: 0;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.green { background: #dcfae6; color: #067647; }
.yellow { background: #fef0c7; color: #b54708; }
.red { background: #fee4e2; color: #b42318; }
.blue { background: #dbeafe; color: #1d4ed8; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 13px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 0.85rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 700;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

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

.primary-btn {
  background: var(--blue);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn:hover {
  background: var(--blue-dark);
}

.equipment-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fafb;
}

@media (max-width: 900px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-grid,
  .content-grid,
  .equipment-grid,
  .project-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 18px;
  }
}