﻿/* ============================================================
   STOYCA LOGIN
   Universal Login (WinForms / Razor / Blazor)
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================================
   THEME
   ============================================================ */

body.dark {
    --st-login-bg: #1b1b1c;
    --st-login-panel: #252526;
    --st-login-panel-hover: #2d2d30;
    --st-login-border: #3d3d40;
    --st-login-text: #f3f4f6;
    --st-login-muted: #9ca3af;
    --st-login-input: #1f1f20;
    --st-login-shadow: 0 24px 70px rgba(0,0,0,.45);
}

body.light {
    --st-login-bg: #f5f6f8;
    --st-login-panel: #ffffff;
    --st-login-panel-hover: #f7f7f8;
    --st-login-border: #d7d7d7;
    --st-login-text: #1f2937;
    --st-login-muted: #6b7280;
    --st-login-input: #ffffff;
    --st-login-shadow: 0 18px 50px rgba(0,0,0,.14);
}

/* ============================================================
   PAGE
   ============================================================ */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    background: var(--st-login-bg);
    color: var(--st-login-text);
}

.sam-login-shell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

/* ============================================================
   CARD
   ============================================================ */

.sam-login-card {
    width: 100%;
    max-width: 440px;
    background: var(--st-login-panel);
    border: 1px solid var(--st-login-border);
    border-radius: 16px;
    box-shadow: var(--st-login-shadow);
    padding: 28px;
    animation: samLoginShow .18s ease;
}

@keyframes samLoginShow {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   HEADER
   ============================================================ */

.sam-login-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}


.sam-login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--st-accent, #f59e0b);
    letter-spacing: -.5px;
}

.sam-login-subtitle {
    margin-top: 3px;
    font-size: 13px;
    color: var(--st-login-muted);
}

/* ============================================================
   LOGIN ICON
   ============================================================ */

.sam-login-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(245,158,11,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    overflow: hidden;
}
    .sam-login-icon img {
        width: 35px;
        height: 35px;
        object-fit: contain;
        filter: brightness(0) saturate(100%) invert(67%) sepia(95%) saturate(747%) hue-rotate(358deg) brightness(103%) contrast(104%);
        opacity: .95;
        user-select: none;
        pointer-events: none;
    }

/* ============================================================
   FIELD
   ============================================================ */

.sam-login-field {
    margin-bottom: 18px;
}

    .sam-login-field label {
        display: block;
        margin-bottom: 7px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--st-login-muted);
    }

    /* ============================================================
   INPUT
   ============================================================ */

    .sam-login-field input {
        width: 100%;
        height: 40px;
        border-radius: 8px;
        border: 1px solid var(--st-login-border);
        background: var(--st-login-input);
        color: var(--st-login-text);
        font-size: 14px;
        padding: 0 12px;
        outline: none;
        transition: border-color .18s, box-shadow .18s, background .18s;
    }

        .sam-login-field input:focus {
            border-color: var(--st-accent, #f59e0b);
            box-shadow: 0 0 0 3px rgba(245,158,11,.18);
        }

/* ============================================================
   PASSWORD
   ============================================================ */

.sam-login-password-wrap {
    position: relative;
}

    .sam-login-password-wrap input {
        padding-right: 46px;
    }

.sam-login-eye-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 30px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--st-login-muted);
    border-radius: 6px;
    cursor: pointer;
}

    .sam-login-eye-btn:hover {
        background: var(--st-login-panel-hover);
    }

/* ============================================================
   BUTTONS
   ============================================================ */

.sam-login-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.sam-login-btn {
    flex: 1;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--st-login-border);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

    .sam-login-btn.primary {
        background: linear-gradient(180deg, var(--st-accent, #f59e0b), #d97706);
        border-color: rgba(245,158,11,.65);
        color: #111827;
        height: 42px;
        border-radius: 9px;
    }

        .sam-login-btn.primary:hover {
            background: linear-gradient(180deg, #ffb000, var(--st-accent, #f59e0b));
        }

    .sam-login-btn.secondary {
        background: var(--st-login-panel-hover);
        color: var(--st-login-text);
    }

        .sam-login-btn.secondary:hover {
            border-color: var(--st-accent, #f59e0b);
        }

/* ============================================================
   FOOTER
   ============================================================ */

.sam-login-footer {
    margin-top: 24px;
    opacity: .85;
    text-align: center;
    font-size: 12px;
    color: var(--st-login-muted);
}
/* ============================================================
   OPTIONS
   ============================================================ */

.sam-login-options {
    margin: 4px 0 18px;
}

.sam-login-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--st-login-text);
    font-size: 13px;
    font-weight: 600;
}

    .sam-login-check input {
        accent-color: var(--st-accent, #f59e0b);
    }


/* ============================================================
   ERROR
   ============================================================ */

.sam-login-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.10);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
}


/* ============================================================
   DIVIDER
   ============================================================ */

.sam-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 14px;
    color: var(--st-login-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

    .sam-login-divider::before,
    .sam-login-divider::after {
        content: "";
        height: 1px;
        flex: 1;
        background: var(--st-login-border);
    }

    .sam-login-divider span {
        white-space: nowrap;
    }


/* ============================================================
   EXTERNAL LOGIN
   ============================================================ */

.sam-login-external {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sam-login-btn.secondary:disabled {
    opacity: .65;
    cursor: not-allowed;
}

    .sam-login-btn.secondary:disabled:hover {
        border-color: var(--st-login-border);
    }


/* ============================================================
   BRAND TITLE
   ============================================================ */

.sam-login-title span {
    color: var(--st-accent, #f59e0b);
}

.sam-login-title strong {
    color: var(--st-login-text);
    font-weight: 850;
}

/* ============================================================
   ICON FILTER
   ============================================================ */

body.dark {
    --st-login-icon-filter: brightness(0) saturate(100%) invert(73%) sepia(97%) saturate(742%) hue-rotate(358deg) brightness(102%) contrast(102%);
}

body.light {
    --st-login-icon-filter: none;
}

.sam-access-denied-icon {
    color: #ff4d6d;
    background: rgba(255,77,109,.10);
    border-color: rgba(255,77,109,.28);
    font-size: 27px;
}

    .sam-access-denied-icon span {
        line-height: 1;
    }

.sam-access-text-box {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,77,109,.24);
    background: rgba(255,77,109,.07);
    color: var(--st-login-text);
    font-size: 14px;
    line-height: 1.55;
}

.sam-login-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sam-access-lock {
    display: flex;
    justify-content: center;
    font-size: 28px;
    opacity: .9;
    margin-top: 2px;
}
.sam-access-denied-icon {
    background: rgba(255,77,109,.10);
    border-color: rgba(255,77,109,.28);
}

    .sam-access-denied-icon img {
        width: 35px;
        height: 35px;
        object-fit: contain;
        filter: brightness(0) saturate(100%) invert(49%) sepia(86%) saturate(2270%) hue-rotate(315deg) brightness(102%) contrast(102%);
        opacity: .96;
    }