
/* CSS to draw the Login Page elements */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.mm-toast-root {
    position: fixed;
    top: 0.65em;
    left: 0.65em;
    right: 0.65em;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    pointer-events: none;
    z-index: 1500;
}

.mm-toast {
    align-self: center;
    max-width: min(32em, calc(100vw - 1.3em));
    padding: 0.6em 0.8em;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 20, 35, 0.94);
    color: #ffffff;
    font-size: 0.9em;
    line-height: 1.3;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.mm-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.mm-toast--success {
    border-color: rgba(72, 198, 132, 0.58);
    background: rgba(16, 45, 31, 0.94);
}

.mm-toast--error {
    border-color: rgba(255, 110, 125, 0.62);
    background: rgba(62, 20, 27, 0.95);
}

.mm-toast--warn {
    border-color: rgba(255, 193, 90, 0.62);
    background: rgba(62, 45, 17, 0.95);
}

/* ── Layout ── */

div#App {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0d0d1a;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

/* Ambient glow orbs */
.login-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-glow--top {
    width: 560px;
    height: 560px;
    top: -220px;
    left: -180px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 65%);
}

.login-glow--bottom {
    width: 460px;
    height: 460px;
    bottom: -180px;
    right: -140px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.2) 0%, transparent 65%);
}

/* ── Glass panel ── */

.login-panel {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 3em 2.5em;
    margin: 1em;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Brand ── */

.login-brand {
    text-align: center;
    margin-bottom: 2.5em;
}

.brand-icon {
    width: 54px;
    height: 54px;
    line-height: 54px;
    margin: 0 auto 0.9em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    font-weight: 900;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.45);
    user-select: none;
}

.brand-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.55em;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.brand-tagline {
    margin: 0.4em 0 0;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.875em;
    font-weight: 400;
}

/* ── Error message ── */

.login-message {
    margin-bottom: 1.25em;
    padding: 0.85em 1em;
    background: rgba(211, 47, 47, 0.14);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 8px;
    color: #ff8a80;
    font-size: 0.875em;
    line-height: 1.45;
    display: none;
}

.login-message:not(:empty) {
    display: block;
}

/* ── Floating-label input groups ── */

.input-group {
    position: relative;
    margin-bottom: 1.25em;
}

.login-input {
    width: 100%;
    padding: 1.35em 1em 0.5em;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.login-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.7);
    background: rgba(255, 255, 255, 0.095);
}

.login-input::placeholder {
    color: transparent;
}

.input-label {
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.925em;
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.login-input:focus + .input-label,
.login-input:not(:placeholder-shown) + .input-label {
    top: 0.52em;
    transform: none;
    font-size: 0.7em;
    font-weight: 600;
    color: #8b9ff4;
    letter-spacing: 0.3px;
}

/* ── Sign in button ── */

.login-button {
    width: 100%;
    margin-top: 1.25em;
    padding: 0.9em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.login-button:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(102, 126, 234, 0.5);
}

.login-button:active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.login-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 440px) {
    .login-panel {
        border-radius: 14px;
        padding: 2.5em 1.75em;
    }
}

/* Kindle styles are in manganager.login.kindle.css, loaded server-side when a Kindle UA is detected */
