* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f2e6ca;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    color: #2e442e;
}

.login-container {
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.login-box {
    background: transparent;
    border: 2px solid #2e442e;
    border-radius: 20px;
    box-shadow: none;
    padding: 30px 20px;
    animation: slideUp 0.5s ease-out;
    max-height: 100%;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.login-header h1 {
    font-size: 1.75em;
    color: #2e442e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-header h1 .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.login-header p {
    color: #2e442e;
    font-size: 0.85em;
    margin: 0;
    opacity: 0.8;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2e442e;
    font-size: 0.9em;
}

.form-group input {
    padding: 12px;
    border: 2px solid #2e442e;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    font-family: inherit;
    background: #f2e6ca;
    color: #2e442e;
}

.form-group input:focus {
    outline: none;
    border-color: #2e442e;
    box-shadow: 0 0 0 3px rgba(46, 68, 46, 0.1);
}

.form-group input::placeholder {
    color: rgba(46, 68, 46, 0.5);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid #f44336;
    color: #f44336;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: center;
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.btn-primary {
    background: #2e442e;
    color: #f2e6ca;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 68, 46, 0.4);
    background: #3a5a3a;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reset-password-link {
    text-align: center;
    margin-top: 12px;
    flex-shrink: 0;
}

.reset-password-link a {
    color: #2e442e;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.reset-password-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

.btn-secondary {
    background: #f2e6ca;
    color: #2e442e;
    border: 2px solid #2e442e;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 68, 46, 0.2);
    background: #e8d9b8;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-reset-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(46, 68, 46, 0.2);
    flex-shrink: 0;
    animation: slideDown 0.3s ease-out;
}

.reset-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.reset-input-group {
    flex: 1;
    margin-bottom: 0;
}

.reset-submit-btn {
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0;
    height: fit-content;
    padding-top: 12px;
    padding-bottom: 12px;
}

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

.success-message {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4caf50;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: center;
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .login-box {
        padding: 20px 15px;
    }
    
    .login-header {
        margin-bottom: 15px;
    }
    
    .login-header h1 {
        font-size: 1.4em;
    }
    
    .login-header h1 .icon {
        width: 20px;
        height: 20px;
    }
    
    .login-form {
        gap: 14px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 0.95em;
    }
    
    .btn {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .reset-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reset-submit-btn {
        width: 100%;
    }
}

@media (max-height: 700px) {
    .login-box {
        padding: 20px;
    }
    
    .login-header {
        margin-bottom: 15px;
    }
    
    .login-header h1 {
        font-size: 1.5em;
    }
    
    .login-header h1 .icon {
        width: 20px;
        height: 20px;
    }
    
    .login-form {
        gap: 12px;
    }
    
    .form-group input {
        padding: 10px;
    }
    
    .btn {
        padding: 10px;
    }
}

@media (max-height: 600px) {
    .login-box {
        padding: 15px;
    }
    
    .login-header {
        margin-bottom: 10px;
    }
    
    .login-header h1 {
        font-size: 1.3em;
        margin-bottom: 5px;
    }
    
    .login-header h1 .icon {
        width: 18px;
        height: 18px;
    }
    
    .login-header p {
        font-size: 0.8em;
    }
    
    .login-form {
        gap: 10px;
    }
    
    .form-group {
        gap: 6px;
    }
    
    .form-group label {
        font-size: 0.85em;
    }
    
    .form-group input {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .btn {
        padding: 8px;
        font-size: 0.85em;
    }
}

