@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary-blue: #7CB9E8; --card-bg: rgba(255, 255, 255, 0.95); --text-primary: #2D3748; --shadow: 0 20px 60px rgba(124, 185, 232, 0.15); }

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; background: url('/assets/back.png') center center / cover no-repeat fixed; background-color: #E8F4F8; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow-x: hidden; }

.background-circles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.circle { position: absolute; border-radius: 50%; animation: float 20s infinite ease-in-out; }
.circle-1 { width: 120px; height: 120px; top: 10%; left: 8%; background: rgba(124, 185, 232, 0.1); }
.circle-2 { width: 60px; height: 60px; top: 60%; left: 15%; animation-delay: 2s; background: rgba(124, 185, 232, 0.08); }
.circle-3 { width: 80px; height: 80px; top: 20%; right: 10%; animation-delay: 4s; background: rgba(124, 185, 232, 0.12); }
.circle-4 { width: 100px; height: 100px; bottom: 15%; right: 15%; animation-delay: 1s; background: rgba(124, 185, 232, 0.09); }

@keyframes float { 0%, 100% { transform: translateY(0) translateX(0); } 25% { transform: translateY(-20px) translateX(10px); } 50% { transform: translateY(-10px) translateX(-10px); } 75% { transform: translateY(-30px) translateX(5px); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.container { width: 100%; max-width: 600px; position: relative; z-index: 1; }
.card { background: var(--card-bg); backdrop-filter: blur(20px); border-radius: 32px; padding: 60px 50px; box-shadow: var(--shadow); text-align: center; }
/* Logo above the card — same layout as welcome.css's .page-stack. */
.page-stack { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; z-index: 1; }
.page-logo { display: flex; animation: slideDown 0.6s ease; }
.page-logo img { display: block; width: min(148px, 60vw); height: auto; filter: drop-shadow(0 4px 12px rgba(124, 185, 232, 0.3)); }
.title { font-family: 'Montserrat', sans-serif; font-size: 38px; font-weight: 600; color: #334269; margin-bottom: 40px; letter-spacing: -1px; line-height: 1.1; animation: slideDown 0.6s ease 0.1s both; }
.login-form { display: flex; flex-direction: column; gap: 16px; animation: slideDown 0.6s ease 0.2s both; }
.admin-input { width: 100%; padding: 20px 28px; border: none; border-radius: 20px; font-size: 16px; color: var(--text-primary); background: #F8FAFF; transition: all 0.3s ease; outline: none; text-align: left; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.admin-input::placeholder { color: #A0ABC0; }
.admin-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(124, 185, 232, 0.2), 0 4px 12px rgba(0,0,0,0.05); }
.submit-button { margin-top: 10px; padding: 18px; border: none; border-radius: 16px; background: var(--primary-blue); color: white; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.submit-button:hover { background: #5da8e2; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(124, 185, 232, 0.3); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.error-message { color: #E53E3E; font-size: 0.85rem; margin-top: -8px; margin-bottom: 8px; display: none; text-align: left; padding-left: 20px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) { .card { padding: 40px 24px; } .page-stack { gap: 16px; } .page-logo img { width: min(128px, 50vw); } .title { font-size: 28px; } .admin-input { padding: 16px 20px; } }

/* Reduced motion: people who turn motion down in their OS get instant state
   changes instead of slides, springs and the endlessly floating circles. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
