/* Sfeirlabs Main Stylesheet */

:root {
  --primary-color: #1976d2;
  --primary-dark: #1565c0;
  --secondary-color: #424242;
  --accent-color: #ff5722;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --info-color: #2196f3;
  --text-primary: #212121;
  --text-secondary: #757575;
  --background: #fafafa;
  --surface: #ffffff;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header / Navigation */
.navbar {
  background-color: var(--primary-color);
  color: white;
  padding: 0 2rem;
  box-shadow: 0 2px 4px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.navbar-brand:hover {
  opacity: 0.9;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.navbar-menu a:hover {
  opacity: 0.8;
}

.navbar-user {
  position: relative;
}

.user-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--surface);
  box-shadow: 0 4px 12px var(--shadow);
  border-radius: 4px;
  min-width: 200px;
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background-color: var(--background);
}

/* Main Content */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.welcome-section {
  background: var(--surface);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow);
  margin-bottom: 2rem;
}

.welcome-section h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.roles-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-admin {
  background-color: #e3f2fd;
  color: #1976d2;
}

.badge-trainer {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.badge-assistant {
  background-color: #fff3e0;
  color: #ef6c00;
}

.badge-student {
  background-color: #e8f5e9;
  color: #388e3c;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--shadow);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(60%);
}

.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

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

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

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background-color: var(--background);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.table tr:hover {
  background-color: var(--background);
}

/* Status badges */
.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-running {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-stopped {
  background-color: #ffebee;
  color: #c62828;
}

.status-provisioning,
.status-starting {
  background-color: #fff3e0;
  color: #ef6c00;
}

.status-provisioned {
  background-color: #e8f5e9;
  color: #388e3c;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-card {
  background: var(--surface);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
}

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

.login-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 4px solid var(--error-color);
}

.alert-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid var(--success-color);
}

.alert-info {
  background-color: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid var(--info-color);
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-container {
    flex-wrap: wrap;
  }

  .navbar-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .container {
    padding: 1rem;
  }

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