*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3d;
  --accent: #22daa1;
  --accent-hover: #17c48e;
  --text: #e2e8f0;
  --muted: #8892a4;
  --error: #f87171;
  --success: #4ade80;
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

header .brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
}

header .header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

header .user {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.btn-logout:hover {
  border-color: var(--error);
  color: var(--error);
}

/* Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

.card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Form */
.card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card input[type="text"],
.card input[type="password"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
}

.card input[type="text"]:focus,
.card input[type="password"]:focus {
  border-color: var(--accent);
}

.card button[type="submit"] {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  transition: background 0.15s;
  margin-top: 0.25rem;
}

.card button[type="submit"]:hover {
  background: var(--accent-hover);
}

/* Messages */
.msg-error {
  color: var(--error);
  font-size: 0.875rem;
}

.msg-success {
  color: var(--success);
  font-size: 0.875rem;
}

/* IP info */
.ip-info {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
