﻿/* Login Page Styles for CAPSIG RESTServer */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    background: #5B3427;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-box {
    position: relative;
    overflow: hidden;
    background: #eeeae9;
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* DNA helix watermark bleeding off the frame's top-right corner, drawn by an
   inline svg in the page itself (teal, like the frame bands) so it needs no
   brand asset. The class name keeps the slot the frame has always used. */
.dna-motif {
    position: absolute;
    top: -55px;
    right: -55px;
    width: 180px;
    opacity: 0.18;
    pointer-events: none;
}

/* Frame body holds the original login content */
.frame-body {
    padding: 35px 40px 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

    /* inline-block + an absolutely positioned brand mark: the words stay
       centred on the card exactly where they were, and the app's own mark
       hangs immediately to their left. */
    .login-header h1 {
        font-size: 28px;
        color: #1a1a2e;
        font-weight: 900;
        font-family: 'Inter', sans-serif;
        position: relative;
        display: inline-block;
    }

    .login-header h1 .title-mark {
        position: absolute;
        right: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        height: 1em;
        width: auto;
    }

    .login-header .subtitle {
        color: #666;
        font-size: 14px;
        margin-top: 5px;
        font-family: 'Inter', sans-serif;
    }

    .login-header .icon {
        font-size: 48px;
        margin-bottom: 10px;
        display: block;
        line-height: 0;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        margin-bottom: 6px;
        font-family: 'Inter', sans-serif;
    }

    .form-group input, .form-group select {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 0;
        font-size: 16px;
        transition: all 0.3s ease;
        background: #ffffff;
        font-family: 'Inter', sans-serif;
    }

        .form-group input:focus {
            outline: none;
            border-color: #0f3460;
            box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
            background: white;
        }

    /* Company dropdown keeps its own warm tint */
    .form-group select {
        background: #ded6d3;
    }

    /* Browser autofill repaints filled boxes - keep them white */
    .form-group input:-webkit-autofill,
    .form-group input:-webkit-autofill:hover,
    .form-group input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
        -webkit-text-fill-color: #333;
        caret-color: #333;
    }

.btn-login {
    width: 100%;
    padding: 14px;
    background: #5B3427;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(91, 52, 39, 0.35);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border: 1px solid #fecaca;
    font-family: 'Inter', sans-serif;
}

    .error-message.show {
        display: block;
    }

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border: 1px solid #a7f3d0;
    font-family: 'Inter', sans-serif;
}

    .success-message.show {
        display: block;
    }

.redirect-notice {
    background: #fef3c7;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border: 1px solid #fcd34d;
    font-family: 'Inter', sans-serif;
}

    .redirect-notice.show {
        display: block;
    }

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .frame-body {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 22px;
    }
}
