:root {
    /* Brand Colors */
    --color-orange-primary: #F97316;
    --color-blue-accent: #2563EB;

    /* Dark Backgrounds */
    --color-bg-dark: #0F172A;
    --color-bg-card: #1E293B;
    --color-bg-input: #0F172A;
    /* Using darker blue for input bg */

    /* Text */
    --color-text-main: #F8FAFC;
    --color-text-muted: #94A3B8;

    /* UI States */
    --color-border: #334155;
    --color-focus-ring: #2563EB;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    min-height: 100vh;
    padding-top: 5vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 25%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.logo-wrapper {
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.login-card {
    background-color: var(--color-bg-card);
    width: 100%;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.card-header p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-focus-ring);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.forgot-password {
    color: var(--color-blue-accent);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #60A5FA;
}

.login-button {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--color-orange-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    background-color: #EA580C;
    /* Darker orange */
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}



.logo {
    max-height: 50px;
    width: auto;
    display: block;
}

.error-message {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #EF4444;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.hidden {
    display: none !important;
}

.footer {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.secure-badge {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

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

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

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Trust Section */
.trust-section {
    margin-top: 2.5rem;
    text-align: center;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.trust-headline {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.tms-logo {
    height: 32px;
    /* Fixed height for consistency */
    width: auto;
    color: var(--color-text-muted);
    /* Uses currentColor in SVG */
    opacity: 0.5;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.tms-logo:hover {
    opacity: 0.9;
    color: var(--color-text-main);
    transform: translateY(-1px);
}