/* MSP Client Support Portal Styles */

:root {
  --accent-color: #0e6ba8;
  --text-color: #1a1a1a;
  --text-light: #666;
  --border-color: #e0e0e0;
  --bg-light: #f9f9f9;
  --success: #2ecc71;
  --error: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #fff;
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 40px;
  max-width: 150px;
}

.header-title {
  display: flex;
  flex-direction: column;
}

.header-title h1 {
  font-size: 1.25rem;
  color: var(--accent-color);
  font-weight: 600;
}

.header-title p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-info {
  text-align: right;
}

.user-email {
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 500;
}

.logout-link {
  font-size: 0.85rem;
  color: var(--accent-color);
  text-decoration: none;
  cursor: pointer;
}

.logout-link:hover {
  text-decoration: underline;
}

/* Status Banner */
.status-banner {
  padding: 1rem 2rem;
  border-bottom: 2px solid var(--border-color);
  display: none;
}

.status-banner.operational {
  background-color: #d4edda;
  border-bottom-color: #2ecc71;
  display: block;
}

.status-banner.degraded {
  background-color: #fff3cd;
  border-bottom-color: #f39c12;
  display: block;
}

.status-banner.outage {
  background-color: #f8d7da;
  border-bottom-color: #e74c3c;
  display: block;
}

.status-banner-text {
  font-weight: 500;
  margin: 0;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card h3 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Forms */
form {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

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

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

label .required {
  color: var(--error);
}

input[type='text'],
input[type='email'],
input[type='date'],
input[type='number'],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(14, 107, 168, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type='checkbox'],
input[type='radio'] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.checkbox-item label,
.radio-item label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

button.primary:hover {
  opacity: 0.9;
}

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.secondary {
  background-color: var(--bg-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

button.secondary:hover {
  background-color: var(--border-color);
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.message.show {
  display: block;
}

.message.success {
  background-color: #d4edda;
  border: 1px solid #2ecc71;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  border: 1px solid #e74c3c;
  color: #721c24;
}

.message.info {
  background-color: #d1ecf1;
  border: 1px solid #3498db;
  color: #0c5460;
}

.message-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.message-details {
  font-size: 0.9rem;
}

/* Access Restricted Message */
.access-restricted {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.access-restricted h2 {
  color: var(--error);
  margin-bottom: 0.5rem;
}

.access-restricted p {
  color: var(--text-light);
}

/* Status Page */
.component-list {
  max-width: 700px;
  margin: 0 auto;
}

.component-item {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.component-name {
  font-weight: 500;
}

.component-status {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.component-status.operational {
  background-color: #d4edda;
  color: #155724;
}

.component-status.degraded {
  background-color: #fff3cd;
  color: #856404;
}

.component-status.outage {
  background-color: #f8d7da;
  color: #721c24;
}

.updated-at {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  form {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1rem;
  }

  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .section-title {
    font-size: 1.25rem;
  }

  form {
    padding: 1rem;
  }
}
