/* BoardInfo - InvolveMINT Design System */

/* CSS Variables - InvolveMINT Color Palette */
:root {
  /* Primary Colors */
  --im-green: #127127;
  --im-green-tint: #38aa2c;
  --im-green-gradient-start: #32a52f;
  --im-green-gradient-end: #127127;

  /* Secondary Colors */
  --im-purple: #bd3292;
  --im-orange: #f67600;
  --im-blue: #0366d6;

  /* Neutral Colors */
  --im-white: #ffffff;
  --im-gray-50: #f9fafb;
  --im-gray-100: #f2f4f8;
  --im-gray-200: #e5e7eb;
  --im-gray-300: #d1d5db;
  --im-gray-400: #9ca3af;
  --im-gray-500: #6b7280;
  --im-gray-600: #4b5563;
  --im-gray-700: #374151;
  --im-gray-800: #1f2937;
  --im-gray-900: #111827;

  /* Semantic Colors */
  --im-success: #127127;
  --im-warning: #f67600;
  --im-error: #dc2626;
  --im-info: #0366d6;

  /* Spacing */
  --im-padding: 0.75rem;
  --im-border-radius: 10px;
  --im-max-width: 947px;

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-secondary: "Manrope", sans-serif;
  --font-mono: "Roboto Mono", monospace;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--im-gray-800);
  background: var(--im-gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--im-gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

small {
  font-size: 0.875rem;
  color: var(--im-gray-600);
}

/* Links */
a {
  color: var(--im-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--im-green-tint);
}

/* Navigation Bar */
.navbar {
  background: linear-gradient(135deg, var(--im-green-gradient-start), var(--im-green-gradient-end));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: var(--im-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.nav-brand {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--im-white);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--im-white);
  opacity: 0.9;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu li a {
  color: var(--im-white);
  padding: 0.5rem 1rem;
  border-radius: var(--im-border-radius);
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--im-white);
}

/* Logout Button - Style as navigation link */
.logout-btn {
  background: none;
  border: none;
  color: var(--im-white);
  padding: 0.5rem 1rem;
  border-radius: var(--im-border-radius);
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--im-white);
}

/* Main Container */
.container {
  max-width: var(--im-max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Cards */
.card {
  background: var(--im-white);
  border-radius: var(--im-border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card h2 {
  color: var(--im-green);
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--im-gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--im-gray-200);
  border-radius: var(--im-border-radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--im-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--im-green);
  box-shadow: 0 0 0 3px rgba(18, 113, 39, 0.1);
}

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

.form-group small {
  display: block;
  margin-top: 0.25rem;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border-radius: var(--im-border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: linear-gradient(135deg, var(--im-green-gradient-start), var(--im-green-gradient-end));
  color: var(--im-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--im-green-tint), var(--im-green));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 113, 39, 0.3);
  color: var(--im-white);
}

.btn-secondary {
  background: var(--im-gray-100);
  color: var(--im-gray-700);
}

.btn-secondary:hover {
  background: var(--im-gray-200);
  transform: translateY(-1px);
  color: var(--im-gray-800);
}

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

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  color: var(--im-white);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Quick Actions */
.quick-actions {
  margin-top: 2rem;
}

.quick-actions h3 {
  color: var(--im-gray-800);
  margin-bottom: 1rem;
}

.quick-actions .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--im-border-radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-success {
  background: #d1fae5;
  border-color: var(--im-success);
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  border-color: var(--im-error);
  color: #991b1b;
}

.alert-warning {
  background: #fef3c7;
  border-color: var(--im-warning);
  color: #92400e;
}

.alert-info {
  background: #dbeafe;
  border-color: var(--im-info);
  color: #1e40af;
}

/* Auth Container */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--im-green-gradient-start), var(--im-green-gradient-end));
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--im-white);
  border-radius: var(--im-border-radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-card h1 {
  color: var(--im-green);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--im-gray-700);
  font-weight: 600;
}

.auth-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background: var(--im-gray-800);
  color: var(--im-gray-300);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: auto;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
}

/* Tables */
table, .table {
  width: 100%;
  border-collapse: collapse;
  background: var(--im-white);
  border-radius: var(--im-border-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

table thead, .table thead {
  background: linear-gradient(135deg, var(--im-green-gradient-start), var(--im-green-gradient-end));
  color: var(--im-white);
}

table th, .table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table td, .table td {
  padding: 1rem;
  border-bottom: 1px solid var(--im-gray-200);
}

table tbody tr:hover, .table tbody tr:hover {
  background: var(--im-gray-50);
}

table tbody tr:last-child td, .table tbody tr:last-child td {
  border-bottom: none;
}

/* Backup Codes Grid */
.backup-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.backup-codes div {
  background: var(--im-gray-100);
  padding: 1rem;
  border-radius: var(--im-border-radius);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--im-gray-800);
  border: 2px solid var(--im-gray-200);
}

/* Warning Box */
.warning {
  background: #fef3c7;
  border: 2px solid var(--im-warning);
  padding: 1.25rem;
  border-radius: var(--im-border-radius);
  margin: 1.5rem 0;
}

.warning strong {
  color: #92400e;
  font-weight: 700;
}

/* Info Box */
.info-box {
  background: #dbeafe;
  border-left: 4px solid var(--im-info);
  padding: 1rem;
  border-radius: var(--im-border-radius);
  margin: 1.5rem 0;
}

.info-box h3 {
  color: var(--im-gray-900);
  margin-bottom: 0.5rem;
}

/* Utilities */
.text-muted {
  color: var(--im-gray-600);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
  }

  .nav-menu li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .container {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .auth-card {
    padding: 1.5rem;
  }

  .quick-actions .btn {
    width: 100%;
    margin-right: 0;
  }

  table, .table {
    font-size: 0.875rem;
  }

  table th, table td,
  .table th, .table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .backup-codes {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .quick-actions {
    display: none;
  }

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--im-gray-300);
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 3px solid var(--im-green);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--im-green);
  outline-offset: 2px;
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--im-gray-300);
  border-radius: 50%;
  border-top-color: var(--im-green);
  animation: spin 1s linear infinite;
}

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

/* Selection Color */
::selection {
  background: var(--im-green);
  color: var(--im-white);
}

::-moz-selection {
  background: var(--im-green);
  color: var(--im-white);
}
