html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background: #f4f7f5;
    color: #2e2e2e;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 18px;
}

/* Header */
header {
    display: flex;
    flex-direction: row;
    background: linear-gradient(90deg, #1b8f3c, #2fbf71);
    color: #ffffff;
    padding: 20px;
    font-weight: bold;
    letter-spacing: 3px;
    gap: 20px;
}

header h1 {
    margin: 0;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 8px;
    flex: 1 1;
}

header img {
    height: 70px;
    filter: invert();
}

/* Navigation */
nav {
    background-color: #ffffff;
    box-shadow: rgba(0,0,0,0.08) 0 4px 8px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 10px 20px;
    gap: 15px;
    align-items: center;
    border-bottom: 3px solid #ffc60b;
}

nav ul a {
    text-decoration: none;
    color: #1b8f3c;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

nav ul a:hover {
    background-color: #ffc60b;
    color: #2e2e2e;
}

/* Main */
main {
    flex: 1;
    padding: 20px;
}

/* Content blocks */
div.flex-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

div.flex-container > div {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: rgba(0,0,0,0.06) 0 3px 6px;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 2px solid #d8d8d8;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

#registreerimine_form, #lisati {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    height: 100%;
    width: 300px;
    padding: 10px 40px 20px 40px;
    font-size: 20px;
    background-color: #ffffff;
    box-shadow: rgba(0,0,0,0.1) 0 5px 10px;
    border-bottom: 3px solid #d8d8d8;
    border-top: 3px solid #d8d8d8;
}

#registreerimine_form label {
    display: flex;
    flex-direction: column;
}

#registreerimine_form input, textarea {
    font-family: "Arial", serif;
    font-size: 15px;
    padding-left: 5px;
    resize: none;
}

#registreerimine_form input {
    height: 30px;
}

#lisati {
    font-weight: bold;
    align-items: flex-start;
    padding: 10px 40px 10px 40px;
    border-bottom: 3px solid #ffc60b;
    border-top: 3px solid #ffc60b;
}

#lõpetamine_table {
    border-collapse: collapse;
    width: 80%;
    height: 100%;
    text-align: center;
}

#lõpetamine_table th {
    background: linear-gradient(0deg, #1b8f3c, #2fbf71);
    color: #ffffff;
    font-size: 18px;
    height: 50px;
}

#lõpetamine_table td, th {
    border: rgba(46, 46, 46, 0.2) solid 2px;
    padding: 10px;
}

/* Exam pages tables and action links */
.exam-table {
    border-collapse: collapse;
    width: 90%;
    margin-top: 15px;
    margin-bottom: 30px;
}

.exam-table th {
    background: linear-gradient(0deg, #1b8f3c, #2fbf71);
    color: #ffffff;
    padding: 10px 12px;
}

.exam-table td, .exam-table th {
    border: 1px solid rgba(46, 46, 46, 0.2);
    padding: 10px 12px;
    text-align: left;
}

.exam-table a {
    display: inline-block;
    margin-right: 8px;
    padding: 6px 10px;
    background: #2fbf71;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.exam-table a:hover {
    background: #1b8f3c;
}

.exam-table td .muted {
    color: #777;
    font-style: italic;
}
