/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.logout-link {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-box h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 400;
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
}

.login-info code {
    background-color: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.login-info .warning {
    color: #dc3545;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group .required {
    color: #dc3545;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-top: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: #667eea;
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #333;
}

/* Search Box */
.search-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.search-box form {
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

/* Dashboard Sections */
.dashboard-sections {
    display: grid;
    gap: 2rem;
}

.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Employee Form */
.employee-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Employee Details */
.employee-details {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
}

.detail-value a {
    color: #667eea;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

/* Footer */
.main-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* Bulk Upload Styles */
.bulk-upload-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-instructions {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.upload-instructions h2 {
    color: #333;
    margin-bottom: 1rem;
}

.upload-instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.download-sample {
    margin-top: 1.5rem;
}

.upload-form-section {
    margin-top: 2rem;
}

.upload-form-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

.upload-form .form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.upload-results {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-results h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

.results-section {
    margin-bottom: 2rem;
}

.results-section:last-child {
    margin-bottom: 0;
}

.results-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.success-results h3 {
    color: #155724;
}

.error-results h3 {
    color: #dc3545;
}

.csv-format-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.csv-format-info h3 {
    color: #333;
    margin-bottom: 1rem;
}

.csv-format-info ul {
    margin-left: 1.5rem;
}

.csv-format-info li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.csv-format-info ol {
    margin-left: 1.5rem;
}

.excel-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.excel-warning strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.excel-warning p {
    margin: 0.5rem 0 0 0;
    color: #856404;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header > div {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .page-header > div .btn {
        width: 100%;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .search-box form {
        flex-direction: column;
    }
}

