/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Noto Sans JP', 'Segoe UI', sans-serif;
    background: #f0f2f5;
}

/* ===== Layout: 2-Panel Split ===== */
.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* --- Left Panel --- */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #005a8c 0%, #0077b6 30%, #00b4d8 70%, #48cae4 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

/* SVG背景画像 */
.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/bg-pattern.svg') center center / cover no-repeat;
    opacity: 1;
    animation: bgFloat 30s ease-in-out infinite;
}

/* 光のオーバーレイ */
.login-left::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0,180,216,0.15) 0%, transparent 40%);
    animation: lightShift 15s ease-in-out infinite alternate;
}

@keyframes bgFloat {
    0%, 100% { transform: scale(1) translate(0, 0); }
    25%      { transform: scale(1.02) translate(-1%, 1%); }
    50%      { transform: scale(1.04) translate(0%, -1%); }
    75%      { transform: scale(1.02) translate(1%, 0.5%); }
}

@keyframes lightShift {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
    100% { transform: translate(3%, -3%) rotate(2deg); opacity: 1; }
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
}

.system-icon {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 36px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.system-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.system-subtitle {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 40px;
}

/* Feature List */
.feature-list {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 28px 32px;
    text-align: left;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.feature-item + .feature-item {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-icon.fuel     { background: rgba(255,183,77,0.3); }
.feature-icon.etc      { background: rgba(129,199,132,0.3); }
.feature-icon.ferry    { background: rgba(100,181,246,0.3); }
.feature-icon.insurance { background: rgba(206,147,216,0.3); }

.copyright {
    position: absolute;
    bottom: 24px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
    z-index: 2;
}

/* --- Right Panel --- */
.login-right {
    width: 480px;
    min-width: 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    box-shadow: -4px 0 30px rgba(0,0,0,0.08);
}

.login-form-wrapper {
    width: 100%;
    max-width: 360px;
}

.login-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.login-description {
    font-size: 14px;
    color: #888;
    margin-bottom: 36px;
}

/* Form Elements */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fff;
}

.input-wrapper input::placeholder {
    color: #bbb;
}

.input-wrapper input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #666;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00b4d8;
    cursor: pointer;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 1px;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,119,182,0.3);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,119,182,0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer Text */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #aaa;
    line-height: 1.6;
}

/* Error Message */
.error-message {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

.error-message.show {
    display: flex;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
    }
    .login-left {
        padding: 40px 24px;
        min-height: 300px;
    }
    .login-right {
        width: 100%;
        min-width: unset;
        padding: 40px 24px;
        flex: 1;
    }
    .system-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 30px 20px;
    }
    .feature-list {
        padding: 20px;
    }
}
