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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F5F5DC;
    min-height: 100vh;
    padding: 20px;
}

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

.login-box, .dashboard-box, .logs-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
    text-align: center;
}

h2 {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 5px;
}

.btn-link {
    display: inline-block;
    padding: 10px 20px;
    background: #9BAE94;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 174, 148, 0.4);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #9BAE94;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #9BAE94;
}

.location-status {
    padding: 12px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    min-height: 45px;
    display: flex;
    align-items: center;
}

.location-status .loading {
    color: #9BAE94;
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

.location-status .success-location {
    color: #155724;
    font-weight: 500;
}

.location-status .error-location {
    color: #c33;
    font-weight: 500;
    line-height: 1.6;
}

.btn-retry {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #9BAE94;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 174, 148, 0.4);
}

.btn-retry:active {
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.map-link {
    display: inline-block;
    margin-top: 5px;
    color: #9BAE94;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}

.map-link:hover {
    color: #7a9173;
    text-decoration: underline;
}

.map-link-small {
    color: #9BAE94;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
}

.map-link-small:hover {
    color: #7a9173;
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 14px;
    background: #9BAE94;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 174, 148, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-logout {
    background: #9BAE94;
    margin-top: 30px;
}

.btn-logout:hover {
    box-shadow: 0 5px 15px rgba(155, 174, 148, 0.4);
}

.info {
    background-color: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #9BAE94;
}

.preshift-checklist {
    margin-top: 25px;
}

.preshift-checklist h3 {
    font-style: italic;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #333;
}

.preshift-checklist ul {
    list-style: none;
    margin: 0;
    padding: 18px 20px;
    background-color: #a6a373;
    border-radius: 10px;
    border-left: 4px solid #6f6c44;
}

.preshift-checklist li {
    color: #222;
    padding: 6px 0 6px 28px;
    position: relative;
    line-height: 1.4;
}

.preshift-checklist li::before {
    content: "\2611";
    position: absolute;
    left: 0;
    top: 6px;
}

.safari-info {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

.opera-info {
    background-color: #ffe6e6;
    border-left: 4px solid #ff1b2d;
    margin-bottom: 20px;
}

.info p {
    margin: 8px 0;
    color: #555;
}

.info code {
    background-color: #e1e8ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #333;
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #9BAE94;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.links a:hover {
    color: #7a9173;
    text-decoration: underline;
}

.status-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.status-card.active {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #0a5f3f;
}

.status-card h2 {
    color: inherit;
    margin: 0;
    font-size: 1.5em;
}

.info-grid {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.info-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #9BAE94;
}

.info-item.highlight {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left-color: #fdcb6e;
}

.info-item label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-item span {
    display: block;
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}

.time-worked {
    font-size: 1.5em !important;
    color: #d63031 !important;
    font-weight: 700 !important;
}

.refresh-note {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    margin-top: 20px;
    font-style: italic;
}

.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.logs-table, .summary-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
}

.logs-table th, .summary-table th {
    background: #9BAE94;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.logs-table td, .summary-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

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

.active-session {
    background-color: #d4edda !important;
}

.active-session:hover {
    background-color: #c3e6cb !important;
}

.status-badge {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #0a5f3f;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-badge-warning {
    display: inline-block;
    margin-top: 4px;
    background: #fff3cd;
    color: #856404;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

.filter-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #e1e8ff;
}

.filter-box h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.filter-form {
    width: 100%;
}

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

.filter-grid .form-group {
    margin-bottom: 0;
}

.filter-grid .form-group label {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.filter-grid .form-group input {
    padding: 10px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-filter {
    background: #9BAE94;
    flex: 1;
}

.btn-clear {
    background: #a8a8a8;
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    padding: 14px;
    color: white;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 127, 127, 0.4);
}

.summary-box {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.summary-table {
    margin-top: 15px;
}

.summary-table th {
    background: #9BAE94;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .login-box, .dashboard-box, .logs-box {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .logs-table, .summary-table {
        font-size: 0.85em;
    }

    .logs-table th, .logs-table td,
    .summary-table th, .summary-table td {
        padding: 8px;
    }
}

/* Break Section Styles */
.break-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e1e8ff;
    text-align: center;
}

.status-card.break-active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #8b0000;
}

.status-card.break-active p {
    margin-top: 10px;
    font-size: 1.1em;
}

.btn-start-break {
    background: #ffc107;
    color: #333;
    margin-bottom: 15px;
    max-width: 300px;
}

.btn-start-break:hover {
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-popup {
    background: #6f4e37;
}

.btn-popup:hover {
    box-shadow: 0 5px 15px rgba(111, 78, 55, 0.4);
}

#popup-card {
    margin-top: 15px;
}

.btn-end-break {
    background: #28a745;
    margin-bottom: 15px;
    max-width: 300px;
}

.btn-end-break:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.info-item.highlight-net {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-left-color: #17a2b8;
}

.time-worked-net {
    font-size: 1.3em !important;
    color: #17a2b8 !important;
    font-weight: 700 !important;
}

/* Export Box Styles */
.export-box {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #81c784;
}

.export-box h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.export-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.export-form .filter-grid {
    flex: 1;
    min-width: 300px;
    margin-bottom: 0;
}

.btn-export {
    background: #2e7d32;
    width: auto;
    white-space: nowrap;
}

.btn-export:hover {
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
}

/* Rate Management Styles */
.rate-management-box {
    background-color: #fff3e0;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #ffb74d;
}

.rate-management-box h3 {
    color: #e65100;
    margin-bottom: 15px;
}

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

.rates-table th {
    background: #ff9800;
    color: white;
    padding: 12px;
    text-align: left;
}

.rates-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ffe0b2;
    vertical-align: middle;
}

.rates-table tr:hover {
    background-color: #fff8e1;
}

.rate-input {
    width: 100px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.location-input {
    width: 150px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.btn-add {
    background: #4caf50;
}

.btn-add:hover {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-delete {
    background: #dc3545;
    margin-left: 5px;
}

.btn-delete:hover {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-delete-small {
    background: #dc3545;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-delete-small:hover {
    background: #b02a37;
}

.btn-edit-small {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.btn-edit-small:hover {
    background: #0056b3;
}

.action-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.info-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
}

.add-rate-row {
    background-color: #f5f5f5;
}

/* Payroll Summary Styles */
.payroll-summary-box {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #64b5f6;
}

.payroll-summary-box h3 {
    color: #1565c0;
    margin-bottom: 15px;
}

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

.payroll-table th {
    background: #1976d2;
    color: white;
    padding: 12px;
    text-align: left;
}

.payroll-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #bbdefb;
}

.payroll-table tr:hover {
    background-color: #e3f2fd;
}

.payroll-table tfoot .totals-row {
    background: #bbdefb;
    font-weight: bold;
}

.payroll-table tfoot .totals-row td {
    border-top: 2px solid #1976d2;
    padding: 15px 12px;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .export-form {
        flex-direction: column;
    }

    .export-form .filter-grid {
        min-width: 100%;
    }

    .btn-export {
        max-width: 100%;
    }

    .rates-table, .payroll-table {
        font-size: 0.85em;
    }

    .rates-table th, .rates-table td,
    .payroll-table th, .payroll-table td {
        padding: 8px;
    }

    .rate-input, .location-input {
        width: 80px;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }
}
