:root {
    --primary: #3498db;
    --primary-dark: #1a5276;
    --secondary: #f1c40f;
    --success: #2ecc71;
    --success-dark: #1e8449;
    --danger: #e74c3c;
    --info: #17a2b8;
    --info-dark: #117a8b;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    background-color: var(--primary);
    color: white;
    border-radius: 0.375rem 0.375rem 0 0 !important;
    padding: 12px 20px;
}

.card-header h5 {
    margin-bottom: 0;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th {
    background-color: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
}

.table td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Buttons */
.btn {
    border-radius: 0.25rem;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: var(--success-dark);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-info {
    background-color: var(--info);
}

.btn-info:hover {
    background-color: var(--info-dark);
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

/* Forms */
.form-control {
    padding: 10px 12px;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    width: 100%;
    margin-bottom: 15px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .table {
        display: block;
    }
    
    .table thead {
        display: none;
    }
    
    .table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 0.25rem;
    }
    
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
    }
    
    .table td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 15px;
    }
    
    .table td:last-child {
        border-bottom: 0;
    }
    
    .btn-group {
        display: flex;
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
        text-align: center;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .view-page .row > div {
        width: 100%;
        padding: 0;
    }
    
    .view-page .col-md-4 {
        margin-top: 20px;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .table td {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table td:before {
        margin-bottom: 5px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
}

/* Dashboard specific */
.dashboard-card {
    text-align: center;
    padding: 20px;
    border-radius: 0.375rem;
    color: white;
    margin-bottom: 20px;
}

.dashboard-card h2 {
    font-size: 2.5rem;
    margin: 10px 0;
}

/* Progress bars */
.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.75rem;
}

.bg-primary {
    background-color: var(--primary);
}

.bg-success {
    background-color: var(--success);
}

.bg-danger {
    background-color: var(--danger);
}

.bg-info {
    background-color: var(--info);
}

.bg-warning {
    background-color: #ffc107;
    color: #212529;
}

:root {
    --primary: #3498db;
    --secondary: #f1c40f;
    --success: #2ecc71;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    background-color: var(--primary);
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.btn {
    border-radius: 5px;
    padding: 8px 15px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #333;
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.alert {
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: var(--primary);
    color: white;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th, .table-bordered td {
    border: 1px solid #dee2e6;
}

.login-container, .register-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-check-input {
    margin-right: 10px;
}

.map-container {
    border-radius: 5px;
    overflow: hidden;
}

/* Dashboard specific styles */
.dashboard-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
}

.dashboard-card h2 {
    font-size: 2.5rem;
    margin: 10px 0;
}

.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 5px;
    border-radius: 5px;
}

/* Step form styling */
.step-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    color: #666;
}

.step.active .step-number {
    background-color: var(--primary);
    color: white;
}

.step.completed .step-number {
    background-color: var(--success);
    color: white;
}

.step-title {
    font-size: 14px;
    color: #666;
}

.step.active .step-title {
    color: var(--primary);
    font-weight: bold;
}

.step.completed .step-title {
    color: var(--success);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background-color: #ddd;
    z-index: -1;
}

.step.completed:not(:last-child)::after {
    background-color: var(--success);
}

/* Bulk upload styles */
.badge {
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.table-responsive {
    overflow-x: auto;
}

.table-sm td, .table-sm th {
    padding: 0.3rem 0.5rem;
    font-size: 0.875rem;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    /* General adjustments */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Tables */
    .table-responsive {
        border: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
        padding: 8px 10px;
    }
    
    .table td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
        flex: 1;
    }
    
    .table td:last-child {
        border-bottom: 0;
    }
    
    /* Forms */
    .form-group label {
        margin-bottom: 3px;
    }
    
    .form-control, .form-select {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Dashboard cards */
    .dashboard-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .dashboard-card h2 {
        font-size: 1.8rem;
    }
    
    /* View page layout */
    .view-page .col-md-8, 
    .view-page .col-md-4 {
        width: 100%;
        padding: 0;
    }
    
    /* Step forms */
    .step-progress {
        flex-wrap: wrap;
    }
    
    .step {
        flex: 0 0 33.33%;
        margin-bottom: 10px;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    /* Bulk upload */
    .bulk-upload .col-md-6 {
        width: 100%;
        padding: 0;
    }
}

/* Very small devices (phones, 480px and down) */
@media (max-width: 480px) {
    /* Navigation */
    .navbar-nav .nav-item {
        margin: 5px 0;
    }
    
    /* Tables */
    .table td {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table td:before {
        margin-bottom: 5px;
    }
    
    /* Buttons in table cells */
    .table .btn {
        margin-top: 5px;
        width: 100%;
    }
    
    /* Step forms */
    .step {
        flex: 0 0 50%;
    }
    
    .step-title {
        font-size: 12px;
    }
}