/**
 * Canadian Payroll System 2025 - Styles
 */

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

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

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

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

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.logo-text .tagline {
    font-size: 0.75rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

.logo i {
    font-size: 2rem;
}

.header-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.company-selector,
.year-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.company-selector label,
.year-selector label {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.company-selector select,
.year-selector select {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    min-width: 120px;
}

.company-selector select:focus,
.year-selector select:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.tax-year {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Navigation */
.main-nav {
    background: white;
    border-bottom: 2px solid #e1e8ed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: #5a6c7d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: #f8f9fa;
}

.nav-link i {
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 250px);
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.page.active {
    display: block;
}

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

.page h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page h2 i {
    color: #667eea;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

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

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

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

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

.btn-success {
    background: #28a745;
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-success:hover {
    background: #218838;
}

.btn-icon {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.btn-icon:hover {
    color: #764ba2;
}

/* Company Management Action Buttons */
.btn-icon.edit-btn {
    color: #667eea;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon.edit-btn:hover {
    color: #764ba2;
    background: #f0f0ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-icon.assign-btn {
    color: #28a745;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon.assign-btn:hover {
    color: #1e7e34;
    background: #f0fff4;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-icon.active-btn {
    color: #28a745;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: default;
    opacity: 0.7;
    background: #f0fff4;
}

.btn-icon.active-btn:hover {
    color: #28a745;
    background: #f0fff4;
    transform: none;
    box-shadow: none;
}

.btn-text {
    font-size: 0.85rem;
    margin-left: 0.25rem;
    font-weight: 500;
}

/* Employee Management Action Buttons */
.btn-icon.edit-employee-btn {
    color: #667eea;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon.edit-employee-btn:hover {
    color: #764ba2;
    background: #f0f0ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-icon.terminate-btn {
    color: #dc3545;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon.terminate-btn:hover {
    color: #c82333;
    background: #fff5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.form-container h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

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

.input-sm {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100px;
    font-size: 0.9rem;
}

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

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

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e1e8ed;
}

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

.no-data {
    text-align: center;
    color: #7f8c8d;
    padding: 3rem !important;
    font-style: italic;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

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

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

/* Payroll Processing */
.payroll-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.payroll-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 1.5rem;
}

.payroll-summary h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-item label {
    font-weight: 500;
}

/* Reports */
.report-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.report-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.report-header {
    border-bottom: 2px solid #667eea;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.report-header h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.report-table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.report-table th,
.report-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #dee2e6;
}

.report-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.report-table .total-row {
    background-color: #e9ecef;
    font-weight: 600;
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* T4 Slips */
.t4-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.t4-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.t4-slip {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.t4-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.t4-header h4 {
    margin-bottom: 0.5rem;
}

.t4-body {
    padding: 1.5rem;
}

.t4-section {
    margin-bottom: 1.5rem;
}

.t4-section h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e1e8ed;
}

.t4-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.t4-box {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.t4-box label {
    font-weight: 500;
    color: #495057;
}

.t4-box span {
    font-weight: 600;
    color: #2c3e50;
}

.t4-actions {
    padding: 1.5rem;
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: flex-end;
}

.t4-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ROE Forms */
.roe-header {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.roe-pay-periods {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Report Sections */
.report-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.report-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.report-section p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.report-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Tax Forms Tab Styling */
.tax-forms-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tax-form-tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tax-form-tab-btn:hover {
    background: #e8eaed;
    color: #333;
}

.tax-form-tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tax-form-tab-btn i {
    font-size: 1.1rem;
}

.tax-form-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tax-form-tab-content.active {
    display: block;
}

.tax-form-tab-content h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.tax-form-tab-content h3 i {
    margin-right: 0.5rem;
}

.tax-form-tab-content h4 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .company-logo {
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .header-info {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .company-selector,
    .year-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .company-selector select,
    .year-selector select {
        flex: 1;
        max-width: 200px;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e1e8ed;
        border-left: 3px solid transparent;
    }

    .nav-link.active {
        border-bottom-color: transparent;
        border-left-color: #667eea;
    }

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

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

    .payroll-header,
    .report-filters,
    .t4-filters {
        flex-direction: column;
        align-items: stretch;
    }

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

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }

    .t4-boxes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .page h2 {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Alert Boxes */
.alert-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-box i {
    font-size: 1.5rem;
    color: #856404;
}

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

.alert-box p {
    margin: 0;
    color: #856404;
}

.alert-box a {
    color: #667eea;
    text-decoration: underline;
    font-weight: 500;
}

/* Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 500;
}

/* Print Styles */
@media print {
    .header,
    .main-nav,
    .footer,
    .btn,
    .form-actions,
    .report-actions,
    .t4-actions {
        display: none !important;
    }

    body {
        background: white;
    }

    .page {
        display: block !important;
    }

    .table-container,
    .report-container,
    .t4-slip {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
