body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

h1, h2 {
    color: #333;
    text-align: center;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
}

.content-container, .form-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: auto;
    max-width: 800px;
    margin: 0 auto;
}

p {
    margin-bottom: 10px;
    color: #444;
    font-size: 16px;
}

pre.content-text {
    white-space: pre-wrap;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    max-width: 100%;
    margin: 0 auto;
    font-size: 16px;
}

.revoked {
    color: red;
    font-weight: bold;
}

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

.buttons > *, .buttons a {
    margin: 5px 0;
}

form, a {
    display: inline-block;
    margin-right: 10px;
}

/* Existerande knappstil (blå) */
input[type="submit"], a.button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    background-color: #008CBA;
    color: white;
}

input[type="submit"]:hover, a.button:hover {
    background-color: #006d9c;
}

/* Uppdaterad grön knappstil för input, button och a */
input.green-button, button.green-button, a.green-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    background-color: #4CAF50;
    color: white;
}

input.green-button:hover, button.green-button:hover:not(:disabled), a.green-button:hover {
    background-color: #45a049;
}

button.green-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Röd knappstil */
a.red-button, .remove-image {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    background-color: #ff4d4d;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.red-button:hover {
    background-color: #cc0000;
}

.remove-image {
    padding: 0;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
}

.remove-image:hover {
    background-color: #c82333;
}

a.text-link {
    color: #008CBA;
    text-decoration: underline;
    margin-left: 10px;
    font-size: 16px;
}

a.text-link:hover {
    color: #006d9c;
}

.flash-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #ffebee;
    color: #c62828;
    text-align: center;
    font-size: 16px;
}

/* Basstil för tabeller */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

th, td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    font-size: 16px;
    width: 120px;
    max-width: 150px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* Specifik styling för tidrapport-tabellen */
table.time-report-table th,
table.time-report-table td {
    width: 100px;
    max-width: 100px;
    padding: 10px;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
    font-size: 16px;
}

.sort-links {
    margin-bottom: 15px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Justera styling för Excel-uppladdningsfältet */
.form-group.upload-group {
    align-items: center;
}

.form-group.upload-group label {
    flex: 1;
    margin-right: 10px;
}

.form-group.upload-group input[type="file"] {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Styling för förifylld tidrapport */
table.prefilled-table {
    background-color: #f9f9f9;
}

label {
    flex: 1;
    margin-right: 10px;
    font-weight: bold;
    color: #444;
    text-align: left;
    font-size: 16px;
}

input, select, textarea {
    flex: 2;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

input[type="file"] {
    padding: 6px;
}

form {
    display: block;
    margin: 0 auto;
    width: 90%;
}

/* Nya stilar för bildförhandsgranskning */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.revoked-alert {
    background-color: #f8f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.revoked-alert h2 {
    color: #dc3545;
    margin-bottom: 10px;
}

.main-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-actions, .admin-actions, .common-actions {
    display: flex;
    gap: 10px;
}

.admin-actions, .common-actions {
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.pagination span {
    font-size: 16px;
    color: #444;
}

/* Stil för menyknappen */
.menu-toggle {
    display: none;
    background-color: #008CBA;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 10px;
}

.menu-toggle:hover {
    background-color: #006d9c;
}

/* Mobilanpassning */
@media (max-width: 480px) {
    .content-container, .form-container {
        padding: 15px;
        max-width: 100%;
    }

    form {
        width: 100%;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    p, pre.content-text {
        font-size: 16px;
    }

    input[type="submit"], a.button {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    input.green-button, button.green-button, a.green-button {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    a.red-button {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    a.text-link {
        font-size: 16px;
    }

    .remove-image {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    pre.content-text {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 100%;
        width: auto;
        table-layout: fixed;
    }

    tbody, tr {
        display: table;
        width: 100%;
    }

    th, td {
        width: 120px;
        max-width: 150px;
        padding: 10px;
        font-size: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    table.time-report-table th,
    table.time-report-table td {
        width: 100px;
        max-width: 100px;
        padding: 8px;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    label {
        margin-right: 0;
        margin-bottom: 5px;
    }

    input, select, textarea {
        width: 100%;
        padding: 10px;
    }

    .main-menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .user-actions, .admin-actions, .common-actions {
        flex-direction: column;
        align-items: center;
    }

    .image-preview-item {
        width: 80px;
        height: 80px;
    }

    .buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Mobilmeny bara för #menu-buttons */
    .menu-toggle {
        display: block;
    }

    #menu-buttons {
        display: none; /* Dölj bara dashboard-menyn som standard */
        flex-direction: column;
        gap: 10px;
        background-color: #fff;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
    }

    #menu-buttons.active {
        display: flex; /* Visa bara när .active läggs till */
        animation: slideIn 0.3s ease-in-out;
    }

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