/* Global Styles */
:root {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --info-color: #3498db;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f6fa;
    color: var(--dark-color);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    transition: all 0.3s ease;
    overflow-y: auto; /* Make sidebar scrollable if content overflows */
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.logo img {
    width: 30px;
    height: 30px;
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.content-wrapper {
    margin-left: 250px;
    padding: 2rem;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--secondary-color);
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert.hidden {
    display: none;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Guidelines Panel */
.guidelines-panel {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.guidelines-panel h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guidelines-panel ul {
    list-style: none;
}

.guidelines-panel li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.guidelines-panel li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Subsection Styles */
.subsection {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subsection h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 0.5rem;
    }

    .logo span,
    .nav-link span {
        display: none;
    }

    .content-wrapper {
        margin-left: 60px;
        padding: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Form Validation Styles */
.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* Help Text */
.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Logout Link Styles */
.logout-link {
    margin-top: auto;
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.logout-link:hover {
    background-color: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
}

.logout-link i {
    color: #e74c3c;
}

/* Records Container and Table Styles */
.records-container {
    margin-top: 2rem;
    max-width: 100%;
    overflow-x: auto;
}

.record-table-wrapper {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    background-color: #fff;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.1);
    transition: box-shadow 0.3s ease;
}

.record-table-wrapper:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.record-table-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 3px solid #007bff;
    padding-bottom: .75rem;
    text-transform: capitalize;
}

/* Enhanced Table Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: #fff;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
}

.table th,
.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
    word-wrap: break-word;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 700;
}

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

.table tbody tr:hover {
    background-color: rgba(0,123,255,.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.02);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(0,123,255,.08);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

/* Responsive Table */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: .5rem;
}

/* Table Cell Content Styling */
.table td {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Long text handling */
.table td:has(.text-truncate) {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status indicators */
.table .status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Date and Time formatting */
.table .date-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #6c757d;
}

.table .number-cell {
    font-family: 'Courier New', monospace;
    text-align: right;
    font-weight: 600;
}

/* Empty state styling */
.records-container .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.records-container .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Loading state */
.records-container .loading {
    text-align: center;
    padding: 2rem;
    color: #007bff;
}

.records-container .loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        max-width: 120px;
    }
    
    .record-table-wrapper {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .record-table-wrapper h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* Stack table on very small screens */
    @media (max-width: 480px) {
        .table-responsive {
            border: 0;
        }
        
        .table {
            border: 0;
        }
        
        .table thead {
            display: none;
        }
        
        .table tbody,
        .table tr,
        .table td {
            display: block;
            width: 100%;
        }
        
        .table tr {
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            border-radius: 0.5rem;
            padding: 1rem;
            background-color: #f8f9fa;
        }
        
        .table td {
            border: none;
            padding: 0.5rem 0;
            text-align: left;
            max-width: none;
        }
        
        .table td:before {
            content: attr(data-label) ": ";
            font-weight: 600;
            color: #495057;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
        }
    }
} 