:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #6b7280;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --background: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
}

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

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Container */
.container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 2rem 1rem;
}

.login-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--surface);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn-primary,
.btn-service {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.btn-primary:hover,
.btn-service:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

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

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

/* Dashboard */
.dashboard-header {
  text-align: center;
  margin-bottom: 3rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.service-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-card.jaeger {
  border-left: 4px solid #ff6b35;
}

.service-card.kibana {
  border-left: 4px solid #00bfb3;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.service-content p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.service-actions {
  display: flex;
  gap: 0.75rem;
}

.service-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.status-dot.active {
  background: var(--success);
}

.external-icon {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.alert-icon {
  font-size: 1rem;
}

/* Error Pages */
.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-card {
  text-align: center;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
  border: 1px solid var(--border);
  max-width: 400px;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

.error-message {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  justify-content: center;
}

/* No Permissions */
.no-permissions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.empty-state {
  text-align: center;
  max-width: 400px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.empty-state p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Dashboard Info */
.dashboard-info {
  margin-top: 3rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.info-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .navbar {
    padding: 1rem;
  }

  .brand span {
    display: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .login-card {
    padding: 2rem;
    margin: 1rem;
  }

  .user-menu {
    gap: 0.5rem;
  }

  .user-info {
    display: none;
  }
}

@media (max-width: 480px) {
  .dashboard-header h1 {
    font-size: 1.5rem;
  }

  .service-card {
    padding: 1rem;
  }
}
