/* Admin Dashboard Styles - Cinevate Cinema Management */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ==================== HEADER STYLES ==================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: #667eea;
}

.logo h1 {
    font-size: 1.8rem;
    color: #333;
    font-weight: 700;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.page-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
}

.theater-selector {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.current-pay-cycle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 2rem;
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* Card Icon Gradients - Combined from both files */
.movies-icon { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.showtimes-icon { background: linear-gradient(135deg, #4834d4, #686de0); }
.employees-icon { background: linear-gradient(135deg, #00d2d3, #54a0ff); }
.schedule-icon { background: linear-gradient(135deg, #4834d4, #686de0); }
.timeclock-icon { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.payroll-icon { background: linear-gradient(135deg, #ff9ff3, #f368e0); }
.reports-icon { background: linear-gradient(135deg, #ff9ff3, #f368e0); }
.settings-icon { background: linear-gradient(135deg, #feca57, #ff9ff3); }
.customers-icon { background: linear-gradient(135deg, #48dbfb, #0abde3); }

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-stats {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== CONTENT SECTIONS ==================== */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: #333;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* ==================== EMPLOYEE GRID ==================== */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.employee-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.employee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.employee-info h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.employee-role {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
}

.employee-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-clocked-in {
    background-color: #d4edda;
    color: #155724;
}

.status-scheduled {
    background-color: #fff3cd;
    color: #856404;
}

.status-off {
    background-color: #f8d7da;
    color: #721c24;
}

.employee-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.employee-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background-color: #3498db;
    color: white;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.btn-schedule {
    background-color: #9b59b6;
    color: white;
}

.btn-schedule:hover {
    background-color: #8e44ad;
}

/* ==================== ACTIVITY FEED ==================== */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid #e9ecef;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    background: rgba(248, 249, 250, 0.5);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.activity-clock-in { background-color: #28a745; }
.activity-schedule { background-color: #6f42c1; }
.activity-swap { background-color: #fd7e14; }
.activity-payroll { background-color: #20c997; }

.activity-content h4 {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.activity-details {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #999;
    font-size: 0.8rem;
}

/* ==================== MODALS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    margin: 5% auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.large-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f1f1;
}

.modal-title {
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(0,0,0,0.1);
}

/* ==================== EMPLOYEE MODAL STYLES ==================== */

/* Ensure both add and edit modals have consistent styling */
#addEmployeeModal,
#editEmployeeModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

#addEmployeeModal .modal-content,
#editEmployeeModal .modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header styling */
#addEmployeeModal .modal-header,
#editEmployeeModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

#addEmployeeModal .modal-title,
#editEmployeeModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#addEmployeeModal .modal-close,
#editEmployeeModal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#addEmployeeModal .modal-close:hover,
#editEmployeeModal .modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Form section styling */
#addEmployeeModal .form-section,
#editEmployeeModal .form-section {
    margin-bottom: 1.5rem;
    padding: 0 2rem;
}

#addEmployeeModal .form-section:first-of-type,
#editEmployeeModal .form-section:first-of-type {
    padding-top: 1.5rem;
}

#addEmployeeModal .form-section h3,
#editEmployeeModal .form-section h3 {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

/* Form row and group styling */
#addEmployeeModal .form-row,
#editEmployeeModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

#addEmployeeModal .form-group,
#editEmployeeModal .form-group {
    display: flex;
    flex-direction: column;
}

#addEmployeeModal .form-group label,
#editEmployeeModal .form-group label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #555;
    font-size: 0.9rem;
}

#addEmployeeModal .form-group input,
#addEmployeeModal .form-group select,
#editEmployeeModal .form-group input,
#editEmployeeModal .form-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

/* Form actions styling */
#addEmployeeModal .form-actions,
#editEmployeeModal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

#addEmployeeModal .form-actions .btn-secondary,
#addEmployeeModal .form-actions .btn-primary,
#editEmployeeModal .form-actions .btn-secondary,
#editEmployeeModal .form-actions .btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#addEmployeeModal .form-actions .btn-secondary,
#editEmployeeModal .form-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

#addEmployeeModal .form-actions .btn-secondary:hover,
#editEmployeeModal .form-actions .btn-secondary:hover {
    background-color: #5a6268;
}

#addEmployeeModal .form-actions .btn-primary,
#editEmployeeModal .form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#addEmployeeModal .form-actions .btn-primary:hover,
#editEmployeeModal .form-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#addEmployeeModal .form-actions .btn-primary:disabled,
#editEmployeeModal .form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive design */
@media (max-width: 768px) {
    #addEmployeeModal .modal-content,
    #editEmployeeModal .modal-content {
        width: 95%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    #addEmployeeModal .form-row,
    #editEmployeeModal .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    #addEmployeeModal .modal-header,
    #editEmployeeModal .modal-header,
    #addEmployeeModal .form-section,
    #editEmployeeModal .form-section,
    #addEmployeeModal .form-actions,
    #editEmployeeModal .form-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Loading spinner for form submission */
.fa-spinner.fa-spin {
    animation: fa-spin 1s infinite linear;
}

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

/* ==================== FORMS ==================== */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ==================== LOADING & ALERTS ==================== */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

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

.error {
    background-color: #ffe6e6;
    color: #d63031;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #d63031;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success {
    background-color: #e6ffe6;
    color: #00b894;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #00b894;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #ffc107;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== STATUS INDICATORS ==================== */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online { background-color: #2ecc71; }
.status-offline { background-color: #e74c3c; }
.status-warning { background-color: #f39c12; }

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
    }

    .main-container {
        padding: 0 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-actions {
        flex-direction: column;
    }

    .employee-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 2% auto;
        max-height: 95vh;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }