* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  color: #182033;
}

a { color: inherit; }

.topbar {
  height: 58px;
  background: #172033;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 700;
  white-space: nowrap;
}

.company-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.company-form input {
  width: 160px;
}

.langs {
  display: flex;
  gap: 8px;
}

.langs a, .logout {
  color: white;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
}

.langs a:hover, .logout:hover {
  background: #2b3854;
}

.user-pill {
  margin-left: auto;
  font-size: 13px;
  opacity: .9;
}

.layout {
  display: flex;
  min-height: calc(100vh - 58px);
}

.sidebar {
  width: 220px;
  background: #222c42;
  padding: 12px;
}

.sidebar a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.sidebar a:hover {
  background: #33415f;
}

.content {
  flex: 1;
  padding: 20px;
  overflow: auto;
}

.panel, .toolbar {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

input, select, button {
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #cfd6e2;
  font-size: 14px;
}

button {
  background: #2656d9;
  color: white;
  border: 0;
  cursor: pointer;
}

button:hover {
  background: #1f47b5;
}

.table-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

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

th, td {
  border-bottom: 1px solid #e3e7ef;
  padding: 9px;
  text-align: left;
}

th {
  background: #edf1f7;
  font-weight: 700;
  position: sticky;
  top: 0;
}

td[contenteditable="true"] {
  background: #fff;
  outline-color: #2656d9;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.card span {
  display: block;
  color: #667085;
}

.card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
}

.login-body {
  min-height: 100vh;
  background: #172033;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 360px;
  max-width: 100%;
  background: white;
  padding: 26px;
  border-radius: 14px;
  box-shadow: 0 12px 38px rgba(0,0,0,.28);
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-card .langs a {
  color: #172033;
}

.alert {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.error {
  background: #ffe1e1;
  color: #8a0000;
}

@media (max-width: 780px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 10px;
  }

  .user-pill {
    margin-left: 0;
  }

  .layout {
    display: block;
  }

  .sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  .sidebar a {
    white-space: nowrap;
  }

  .content {
    padding: 12px;
  }

  .company-form input {
    width: 130px;
  }
}

.button-link {
  padding: 9px 10px;
  border-radius: 7px;
  background: #0b7a3b;
  color: white;
  text-decoration: none;
  display: inline-block;
}

.button-link:hover {
  background: #075f2d;
}

.toolbar form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
