/**
 * StepOn Custom Styles
 * Design inspired by stepon.pk
 */

/* Color Palette */
:root {
    --primary-green: #28a745;
    --primary-dark: #1e7e34;
    --accent-red: #dc3545;
    --accent-orange: #fd7e14;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background-color: #fff;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-green);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 2rem;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-red);
    margin: 1rem 0;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* District Badges */
.district-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.district-badge:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* Badge Colors - Different for each district */
.badge-blue { background-color: #0d6efd; color: white; }
.badge-orange { background-color: #fd7e14; color: white; }
.badge-purple { background-color: #6f42c1; color: white; }
.badge-teal { background-color: #20c997; color: white; }
.badge-pink { background-color: #d63384; color: white; }
.badge-indigo { background-color: #6610f2; color: white; }
.badge-cyan { background-color: #0dcaf0; color: white; }
.badge-green { background-color: #198754; color: white; }

/* Tables */
.table-custom {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-custom thead {
    background-color: var(--light-bg);
}

.table-custom th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.table-custom tbody tr {
    transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

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

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

/* Dashboard Widgets */
.dashboard-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.widget-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.widget-icon.success { background-color: #d1f2eb; color: #0f5132; }
.widget-icon.danger { background-color: #f8d7da; color: #842029; }
.widget-icon.warning { background-color: #fff3cd; color: #664d03; }
.widget-icon.info { background-color: #cfe2ff; color: #084298; }

/* Form Styles */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Visit Form Specific */
.form-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-section-header {
    cursor: pointer;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.form-section-header:hover {
    background-color: #e9ecef;
}

.field-group {
    padding: 1rem;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.field-group.active {
    border-left-color: var(--primary-green);
    background-color: #f8f9fa;
}

/* Progress Bar */
.progress-custom {
    height: 30px;
    border-radius: 15px;
    background-color: #e9ecef;
}

.progress-custom .progress-bar {
    font-weight: 600;
    line-height: 30px;
}

/* Badges (Achievement) */
.achievement-badge {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.achievement-badge:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast Notifications */
.toast {
    min-width: 300px;
}

/* School Card */
.school-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.school-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Photo Preview */
.photo-preview {
    max-width: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.text-green {
    color: var(--primary-green) !important;
}

.bg-light-green {
    background-color: #d1f2eb !important;
}

.border-green {
    border-color: var(--primary-green) !important;
}
