:root {
  /* Samme palette som dashboard.php */
  --bg: #050913;
  --bg-accent: #0a1328;
  --panel: rgba(13, 18, 34, 0.92);
  --panel-border: rgba(255, 255, 255, 0.05);
  --panel-border-strong: rgba(88, 101, 242, 0.35);
  --text-primary: #f4f6ff;
  --text-secondary: #a9b4d3;
  --text-muted: #7d86a4;
  --accent: #5865f2;
  --accent-soft: rgba(88, 101, 242, 0.18);
  --accent-strong: #7b83ff;
  --success: #3ba55d;
  --danger: #ed4245;
  --warning: #f7c059;
  --shadow: 0 30px 60px rgba(3, 6, 18, 0.65);
  --radius-lg: 22px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(88, 101, 242, 0.18),
      transparent 45%
    ),
    radial-gradient(circle at 80% 0%, rgba(32, 188, 255, 0.2), transparent 40%),
    linear-gradient(135deg, #040812 0%, #060b16 35%, #050913 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 32px 20px 16px;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.login-shell {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 48px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
}

.login-container h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.login-container h2 i {
  color: var(--accent);
  font-size: 1.1rem;
}

.login-container p.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 400;
}

label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(5, 9, 19, 0.85);
  color: var(--text-primary);
  margin-bottom: 14px;
  outline: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s,
    transform 0.1s;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: var(--text-muted);
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
  background: rgba(8, 13, 27, 0.95);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(
    120deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  box-shadow: 0 8px 18px rgba(88, 101, 242, 0.35);
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(88, 101, 242, 0.5);
  filter: brightness(1.05);
}

.btn i {
  font-size: 0.95rem;
}

.error {
  background: rgba(237, 66, 69, 0.12);
  border: 1px solid rgba(237, 66, 69, 0.55);
  color: #ffc9cc;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.error::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.info {
  background: rgba(247, 192, 89, 0.12);
  border: 1px solid rgba(247, 192, 89, 0.6);
  color: #ffe8b3;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.info::before {
  content: "\f05a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.back-link {
  text-align: center;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.back-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
  color: var(--accent-strong);
}

@media (max-width: 600px) {
  header {
    padding: 24px 16px 8px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .login-shell {
    padding: 16px;
  }

  .login-container {
    padding: 22px 20px 20px;
  }
}
