/* Reset and base styles */
* {
    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: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #20B2AA 0%, #1E90FF 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    font-size: 2.5rem;
    color: #20B2AA;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #20B2AA 0%, #1E90FF 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #7f8c8d;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #20B2AA 0%, #1E90FF 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 178, 170, 0.4);
}

.btn-secondary {
    background-color: #1E90FF;
    color: white;
}

.btn-secondary:hover {
    background-color: #1C86EE;
}

.btn-success {
    background-color: #20B2AA;
    color: white;
}

.btn-success:hover {
    background-color: #1E9B95;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background-color: #667eea;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #20B2AA;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(32, 178, 170, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.4);
}

.card-icon {
    font-size: 3rem;
    color: #20B2AA;
    margin-bottom: 1rem;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Upload section */
.upload-section {
    max-width: 800px;
    margin: 0 auto;
}

.upload-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.upload-icon {
    text-align: center;
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.requirements {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.requirements ul {
    list-style: none;
    padding-left: 0;
}

.requirements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.requirements li:last-child {
    border-bottom: none;
}

.file-upload {
    margin: 2rem 0;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: block;
    padding: 2rem;
    border: 2px dashed #667eea;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background-color: #f8f9fa;
    border-color: #5a6fd8;
}

.file-upload-label i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
    display: block;
}

/* Admin sections */
.admin-sections {
    display: grid;
    gap: 2rem;
}

.admin-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-close:hover {
    color: #2c3e50;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* Welcome section */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* History page styles */
.history-section {
    max-width: 1000px;
    margin: 0 auto;
}

.history-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.card-header h3 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.history-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.history-table tr:hover {
    background-color: #f8f9fa;
}

.date-info,
.time-info,
.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.date-info:last-child,
.time-info:last-child,
.file-info:last-child {
    margin-bottom: 0;
}

.date-info i,
.time-info i,
.file-info i {
    color: #667eea;
    width: 16px;
}

.text-muted {
    color: #7f8c8d;
    font-style: italic;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.empty-icon {
    font-size: 4rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .upload-card {
        padding: 1.5rem;
    }
    
    .admin-section {
        padding: 1.5rem;
    }
}

/* Import Interface Styles */
.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.import-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.import-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.import-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
}

.import-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.import-content {
    padding: 20px;
}

.import-content p {
    margin-bottom: 10px;
    color: #666;
}

.import-content ul {
    margin: 10px 0 15px 20px;
    color: #555;
}

.import-content li {
    margin-bottom: 5px;
    font-size: 14px;
}

.import-content small {
    color: #888;
    font-style: italic;
}

.import-form {
    margin-top: 15px;
}

.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-input-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.file-input-group input[type="file"]:hover {
    border-color: #667eea;
}

.file-input-group input[type="file"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.import-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.import-warning h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 16px;
}

.import-warning ul {
    margin: 10px 0 0 20px;
    color: #856404;
}

.import-warning li {
    margin-bottom: 5px;
    font-size: 14px;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Mobile responsive for import */
@media (max-width: 768px) {
    .import-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .import-card {
        margin-bottom: 15px;
    }
    
    .file-input-group {
        gap: 8px;
    }
}

/* Collapsible Sections */
.collapsible-section .section-header {
    position: relative;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-collapse {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-collapse:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.btn-collapse i {
    transition: transform 0.3s ease;
}

.btn-collapse.collapsed i {
    transform: rotate(-90deg);
}

.btn-collapse.expanded i {
    transform: rotate(0deg);
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.section-content.expanded {
    max-height: none;
    opacity: 1;
}

/* Responsive adjustments for collapsible sections */
@media (max-width: 768px) {
    .section-header-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-collapse {
        min-width: 35px;
        height: 35px;
        font-size: 12px;
    }
}