:root{
  --bg:#f5f7fb;
  --card:#fff;
  --text:#1f2937;
  --muted:#6b7280;
  --primary:#0f766e;
  --danger:#b91c1c;
  --border:#dbe2ea;
}

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

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 24px;
  background:#0b1320;
  color:#fff;
}

.topbar nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.topbar a{
  color:#fff;
  text-decoration:none;
}

.container{
  max-width:1100px;
  margin:24px auto;
  padding:0 16px;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:24px;
  box-shadow:0 4px 18px rgba(0,0,0,.04);
}

.narrow{
  max-width:420px;
  margin:60px auto;
}

label{
  display:block;
  margin-bottom:14px;
  font-weight:600;
}

input,select{
  display:block;
  width:100%;
  padding:10px 12px;
  margin-top:6px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
}

button,.button{
  display:inline-block;
  background:var(--primary);
  color:#fff;
  padding:10px 14px;
  border:none;
  border-radius:8px;
  text-decoration:none;
  cursor:pointer;
}

.secondary{background:#475569}
.danger{background:var(--danger)}

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

.alert.success{
  background:#dcfce7;
  color:#166534;
}

.alert.error{
  background:#fee2e2;
  color:#991b1b;
}

.grid-form{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}

.inline-form{
  display:flex;
  gap:12px;
  align-items:end;
  flex-wrap:wrap;
}

.checkbox-line{
  display:flex;
  gap:10px;
  align-items:center;
}

.checkbox-line input{
  width:auto;
  margin:0;
}

.table-header,
.actions,
.actions-inline{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:space-between;
}

.actions-inline form{
  display:inline-block;
}

table{
  width:100%;
  border-collapse:collapse;
  margin-top:16px;
}

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

@media (max-width:700px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .actions-inline{
    flex-direction:column;
    align-items:flex-start;
  }
}



.password-toggle-wrap {
  position: relative;
  display: block;
}

.password-toggle-wrap input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #666;
}

.password-toggle-btn:hover {
  color: #111;
}

.password-toggle-btn:focus-visible {
  outline: 2px solid #999;
  outline-offset: 2px;
  border-radius: 4px;
}
