/* Material Design Login Form - Adapted for Hisaban */

.auth-page {
    background: url('login_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 48px 40px 36px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.login-card:hover {
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.material-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.material-logo img {
    max-width: 100px;
    height: auto;
}

.login-header h2 {
    color: #212121;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.15px;
}

.login-header p {
    color: #757575;
    font-size: 14px;
    font-weight: 400;
}

/* Material Form Groups */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-wrapper input {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #e0e0e0 !important;
    border-radius: 0 !important;
    padding: 16px 0 8px !important;
    color: #212121 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    outline: none !important;
    position: relative !important;
    z-index: 3 !important;
    box-shadow: none !important;
}

.input-wrapper input:focus {
    border-bottom-color: #1976d2;
}

.input-wrapper input:focus + label,
.input-wrapper input:valid + label,
.input-wrapper input.has-value + label {
    transform: translateY(-24px) scale(0.75);
    color: #1976d2;
    font-weight: 500;
}

.input-wrapper label {
    position: absolute;
    left: 0;
    top: 16px;
    color: #757575;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.2s ease;
    pointer-events: none;
    transform-origin: left top;
    z-index: 4;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1976d2;
    transition: width 0.2s ease;
    z-index: 5;
}

.input-wrapper input:focus ~ .input-line {
    width: 100%;
}

/* Material Ripple Effects */
.ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.2);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #757575;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1976d2;
}

.toggle-ripple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

.toggle-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23757575' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.2s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.password-toggle:hover .toggle-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231976d2' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
}

.toggle-icon.show-password {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23757575' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 11-4.243-4.243m4.242 4.242L9.88 9.88'/%3e%3c/svg%3e");
}

.password-toggle:hover .toggle-icon.show-password {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231976d2' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 11-4.243-4.243m4.242 4.242L9.88 9.88'/%3e%3c/svg%3e");
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    color: #424242;
    font-size: 14px;
    font-weight: 400;
}

.checkbox-material {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #757575;
    border-radius: 2px;
    transition: all 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-label .checkbox-material {
    background: #1976d2;
    border-color: #1976d2;
}

.checkbox-ripple {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    overflow: hidden;
}

.checkbox-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    fill: white;
    opacity: 0;
    transition: all 0.2s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-label .checkbox-icon {
    opacity: 1;
}

.checkbox-path {
    stroke-dasharray: 16;
    stroke-dashoffset: 16;
    transition: stroke-dashoffset 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-label .checkbox-path {
    stroke-dashoffset: 0;
}

/* Material Button */
.material-btn {
    width: 100% !important;
    background: #1976d2 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 24px !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    margin-bottom: 24px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.25px !important;
    min-height: 48px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.material-btn:hover {
    background: #1565c0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px) !important;
}

.material-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.btn-text {
    position: relative;
    z-index: 1;
    transition: opacity 0.2s ease;
}

/* Error States */
.error-message {
    color: #d32f2f;
    font-size: 12px;
    font-weight: 400;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    display: block;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .input-wrapper input {
    border-bottom-color: #d32f2f;
    color: #d32f2f;
}

.form-group.error .input-wrapper label {
    color: #d32f2f;
}

.form-group.error .input-line {
    background: #d32f2f;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 24px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
