* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", Arial, sans-serif;
    font-size: 16px;
    /* Safari Fix: Prevent text resizing when switching screen orientation */
    -webkit-text-size-adjust: 100%;
}
body {
    background-color: #435165;
    margin: 0;
    padding: 0;
}
.login {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
    margin: 60px auto;
}
.login h1 {
    text-align: center;
    color: #5b6574;
    font-size: 24px;
    padding: 20px 0 20px 0;
    border-bottom: 1px solid #dee0e4;
}
.login form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}
.login form label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #3274d6;
    color: #ffffff;
}
.login form input[type="password"], .login form input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 50px;
    border: 1px solid #dee0e4;
    margin-bottom: 20px;
    padding: 0 15px;
    /* Safari Fix: Removes default iOS inner shadows and rounds */
    -webkit-appearance: none;
    border-radius: 0;
}
.login form input[type="submit"] {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: #3274d6;
    border: 0;
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.2s;
    /* Safari Fix: Forces iOS to use the actual background color instead of native gray button gradients */
    -webkit-appearance: none;
    border-radius: 0;
}
.login form input[type="submit"]:hover {
    background-color: #2868c7;
    transition: background-color 0.2s;
}
.navtop {
    background-color: #2f3947;
    min-height: 60px;
    width: 100%;
    border: 0;
}
.navtop div {
    display: flex;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
    height: 100%;
    padding: 0 20px;
}
.navtop div h1, .navtop div a {
    display: inline-flex;
    align-items: center;
}
.navtop div h1 {
    flex: 1;
    font-size: 24px;
    padding: 0;
    margin: 0;
    color: #eaebed;
    font-weight: normal;
}
.navtop div a {
    padding: 0 20px;
    text-decoration: none;
    color: #c1c4c8;
    font-weight: bold;
}
.navtop div a i {
    padding: 2px 8px 0 0;
}
.navtop div a:hover {
    color: #eaebed;
}
body.loggedin {
    background-color: #f3f4f7;
}
.content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.content h2 {
    margin: 0;
    padding: 25px 0;
    font-size: 22px;
    border-bottom: 1px solid #e0e0e3;
    color: #4a536e;
}
.content > p, .content > div {
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
    margin: 25px 0;
    padding: 25px;
    background-color: #fff;
}
.content > p table, .content > div table {
    width: 100%;
}
.content > p table td, .content > div table td {
    padding: 5px;
}
.content > p table td:first-child, .content > div table td:first-child {
    font-weight: bold;
    color: #4a536e;
    padding-right: 15px;
}
.content > div p {
    padding: 5px;
    margin: 0 0 10px 0;
}
.register {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
    margin: 60px auto;
}
.register h1 {
    text-align: center;
    color: #5b6574;
    font-size: 24px;
    padding: 20px 0 20px 0;
    border-bottom: 1px solid #dee0e4;
}
.register form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}
.register form label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #3274d6;
    color: #ffffff;
}
.register form input[type="password"], .register form input[type="text"], .register form input[type="email"] {
    flex: 1;
    min-width: 0;
    height: 50px;
    border: 1px solid #dee0e4;
    margin-bottom: 20px;
    padding: 0 15px;
    /* Safari Fix: Removes default iOS inner shadows and rounds */
    -webkit-appearance: none;
    border-radius: 0;
}
.register form input[type="submit"] {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: #3274d6;
    border: 0;
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.2s;
    /* Safari Fix: Forces iOS to use the actual background color */
    -webkit-appearance: none;
    border-radius: 0;
}
.register form input[type="submit"]:hover {
    background-color: #2868c7;
    transition: background-color 0.2s;
}

/* --- FULL SCREEN MOBILE & SAFARI OVERRIDES --- */
@media screen and (max-width: 768px) {
    /* Safari Form Zoom Fix: iOS forces an annoying page zoom on forms if font size < 16px */
    .login form input[type="password"], 
    .login form input[type="text"],
    .register form input[type="password"], 
    .register form input[type="text"], 
    .register form input[type="email"] {
        font-size: 16px !important; 
    }

    /* Force the forms to take up the full screen real estate */
    .login, .register {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: calc(100vh - 60px); /* Stretches card to fill the viewport height below navbar */
        box-shadow: none;
    }
    
    /* Makes background color match form block color for seamless edge-to-edge look */
    body {
        background-color: #ffffff;
    }
    body.loggedin {
        background-color: #f3f4f7;
    }

    .navtop {
        height: auto;
        padding: 10px 0;
    }
    .navtop div {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .navtop div a {
        padding: 5px 10px;
    }
    .content {
        padding: 0 10px;
    }
    .content > p table td, .content > div table td {
        display: block;
        width: 100%;
        padding: 4px 0;
    }
    .content > p table td:first-child, .content > div table td:first-child {
        padding-right: 0;
        margin-top: 10px;
    }
}
