* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f6f6f4;
  color: #1a1a1a;
}

header {
  padding: 1.25rem 1.5rem;
  background: #1a1a1a;
  color: #f6f6f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#user-info {
  font-size: 0.95rem;
  opacity: 0.85;
}

main {
  max-width: 520px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

form#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: #fff;
  padding: 1.75rem;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

form label {
  font-size: 0.9rem;
  color: #555;
}

input[type="password"], input[type="text"] {
  font-size: 1.4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: #1a1a1a;
}

button, .service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

button[type="submit"] {
  background: #1a1a1a;
  color: #fff;
}

button[type="submit"]:hover {
  background: #333;
}

#login-error {
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: #fde8e8;
  color: #9b1c1c;
  border-radius: 6px;
  font-size: 0.95rem;
}

.services {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.service-btn {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
}

.service-btn:hover {
  background: #1a1a1a;
  color: #fff;
}

.service-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  border-color: #bbb;
  color: #555;
}

button.logout {
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
  min-height: 44px;
  font-size: 0.95rem;
  width: 100%;
}

button.logout:hover {
  background: #eee;
}

@media (prefers-color-scheme: dark) {
  html, body { background: #0d0d0d; color: #eaeaea; }
  header { background: #000; }
  form#login-form { background: #1a1a1a; box-shadow: none; }
  form label { color: #aaa; }
  input[type="password"], input[type="text"] {
    background: #0d0d0d; color: #eaeaea; border-color: #333;
  }
  input:focus { border-color: #eaeaea; }
  button[type="submit"] { background: #eaeaea; color: #0d0d0d; }
  button[type="submit"]:hover { background: #ccc; }
  .service-btn { background: #1a1a1a; color: #eaeaea; border-color: #eaeaea; }
  .service-btn:hover { background: #eaeaea; color: #0d0d0d; }
  .service-btn.disabled { color: #666; border-color: #444; }
  button.logout { border-color: #333; color: #aaa; }
  button.logout:hover { background: #1a1a1a; }
}
