/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #ffffff;
    color: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header.top {
    background-color: #2c2421; /* dark brown */
    color: #fff;
    text-align: center;
    padding: 25px 20px 10px 20px;
    position: relative;
    flex-shrink: 0;
}

header.top .header-text h1 {
    font-size: clamp(18px, 3.5vw, 24px);
    margin-bottom: 3px;
    font-weight: 400;
}

header.top .header-text h2 {
    font-size: clamp(13px, 2.5vw, 16px);
    font-weight: 300;
}

header.top img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    object-fit: cover;
}

/* Form container - Fixed height to prevent overflow */
main.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 20px 15px 20px;
    flex-shrink: 0;
    min-height: 0; /* Allow shrinking */
}

form {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 400;
    color: #333;
}

input[type="text"],
input[type="password"],
select {
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: clamp(13px, 2.8vw, 14px);
    width: 100%;
    transition: border-color 0.2s ease;
    background-color: #ffffff;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4285f4;
}

input:hover,
select:hover {
    border-color: #999;
}

a.forgot {
    font-size: clamp(11px, 2.2vw, 12px);
    color: #1a73e8;
    text-decoration: none;
    margin-bottom: 12px;
    display: inline-block;
}

a.forgot:hover {
    text-decoration: underline;
}

button.btn {
    background-color: #2c2421;
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 3px;
    font-size: clamp(13px, 2.8vw, 14px);
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 15px;
}

button.btn:hover:not(.loading) {
    background-color: #3b2b28;
}

button.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}

/* Bottom section with Oracle logo and footer - Always visible */
.bottom-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

section.oracle-logo {
    text-align: right;
    padding: 10px 20px 5px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

section.oracle-logo img {
    width: clamp(70px, 12vw, 100px);
    height: auto;
}

/* Footer */
footer {
    font-size: clamp(10px, 2vw, 12px);
    color: #666;
    text-align: left;
    padding: 5px 20px 10px 20px;
    border-top: 1px solid #e1e5e9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header.top {
        padding: 25px 15px 12px 15px;
    }
    
    main.container {
        padding: 20px 15px 15px 15px;
    }
    
    form {
        max-width: 100%;
        padding: 0;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 12px 14px;
        margin-bottom: 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    button.btn {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    section.oracle-logo {
        padding: 10px 15px 5px 15px;
        justify-content: center;
        text-align: center;
    }
    
    footer {
        text-align: center;
        padding: 5px 15px 12px 15px;
    }
}

@media (max-width: 480px) {
    header.top {
        padding: 20px 10px 10px 10px;
    }
    
    main.container {
        padding: 15px 10px 10px 10px;
    }
    
    form {
        padding: 0;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 14px 12px;
        margin-bottom: 14px;
    }
    
    button.btn {
        padding: 14px 16px;
        margin-bottom: 15px;
    }
    
    section.oracle-logo {
        padding: 8px 10px 4px 10px;
    }
    
    footer {
        padding: 4px 10px 10px 10px;
    }
}

@media (max-width: 360px) {
    header.top {
        padding: 15px 8px 8px 8px;
    }
    
    main.container {
        padding: 12px 8px 8px 8px;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 12px 10px;
        margin-bottom: 12px;
    }
    
    button.btn {
        padding: 12px 14px;
    }
    
    section.oracle-logo {
        padding: 6px 8px 3px 8px;
    }
    
    footer {
        padding: 3px 8px 8px 8px;
    }
}

/* Landscape orientation on mobile and small screens */
@media (max-height: 600px) {
    header.top {
        padding: 15px 20px 8px 20px;
    }
    
    main.container {
        padding: 15px 20px 10px 20px;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 8px 12px;
        margin-bottom: 10px;
    }
    
    button.btn {
        padding: 8px 16px;
        margin-bottom: 10px;
    }
    
    section.oracle-logo {
        padding: 8px 20px 4px 20px;
    }
    
    footer {
        padding: 4px 20px 8px 20px;
    }
}

/* Very small height screens */
@media (max-height: 500px) {
    header.top {
        padding: 10px 20px 5px 20px;
    }
    
    main.container {
        padding: 10px 20px 5px 20px;
    }
    
    input[type="text"],
    input[type="password"],
    select {
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    button.btn {
        padding: 6px 14px;
        margin-bottom: 8px;
    }
    
    section.oracle-logo {
        padding: 5px 20px 2px 20px;
    }
    
    section.oracle-logo img {
        width: clamp(60px, 12vw, 80px);
    }
    
    footer {
        padding: 2px 20px 5px 20px;
    }
}

/* Large desktop screens - prevent form from being too wide */
@media (min-width: 1200px) {
    header.top {
        padding: 30px 20px 12px 20px;
    }
    
    main.container {
        padding: 25px 20px 20px 20px;
    }
    
    section.oracle-logo {
        padding: 12px 20px 6px 20px;
    }
    
    footer {
        padding: 6px 20px 12px 20px;
    }
}