@font-face {
    font-family: Montserrat;
    src: url('/assets/fonts/Montserrat-Regular.ttf') format('truetype');
}

body {
    font-family: Montserrat, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

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

.container {
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Navigation */
.navbar {
    background-color: #333;
    color: white;
    padding: 12px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    border-bottom: 2px solid #B09F5D;
}

.login-form, .report-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    font-family: Montserrat, sans-serif;
    color: #333;
    margin-bottom: 30px;
}

input, select {
    font-family: Montserrat, sans-serif;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    font-family: Montserrat, sans-serif;
    display: block;
    margin-bottom: 5px;
    color: #666;
}

button {
    font-family: Montserrat, sans-serif;
    width: 100%;
    padding: 12px;
    background-color: #B09F5D;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #B4A563;
}

button:hover {
    background-color: #B4A563;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 40px 0 0;
}

.logo {
    width: 180px;
    height: auto;
}

.plus {
    font-size: 24px;
    font-weight: bold;
}

/* Report Table Styles */
.preview-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    margin-bottom: 20px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.report-header h3 {
    margin: 0;
    font-family: Montserrat, sans-serif;
    color: #333;
}

.copy-button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    background-color: #B09F5D;
}

.copy-button:hover {
    background-color: #B4A563;
}

.egym-table, .report-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Montserrat, sans-serif;
    table-layout: auto;
}

.egym-table thead, .report-table thead {
    background-color: #B09F5D;
    color: white;
}

.egym-table th,
.egym-table td,
.report-table th,
.report-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.egym-table tbody tr:nth-child(odd),
.report-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.egym-table tbody tr:hover,
.report-table tbody tr:hover {
    background-color: #f7f7f7;
}

.egym-table tbody tr td:hover,
.report-table tbody tr td:hover {
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .login-form, .report-form, .preview-container {
        background: #2d2d2d;
    }

    h2, .report-header h3 {
        color: #ffffff;
    }

    input, select {
        background-color: #3d3d3d;
        border-color: #444;
        color: #ffffff;
    }

    label {
        color: #ccc;
    }

    .egym-table th,
    .egym-table td,
    .report-table th,
    .report-table td {
        border-color: #444;
    }

    .egym-table tbody tr:nth-child(odd),
    .report-table tbody tr:nth-child(odd) {
        background-color: #3d3d3d;
    }

    .egym-table tbody tr:hover,
    .report-table tbody tr:hover {
        background-color: #3a3a3a;
    }

    .egym-table tbody tr td:hover,
    .report-table tbody tr td:hover {
        background-color: #4d4d4d;
    }
}

.cell-copied {
    animation: cellCopyFlash 0.5s ease;
}

@keyframes cellCopyFlash {
    0% { background-color: inherit; }
    50% { background-color: #90EE90; }
    100% { background-color: inherit; }
}

@media (prefers-color-scheme: dark) {
    @keyframes cellCopyFlash {
        0% { background-color: inherit; }
        50% { background-color: #4a7c4a; }
        100% { background-color: inherit; }
    }
}

/* Commission Report Tabs */
.commission-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.tab-button {
    width: auto;
    padding: 10px 16px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.tab-button:hover {
    background-color: #e5e5e5;
}

.tab-button.active {
    background-color: #B09F5D;
    color: white;
    border-color: #B09F5D;
}

.commission-content {
    margin-top: 20px;
}

.employee-summary {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #B09F5D;
}

.employee-summary h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.employee-summary p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.employee-commission-table {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dark mode support for commission tabs */
@media (prefers-color-scheme: dark) {
    .commission-tabs {
        border-bottom-color: #444;
    }

    .tab-button {
        background-color: #3d3d3d;
        color: #ffffff;
        border-color: #444;
    }

    .tab-button:hover {
        background-color: #4d4d4d;
    }

    .tab-button.active {
        background-color: #B09F5D;
        color: white;
    }

    .employee-summary {
        background-color: #3d3d3d;
        border-left-color: #B09F5D;
    }

    .employee-summary h4 {
        color: #ffffff;
    }

    .employee-summary p {
        color: #ccc;
    }
}
