main.oppilas-tiedot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}


main.oppilas-tiedot section {
    width: 100%;
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


main.oppilas-tiedot h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}


main.oppilas-tiedot table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

main.oppilas-tiedot table th,
main.oppilas-tiedot table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #444;
    color: #f1f1f1;
}

main.oppilas-tiedot table th {
    width: 35%;
    font-weight: bold;
    background-color: #3a3a3a;
}

main.oppilas-tiedot table tr:last-child td {
    border-bottom: none;
}


main.oppilas-tiedot table + .actions {
    display: flex;
    justify-content: flex-start; 
    gap: 0.5rem;
    margin-top: 1rem;
}


main.oppilas-tiedot .actions a.toggle,
main.oppilas-tiedot .actions a.button-delete {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 5px;
    display: inline-block;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}


main.oppilas-tiedot .actions a.toggle {
    background-color: #00ff15;
    color: #fff;
}

main.oppilas-tiedot .actions a.toggle:hover {
    background-color: #3aff4e;
}


main.oppilas-tiedot .actions a.button-delete {
    background-color: #ff4c4c;
    color: #fff;
}

main.oppilas-tiedot .actions a.button-delete:hover {
    background-color: #e04343;
}


@media (max-width: 700px) {
    main.oppilas-tiedot {
        padding: 1rem;
        max-width: 100%;
    }

    main.oppilas-tiedot table th,
    main.oppilas-tiedot table td {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    main.oppilas-tiedot h2 {
        font-size: 1.3rem;
    }

    main.oppilas-tiedot table + .actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

main.oppilas-tiedot a.toggle.back-button {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 5px;
    background-color: #3a8ef6;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 1rem; 
}

main.oppilas-tiedot a.toggle.back-button:hover {
    background-color: #2d6ed6;
}


@media (max-width: 700px) {
    main.oppilas-tiedot a.toggle.back-button {
        width: 100%;
        text-align: center;
    }
}