/* ===================================
   青葉アグロラ ログインページ
   Advanced Modern Design
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent: #6366f1;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-glass: rgba(255, 255, 255, 0.25);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.3);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

/* ===================================
   Animated Background
   =================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.2) 0%, transparent 40%);
    animation: bgRotate 30s linear infinite;
}

.bg-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(16, 185, 129, 0.4);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.4);
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(236, 72, 153, 0.3);
    bottom: 10%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(0, -100px) scale(1); }
    75% { transform: translate(-50px, -50px) scale(0.9); }
}

/* ===================================
   Main Container - Split Layout
   =================================== */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Panel - Branding */
.login-brand {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: white;
    position: relative;
}

@media (min-width: 1024px) {
    .login-brand { display: flex; }
}

.brand-content {
    max-width: 500px;
    text-align: center;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin: 0 auto 32px;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 25px 50px rgba(16, 185, 129, 0.4); }
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 48px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Right Panel - Form */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .login-form-panel {
        max-width: 600px;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ===================================
   Login Card - Glassmorphism
   =================================== */
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: cardSlideIn 0.6s ease-out;
}

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

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

.login-header-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Mobile Logo (hidden on desktop) */
.login-logo-mobile {
    display: block;
}

@media (min-width: 1024px) {
    .login-logo-mobile { display: none; }
    .login-header h1 { font-size: 24px; }
}

/* ===================================
   Form Styles
   =================================== */
.login-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label iconify-icon {
    font-size: 16px;
    color: var(--primary);
}

.input-wrapper {
    position: relative;
}

.input-with-icon {
    position: relative;
}

.input-with-icon iconify-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #f9fafb;
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    background: #f3f4f6;
}

.form-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input:focus + iconify-icon,
.input-with-icon:focus-within iconify-icon {
    color: var(--primary);
}

/* ===================================
   Button Styles
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-filled {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-filled::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-filled:hover::before {
    left: 100%;
}

.btn-filled:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.btn iconify-icon {
    font-size: 20px;
}

/* ===================================
   Alerts
   =================================== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    text-align: left;
    animation: alertSlideIn 0.3s ease-out;
}

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

.alert iconify-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ===================================
   Footer
   =================================== */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===================================
   Decorative Elements
   =================================== */
.login-decoration {
    position: absolute;
    pointer-events: none;
}

.decoration-circle {
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.decoration-circle-1 {
    top: -100px;
    right: -100px;
    animation: spin 20s linear infinite;
}

.decoration-circle-2 {
    bottom: -80px;
    left: -80px;
    width: 160px;
    height: 160px;
    animation: spin 15s linear infinite reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .login-header-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .form-input {
        padding: 14px 14px 14px 48px;
    }

    .btn {
        padding: 14px 24px;
    }
}
