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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #080808 0%, #000000 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}


.login-wrapper {
  width: 100%;
  max-width: 420px;
}


.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.login-header h1 {
  font-size: 26px;
  color: #1a1a2e;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-header p {
  color: #888;
  font-size: 14px;
}


.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
}

.input-wrapper input:focus {
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-wrapper input.input-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.input-wrapper input.input-success {
  border-color: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}


.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.2s;
  z-index: 1;
}

.toggle-password:hover {
  opacity: 0.7;
}


.error-msg {
  display: block;
  font-size: 12px;
  color: #e74c3c;
  margin-top: 6px;
  min-height: 16px;
  transition: opacity 0.2s;
}


.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}


.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #667eea;
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #764ba2;
  text-decoration: underline;
}


.alert {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
}

.alert.alert-error {
  display: block;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

.alert.alert-success {
  display: block;
  background: #eafaf1;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}


.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #888;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #764ba2;
  text-decoration: underline;
}


.demo-hint {
  margin-top: 20px;
  padding: 14px 16px;
  background: #f0f4ff;
  border: 1px dashed #667eea;
  border-radius: 10px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.demo-hint code {
  background: #e8edff;
  color: #4a5568;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}


.dashboard-wrapper {
  min-height: 100vh;
  background: #f4f6fb;
}

.topbar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topbar .brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.topbar .avatar {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-logout {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.35);
}

.dashboard-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.welcome-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  animation: slideUp 0.4s ease;
}

.welcome-card h2 {
  font-size: 24px;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.welcome-card p {
  color: #777;
  font-size: 15px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  animation: slideUp 0.4s ease;
}

.stat-card .stat-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar .brand {
    font-size: 16px;
  }

  .dashboard-content {
    margin: 20px auto;
  }
}
