:root {
  --accent: #0056B8;
  --accent-light: #e9f0fa;
  --accent-border: #c7daef;
  --text: #222;
  --muted: #666;
  --error: #c0392b;
  --ok: #1a7d3a;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: #f7f8fa;
  color: var(--text);
}

header {
  background: white;
  border-bottom: 3px solid var(--accent);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .brand {
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
  text-decoration: none;
}

header nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}

header nav a:hover { color: var(--accent); }

main {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 20px;
}

h1 { color: var(--accent); font-size: 24px; }
h2 { font-size: 18px; color: var(--text); }

.card {
  background: white;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

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

.client-card {
  display: block;
  background: white;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 18px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  transition: box-shadow .15s;
}
.client-card:hover { box-shadow: 0 2px 8px rgba(0,86,184,.15); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=file], select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

button, .btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-top: 14px;
}
button:hover, .btn:hover { background: #00459a; }
.btn-secondary { background: white; color: var(--accent); border: 1px solid var(--accent-border); }
.btn-secondary:hover { background: var(--accent-light); }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.flash-error { background: #fdecea; color: var(--error); }
.flash-ok { background: #e9f7ee; color: var(--ok); }

.total {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.muted { color: var(--muted); font-size: 13px; }

.login-wrap {
  max-width: 360px;
  margin: 80px auto;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: var(--accent-light);
  color: var(--accent);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 12px;
  margin-top: 4px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  margin: 0;
}
.checkbox-item input { width: auto; }

.link-btn {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-size: 13px;
  text-decoration: underline;
}

.dropzone {
  position: relative;
  border: 2px dashed var(--accent-border);
  border-radius: 8px;
  padding: 22px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  background: var(--accent-light);
  transition: background .15s, border-color .15s;
}
.dropzone:hover { background: #ddebf9; }
.dropzone-active { background: #ddebf9; border-color: var(--accent); }
.dropzone-filled { color: var(--accent); font-weight: 600; }
.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
