/* EBS (Electronic Bout Sheets) - Common Styling */

:root {
  --primary-color: #123e69;
  --accent-color: #1a6e2e;
  --warning-color: #c0392b;
  --info-color: #3498db;
  --border-color: #ddd;
  --text-color: #333;
  --light-bg: #f9f9f9;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  background: white;
  margin: 0;
  padding: 0;
}

/* EBS Header */
.ebs-header {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1rem;
  border-bottom: 2px solid #0a2541;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ebs-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.ebs-header-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.ebs-sync-status {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
}

.ebs-sync-status.connected {
  background: var(--accent-color);
  color: white;
}

.ebs-sync-status.offline {
  background: #f39c12;
  color: white;
}

.ebs-sync-status.syncing {
  background: var(--info-color);
  color: white;
}

/* Card/Section Styling */
.ebs-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ebs-card h2 {
  margin: 0 0 0.8rem 0;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.ebs-card h3 {
  margin: 0.8rem 0 0.4rem 0;
  color: var(--primary-color);
}

/* Button Styling */
.ebs-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}

.ebs-btn:hover {
  opacity: 0.9;
}

.ebs-btn:active {
  transform: scale(0.98);
}

.ebs-btn-primary {
  background: var(--primary-color);
  color: white;
}

.ebs-btn-success {
  background: var(--accent-color);
  color: white;
}

.ebs-btn-warning {
  background: #f39c12;
  color: white;
}

.ebs-btn-danger {
  background: var(--warning-color);
  color: white;
}

.ebs-btn-secondary {
  background: #95a5a6;
  color: white;
}

.ebs-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Table Styling */
.ebs-table {
  width: 100%;
  border-collapse: collapse;
}

.ebs-table th {
  background: var(--primary-color);
  color: white;
  padding: 0.6rem;
  text-align: left;
}

.ebs-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.ebs-table tr:hover {
  background: var(--light-bg);
}

/* Form Elements */
.ebs-form-group {
  margin-bottom: 1rem;
}

.ebs-form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--primary-color);
}

.ebs-form-group input,
.ebs-form-group select,
.ebs-form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.ebs-form-group input:focus,
.ebs-form-group select:focus,
.ebs-form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 62, 105, 0.1);
}

/* Alert/Notice Styling */
.ebs-alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
  border-radius: 4px;
}

.ebs-alert-info {
  background: #d1ecf1;
  border-color: var(--info-color);
  color: #0c5460;
}

.ebs-alert-warning {
  background: #fff3cd;
  border-color: #f39c12;
  color: #856404;
}

.ebs-alert-danger {
  background: #f8d7da;
  border-color: var(--warning-color);
  color: #721c24;
}

.ebs-alert-success {
  background: #d4edda;
  border-color: var(--accent-color);
  color: #155724;
}

/* Utilities */
.ebs-text-center {
  text-align: center;
}

.ebs-text-right {
  text-align: right;
}

.ebs-text-muted {
  color: #666;
  font-size: 0.9rem;
}

.ebs-mb-1 { margin-bottom: 1rem; }
.ebs-mb-2 { margin-bottom: 2rem; }
.ebs-mt-1 { margin-top: 1rem; }
.ebs-mt-2 { margin-top: 2rem; }

.ebs-hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .ebs-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ebs-btn-group {
    flex-direction: column;
  }

  .ebs-btn {
    width: 100%;
    text-align: center;
  }

  .ebs-table {
    font-size: 0.85rem;
  }

  .ebs-table th, .ebs-table td {
    padding: 0.4rem;
  }
}
