:root {
    --primary: #0f2a44;
    --primary-light: #1e4b7a;
    --accent: #0f2a44;
    --text: #111827;
    --text-muted: #6b7280;
    --bg-main: #f9fafb;
    --bg-input: #ffffff;
    --border-color: #e5e7eb;
}

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

body {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-main);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    background: #ffffff;
    padding: 3.5rem 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-wrapper {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-wrapper img {
    width: 200px;
}

h2 {
    color: var(--primary);
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 75, 122, 0.1);
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    color: var(--primary);
    background: #ffffff;
    padding: 0 4px;
    font-weight: 500;
}

button {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 42, 68, 0.15);
}

#msg {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    min-height: 1.2rem;
    transition: all 0.3s;
}

#msg.error {
    color: #b91c1c;
    background: #fef2f2;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

#msg.ok {
    color: #047857;
    background: #ecfdf5;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1fae5;
}

/* Loading animation for button */
button.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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