* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #CE1126 0%, #FCD116 50%, #006B3F 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    display: inline-block;
    margin-right: 2rem;
    font-size: 1.8rem;
}

nav {
    display: inline-block;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

.section {
    display: none;
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section.active {
    display: block;
}

.hero {
    text-align: center;
    padding: 2rem 0;
}

.hero h2 {
    color: #006B3F;
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.quick-actions {
    margin: 2rem 0;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin: 0 10px;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background-color: #006B3F;
    color: white;
}

.btn-secondary {
    background-color: #CE1126;
    color: white;
}

.btn-primary:hover {
    background-color: #004d2c;
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background-color: #a50e20;
    transform: translateY(-2px);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #006B3F;
}

.feature-card h3 {
    color: #006B3F;
    margin-bottom: 1rem;
}

.registration-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #006B3F;
    font-size: 1.1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #006B3F;
    box-shadow: 0 0 5px rgba(0,107,63,0.3);
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-results {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    min-height: 100px;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        display: block;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    nav {
        display: block;
        text-align: center;
    }
    
    nav a {
        display: inline-block;
        margin: 0.25rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .quick-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        margin: 0;
    }
}

/* Admin Dashboard Styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #006B3F, #004d2c);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.admin-actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.records-table {
    margin-top: 2rem;
    overflow-x: auto;
}

.records-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.records-table th,
.records-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.records-table th {
    background: #006B3F;
    color: white;
    font-weight: bold;
}

.records-table tr:hover {
    background: #f5f5f5;
}

/* Login form */
#login-form-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

#admin-content {
    display: none;
}

/* Validation Styles */
input.valid {
    border-color: #006B3F !important;
    box-shadow: 0 0 5px rgba(0, 107, 63, 0.3) !important;
}

input.invalid {
    border-color: #CE1126 !important;
    box-shadow: 0 0 5px rgba(206, 17, 38, 0.3) !important;
}

.validation-message {
    color: #CE1126;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Required field indicators */
.form-group label::after {
    content: " *";
    color: #CE1126;
}

.form-group label:has(+ input:not([required]))::after {
    content: "";
}

/* Form hints */
.form-hint {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Ghana-specific form improvements */
.ghana-format-hint {
    background: #f0f8f0;
    border-left: 4px solid #006B3F;
    padding: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    border-radius: 4px;
}

/* Certificate Styles */
.btn-certificate {
    background: linear-gradient(135deg, #006B3F, #004d2c);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin: 10px 0;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-certificate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,107,63,0.3);
}

.btn-small {
    background: #006B3F;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #004d2c;
}

.certificate-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
}

/* Result card enhancements */
.result-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #006B3F;
    margin: 1rem 0;
}

/* Notification styles */
.notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Advanced Search Styles */
.search-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
    transition: all 0.3s;
    font-weight: bold;
}

.tab-button.active {
    background: #006B3F;
    color: white;
}

.tab-button:hover:not(.active) {
    background: #e9ecef;
}

.search-tab-content {
    display: none;
}

.search-tab-content.active {
    display: block;
}

.advanced-search-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.advanced-search-form .form-group {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 0;
}

.advanced-search-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #006B3F;
    font-weight: bold;
}

.advanced-search-form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.search-results {
    margin-top: 2rem;
}

.results-container {
    max-height: 500px;
    overflow-y: auto;
}

.result-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #006B3F;
}

.result-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-type {
    background: #006B3F;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-download {
    background: #006B3F;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-download:hover {
    background: #004d2c;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Offline Status Styles */
.offline-indicator {
  background: #CE1126;
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.offline-indicator.online {
  background: #006B3F;
}

.offline-warning {
  background: #FCD116;
  color: #000;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
}

/* Pending registrations panel */
.pending-registrations {
  background: #f8f9fa;
  border: 2px dashed #FCD116;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.pending-item {
  background: white;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: 4px;
  border-left: 4px solid #FCD116;
}

.pending-type {
  font-weight: bold;
  color: #CE1126;
}

/* Button states for offline */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-offline {
  background: #6c757d !important;
}

.btn-offline:hover {
  background: #545b62 !important;
}

/* Modern CSS Variables */
:root {
  --primary-color: #006B3F;
  --primary-dark: #004d2c;
  --secondary-color: #CE1126;
  --accent-color: #FCD116;
  --text-color: #333;
  --light-gray: #f8f9fa;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Modern Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Modern Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.logo-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Modern Navigation */
nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-link.active {
  background: var(--accent-color);
  color: #000;
}

/* Modern Cards */
.section {
  display: none;
  background: white;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern Forms */
.registration-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 107, 63, 0.1);
}

.form-input.error {
  border-color: var(--secondary-color);
}

/* Modern Buttons */
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 107, 63, 0.3);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #a50e20;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Modern Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
  border-top: 4px solid var(--primary-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Modern Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e1e5e9;
}

.data-table th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

.data-table tr:hover {
  background: var(--light-gray);
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-completed {
  background: #d1edff;
  color: var(--primary-color);
}

.status-approved {
  background: #d4edda;
  color: #155724;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav {
    justify-content: center;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}