:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fb;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(245, 247, 251, 0.90), rgba(245, 247, 251, 0.95)),
    url("gruponorma-logo.png") center 72px / min(520px, 70vw) no-repeat fixed;
}

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 max(48px, env(safe-area-inset-bottom));
}

.hero { margin-bottom: 24px; }

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

.brand-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e1e6f0;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: #59657d;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

h2 { margin-bottom: 8px; }

.subtitle {
  max-width: 800px;
  color: #59657d;
  font-size: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e1e6f0;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(8px);
}

.input-card, .tabs-card { margin-bottom: 20px; }

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.company-row {
  display: grid;
  grid-template-columns: auto minmax(240px, 380px);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.select-label { margin-bottom: 0; }

.command-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

input, select {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 16px;
  background: white;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 48px;
  background: #172033;
  color: white;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.secondary {
  background: #edf1f7;
  color: #172033;
}

button.small {
  padding: 10px 12px;
  min-height: 42px;
  font-size: 13px;
}

.hidden { display: none; }

.hint {
  margin: 10px 0 0;
  color: #59657d;
  font-size: 14px;
}

.no-margin { margin: 0; }

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

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tab-button {
  background: #edf1f7;
  color: #172033;
  border: 1px solid #d8deea;
  white-space: nowrap;
}

.tab-button.active {
  background: #172033;
  color: #fff;
  border-color: #172033;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.task-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  padding: 14px;
  background: #fbfcff;
}

.task-title {
  margin: 0 0 4px;
  font-weight: 800;
}

.task-meta {
  margin: 0;
  color: #6b758a;
  font-size: 13px;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.grouped-lists {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.group-title {
  margin: 0 0 8px;
  font-size: 16px;
  color: #172033;
}

.group-box {
  border: 1px solid #e7ebf3;
  border-radius: 18px;
  padding: 14px;
  background: rgba(251, 252, 255, 0.82);
}

.group-box .task-list { margin-top: 0; }

.empty {
  color: #6b758a;
  font-style: italic;
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(rgba(245, 247, 251, 0.92), rgba(245, 247, 251, 0.97)),
      url("gruponorma-logo.png") center 28px / min(340px, 78vw) no-repeat fixed;
  }

  .app {
    width: min(100% - 20px, 680px);
    padding: 18px 0 28px;
  }

  .brand-block, .section-heading, .task-item, .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-block {
    text-align: center;
    align-items: center;
    gap: 12px;
  }

  .brand-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
  }

  .subtitle { font-size: 15px; }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .command-row, .dashboard, .company-row {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .tab-button {
    scroll-snap-align: start;
  }

  .task-actions, .command-row {
    width: 100%;
  }

  .task-actions button, .command-row button, .top-actions button {
    width: 100%;
  }
}
