:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f5f7fa;
    --text-color: #34495e;
    --border-color: #e0e0e0;
    --hover-color: #2980b9;
    --inactive-color: #b12717;
  }

  body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
  }

  #app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
  }

  h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
  }

  button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  button:hover {
    background-color: var(--hover-color);
  }

  input[type="text"], input[type="password"], input[type="date"], input[type="email"], select, textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
  }

  table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  }

  th, td {
    padding: 12px ;


    border-bottom: 1px solid var(--border-color);
  }

  th {
    background-color: var(--primary-color);
    color: white;
  }

  th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
  }

  th.sortable:hover {
    background-color: var(--hover-color);
  }

  .sort-indicator {
    font-size: 0.8em;
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.8);
  }

  tr:hover {
    background-color: #f5f5f5;
  }

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
}

.document-actions {
    display: flex;
    gap: 5px;
}

.document-actions button {
    padding: 5px 10px;
    font-size: 12px;
}

#employee-database {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#add-employee-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
#add-employee-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

#add-employee-button {
    background-color: var(--primary-color);

    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 22px;
    font-weight: bold;
}

.missing-data {
    border: 2px solid #ff6b6b;
    background-color: #fff0f0;
}

.missing-data::placeholder {
    color: #ff6b6b;
}

#add-employee-button:hover {
    background-color: var(--hover-color);
}

#employee-form-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#employees-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#employee-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#employee-form button {
    grid-column: span 2;
}

.document-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.document-status.red {
    background-color: var(--inactive-color);
}

.document-status.green {
    background-color: var(--secondary-color);
}

.upload-container {
    position: relative;
    display: inline-block;
}

.file-upload-btn {
    background-color: #2196F3;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

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

.document-note {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 4px;
    z-index: 1;
    width: 200px;
    font-size: 12px;
    color: #333;
    top: 100%;
    left: 0;
    margin-top: 5px;
}

.upload-container:hover .document-note {
    display: block;
}

#filter-container {

    margin-bottom: 20px;

  }

  #filter-container select {
    flex: 1;
    margin: 0 10px 10px 0;
  }
.edit-btn {
    background-color: var(--primary-color);

}

.delete-btn {
    background-color: var(--inactive-color);
}

.unsign-btn {
    background-color: #FF9800;
}

#cancel-edit {
    background-color: var--inactive-color;
}

#agency-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
  }

  #agency-list button {
    width: 100%;
    height: 100px;
    font-size: 18px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
  }

  #agency-list button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }

/* Responsive adjustments */
@media (max-width: 480px) {
    #agency-list {
        max-width: 90%;
    }

    #agency-list button {
        font-size: 16px;
        padding: 12px 15px;
    }
}

#back-button {
    margin-bottom: 20px;
    background-color: #2196F3;
}

.document-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    max-width: 200px;
    line-height: 1.4;
}

#language-switch {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn.active {
    box-shadow: 0 0 0 2px #2825e7;
}

.lang-btn .flag-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

  #filter-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .filter-group {
    flex: 1;
    margin-right: 10px;
    margin-bottom: 10px;
    min-width: 200px;
}

.filter-group:last-child {
    margin-right: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.lang-btn .flag-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#app > h1:first-of-type {
    margin-top: 50px;
}
#auth-container {
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#auth-container input {
    margin-bottom: 10px;
}

#logout-button {
    margin-bottom: 20px;
    background-color: #2196F3;
    position: center;
    top: 10px;
    right: 10px;
}

/* Status switch styles */
.employee-status-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.status-indicator {
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-indicator.active {
    background-color: var(--secondary-color);
    color: white;
}

.status-indicator.inactive {
    background-color: var(--inactive-color);
    color: white;
}

/* Termination reason modal styles */
#termination-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
}

#termination-reason-input {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
}

#termination-date-input {
    width: 100%;
    margin-bottom: 10px;
}

#active-employees-container,
#inactive-employees-container {
    margin-bottom: 40px;
    overflow-x: auto;
}

#active-employees-table,
#inactive-employees-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#active-employees-table th,
#active-employees-table td,
#inactive-employees-table th,
#inactive-employees-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#active-employees-table th,
#inactive-employees-table th {
    background-color: --secondary-color;
    color: white;
}

#active-employees-table tr:nth-child(even),
#inactive-employees-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

#active-employees-table tr:hover,
#inactive-employees-table tr:hover {
    background-color: #85b5d1;
}

#stats-toggle-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

#toggle-stats-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#toggle-stats-button:hover {
    background-color: var(--hover-color);
}

#stats-container {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

#basic-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-item {
    flex-basis: 48%;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-weight: bold;
    color: #333;
}

.stat-value {
    float: right;
    color: #2196F3;
    font-weight: bold;
}
#download-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

#download-options {
    width: 100%;
    margin-bottom: 10px;
    padding: 5px;
}

#download-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#download-button:hover {
    background-color: #45a049;
}

#charts {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.chart {
    flex-basis: 48%;
    height: 300px;
    margin-bottom: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.chart-container {
    flex-basis: 48%;
    height: 300px;
    margin-bottom: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .stat-item,
    .chart {
        flex-basis: 100%;
    }
}

@media (max-width: 1200px) {
    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px;
    }
}

@media (max-width: 992px) {
    table {
        font-size: 11px;
    }

    th, td {
        padding: 4px;
    }

    .switch {
        width: 50px;
        height: 28px;
    }

    .slider:before {
        height: 22px;
        width: 22px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(22px);
    }
}

@media (max-width: 768px) {
    table {
        font-size: 10px;
    }

    th, td {
        padding: 3px;
    }

    .switch {
        width: 40px;
        height: 24px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(16px);
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }

    .status-indicator {
        font-size: 10px;
        padding: 1px 4px;
    }
}

@media (max-width: 576px) {
    #employee-form {
        grid-template-columns: 1fr;
    }

    #employee-form button {
        grid-column: 1;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    table {
        font-size: 9px;
    }

    th, td {
        padding: 2px;
    }

    .switch {
        width: 36px;
        height: 20px;
    }

    .slider:before {
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;
    }

    input:checked + .slider:before {
        transform: translateX(16px);
    }

    .status-indicator {
        font-size: 8px;
        padding: 1px 3px;
    }
}
@media (max-width: 768px) {
    #filter-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
        align-items: flex-end;
    }

    #filter-container select {
      margin-right: 0;
    }
  }
  @media (max-width: 768px) {
    #filter-container {
        flex-direction: column;
    }
}

    .filter-group {
        flex: 0 0 auto;
        min-width: 150px;
        max-width: 200px;
    }
    .filter-group label {
        display: block;
        margin-bottom: 3px;
        font-size: 12px;
        color: var(--text-color);
    }

    .filter-group select,
.filter-group input[type="date"] {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;

    /* Responsive adjustments */
@media (max-width: 768px) {
    #filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        max-width: none;
    }

}
}