/* Admin Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* App Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.logout-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background: #c53030;
}

.app-main {
    flex: 1;
    padding: 2rem;
}

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

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #718096;
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
}

.password-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.password-input:disabled {
    background-color: #f7fafc;
    cursor: not-allowed;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid #feb2b2;
}

.login-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.login-button:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-1px);
}

.login-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.login-footer small {
    color: #718096;
    font-size: 0.75rem;
}

.admin-dashboard {
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.dashboard-header {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.title-section h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.title-section p {
    color: #718096;
    font-size: 1rem;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Dashboard Content */
.dashboard-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Data Table Container */
.data-table-container {
    width: 100%;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-section {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 350px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.filter-toggle-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.filter-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-top: 8px;
    z-index: 1000;
    max-width: 400px;
}

.filter-section {
    margin-bottom: 16px;
}

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

.filter-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.event-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.filter-checkbox input[type="checkbox"] {
    margin: 0;
}

.filter-checkbox span {
    color: #4a5568;
}

.date-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-group label {
    font-size: 14px;
    color: #4a5568;
    min-width: 40px;
}

.date-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.date-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

.filter-actions {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 12px;
}

.clear-filters-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-filters-btn:hover {
    background: #c53030;
}

.controls-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.items-per-page label {
    font-size: 14px;
    color: #4a5568;
}

.items-per-page select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.export-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.export-btn:hover:not(:disabled) {
    background: #2c5aa0;
}

.export-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

.data-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.data-table td {
    font-size: 14px;
    color: #4a5568;
}

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

.sort-btn {
    background: none;
    border: none;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-btn:hover {
    color: #3182ce;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-inactive {
    background: #fed7d7;
    color: #742a2a;
}

.status-approved {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

.status-rejected {
    background: #fed7d7;
    color: #742a2a;
}

/* Clickable Status */
.clickable-status {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.clickable-status:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clickable-status:hover::after {
    content: "Click to edit";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1000;
}

/* Inline Edit Components */
.inline-edit-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.status-dropdown {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #3182ce;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    color: #2d3748;
    outline: none;
}

.status-dropdown:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

.edit-actions {
    display: flex;
    gap: 4px;
}

.save-btn, .cancel-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.save-btn {
    background: #48bb78;
    color: white;
}

.save-btn:hover {
    background: #38a169;
    transform: scale(1.1);
}

.cancel-btn {
    background: #e53e3e;
    color: white;
}

.cancel-btn:hover {
    background: #c53030;
    transform: scale(1.1);
}

.status-display {
    display: flex;
    align-items: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons button {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-view:hover {
    background: #e6fffa;
}

.btn-edit:hover {
    background: #fef5e7;
}

.btn-delete:hover {
    background: #fed7d7;
}

/* No Data */
.no-data {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 40px 16px;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.table-info {
    color: #718096;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.page-btn.active {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Export Message */
.export-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-section {
        justify-content: space-between;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
}

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Error Container */
.error-container {
    background: #fed7d7;
    border: 1px solid #e53e3e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #742a2a;
}

.error-container h3 {
    margin: 0 0 12px 0;
    color: #742a2a;
}

.error-container p {
    margin: 8px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
