/**
 * SioreX - Estilos da Tela de Login
 * Estilo Metálico Industrial
 */

/* ============================================================
   TELA DE LOGIN - Estilo Metálico Industrial
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;

    /* Chapa metálica envelhecida com oxidação */
    background:
        /* Textura de ruído/grão metálico */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"),
        /* Manchas de oxidação cobre/ferrugem - canto superior esquerdo */
        radial-gradient(ellipse 60% 50% at 10% 15%,
            rgba(168, 101, 64, 0.25) 0%,
            rgba(140, 62, 28, 0.15) 30%,
            transparent 70%
        ),
        /* Manchas de oxidação - canto inferior direito */
        radial-gradient(ellipse 50% 60% at 85% 80%,
            rgba(140, 62, 28, 0.2) 0%,
            rgba(112, 60, 36, 0.12) 40%,
            transparent 70%
        ),
        /* Reflexo metálico prateado - diagonal */
        radial-gradient(ellipse 80% 40% at 70% 30%,
            rgba(200, 200, 200, 0.08) 0%,
            rgba(160, 160, 160, 0.04) 40%,
            transparent 70%
        ),
        /* Mancha escura de desgaste - centro inferior */
        radial-gradient(ellipse 70% 40% at 40% 90%,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 80%
        ),
        /* Brilho sutil no topo */
        linear-gradient(180deg,
            rgba(80, 80, 80, 0.4) 0%,
            transparent 20%
        ),
        /* Escurecimento nas bordas (vinheta) */
        radial-gradient(ellipse 100% 100% at 50% 50%,
            transparent 40%,
            rgba(0, 0, 0, 0.4) 100%
        ),
        /* Gradiente base - metal cinza escuro */
        linear-gradient(160deg,
            #3a3a3a 0%,
            #2a2a2a 20%,
            #1e1e1e 40%,
            #252525 60%,
            #1a1a1a 80%,
            #151515 100%
        );

    /* Sombra interna para profundidade */
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.5),
        inset 0 0 200px rgba(0, 0, 0, 0.3);
}

/* Textura escovada e arranhões sutis */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Arranhões sutis diagonais */
        repeating-linear-gradient(
            35deg,
            transparent,
            transparent 100px,
            rgba(0, 0, 0, 0.08) 100px,
            rgba(0, 0, 0, 0.12) 100.5px,
            transparent 101px
        ),
        repeating-linear-gradient(
            -20deg,
            transparent,
            transparent 150px,
            rgba(255, 255, 255, 0.02) 150px,
            rgba(255, 255, 255, 0.03) 150.5px,
            transparent 151px
        ),
        /* Textura escovada horizontal */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.008) 2px,
            rgba(255, 255, 255, 0.008) 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Manchas de oxidação */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Mancha cobre superior direita */
        radial-gradient(ellipse 40% 35% at 90% 10%,
            rgba(192, 106, 60, 0.15) 0%,
            rgba(168, 82, 40, 0.08) 50%,
            transparent 80%
        ),
        /* Mancha cobre inferior esquerda */
        radial-gradient(ellipse 35% 30% at 8% 85%,
            rgba(168, 101, 64, 0.12) 0%,
            rgba(140, 62, 28, 0.06) 50%,
            transparent 80%
        ),
        /* Mancha oxidação esverdeada (pátina) sutil */
        radial-gradient(ellipse 25% 20% at 5% 40%,
            rgba(70, 90, 70, 0.08) 0%,
            rgba(50, 70, 50, 0.04) 50%,
            transparent 80%
        ),
        /* Reflexo metálico central */
        radial-gradient(ellipse 60% 30% at 50% 50%,
            rgba(150, 150, 150, 0.03) 0%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 0;
}

/* Texto SIOREX gravado no metal - marca d'água superior esquerda */
.login-container .login-card::before {
    content: 'SIOREX';
    position: fixed;
    top: 5%;
    left: 1%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 180px;
    font-weight: 800;
    letter-spacing: 18px;
    transform: rotate(-10deg);

    /* Mesma cor do fundo - invisível exceto pelas sombras */
    color: #252525;

    /* Efeito de gravação profunda - só sombras criam a ilusão */
    text-shadow:
        /* Luz na borda superior (borda iluminada do sulco) */
        0 -1px 0 rgba(80, 80, 80, 0.6),
        0 -2px 1px rgba(100, 100, 100, 0.4),
        /* Sombra profunda embaixo (fundo do sulco) */
        0 2px 1px rgba(0, 0, 0, 0.8),
        0 3px 2px rgba(0, 0, 0, 0.6),
        0 4px 4px rgba(0, 0, 0, 0.4),
        /* Profundidade lateral */
        1px 1px 1px rgba(0, 0, 0, 0.5),
        -1px -1px 0 rgba(60, 60, 60, 0.3);

    pointer-events: none;
    z-index: 0;
}

/* Texto SIOREX gravado - canto inferior direito */
.login-container .login-card::after {
    content: 'SIOREX';
    position: fixed;
    bottom: 2%;
    right: -8%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 160px;
    font-weight: 800;
    letter-spacing: 15px;
    transform: rotate(15deg);

    /* Mesma cor do fundo */
    color: #222222;

    /* Efeito de gravação profunda */
    text-shadow:
        0 -1px 0 rgba(70, 70, 70, 0.5),
        0 -2px 1px rgba(90, 90, 90, 0.35),
        0 2px 1px rgba(0, 0, 0, 0.7),
        0 3px 2px rgba(0, 0, 0, 0.5),
        0 4px 3px rgba(0, 0, 0, 0.35),
        1px 1px 1px rgba(0, 0, 0, 0.4),
        -1px -1px 0 rgba(55, 55, 55, 0.25);

    pointer-events: none;
    z-index: 0;
}

/* Terceiro texto SIOREX - centro direita (usando subtitle como base) */
.login-container .login-subtitle::before {
    content: 'SIOREX';
    position: fixed;
    top: 40%;
    right: -12%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 140px;
    font-weight: 800;
    letter-spacing: 12px;
    transform: rotate(90deg);
    color: #232323;
    text-shadow:
        0 -1px 0 rgba(75, 75, 75, 0.5),
        0 -2px 1px rgba(95, 95, 95, 0.3),
        0 2px 1px rgba(0, 0, 0, 0.7),
        0 3px 2px rgba(0, 0, 0, 0.5),
        1px 1px 1px rgba(0, 0, 0, 0.4),
        -1px -1px 0 rgba(50, 50, 50, 0.2);
    pointer-events: none;
    z-index: 0;
}

/* Quarto texto SIOREX - esquerda vertical */
.login-container .login-subtitle::after {
    content: 'SIOREX';
    position: fixed;
    top: 35%;
    left: -10%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 120px;
    font-weight: 800;
    letter-spacing: 10px;
    transform: rotate(-90deg);
    color: #242424;
    text-shadow:
        0 -1px 0 rgba(72, 72, 72, 0.45),
        0 -2px 1px rgba(88, 88, 88, 0.28),
        0 2px 1px rgba(0, 0, 0, 0.65),
        0 3px 2px rgba(0, 0, 0, 0.45),
        1px 1px 1px rgba(0, 0, 0, 0.35),
        -1px -1px 0 rgba(48, 48, 48, 0.18);
    pointer-events: none;
    z-index: 0;
}

/* Card de login - acima dos efeitos de fundo */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    width: 200px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

/* ============================================================
   LOGIN COM IMAGEM DE FUNDO (CHAPA METÁLICA)
   ============================================================ */
.login-with-plate {
    background: url('../../../../web/img/metal_plate.png') center center / cover no-repeat !important;
    box-shadow: none !important;
}

/* Remove texturas e efeitos quando usa imagem de fundo */
.login-with-plate::before,
.login-with-plate::after {
    display: none !important;
}

/* Remove os textos SIOREX gravados */
.login-with-plate .login-card::before,
.login-with-plate .login-card::after,
.login-with-plate .login-subtitle::before,
.login-with-plate .login-subtitle::after {
    display: none !important;
}

/* Subtítulo sobre imagem de fundo */
.login-with-plate .login-subtitle {
    color: #d4c4b0;
    background: none;
    -webkit-text-fill-color: #d4c4b0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-size: 16px;
    letter-spacing: 4px;
}

/* Card do formulário sobre imagem de fundo */
.login-with-plate .login-form-card {
    background: rgba(30, 25, 20, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(160, 140, 110, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Labels e textos sobre imagem de fundo - Estilo metálico brilhante */
.login-with-plate .login-form .form-label {
    /* Texto metálico prateado brilhante */
    background: linear-gradient(180deg,
        #f0f0f0 0%,
        #d0d0d0 25%,
        #ffffff 50%,
        #b0b0b0 75%,
        #d8d8d8 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
    font-weight: 700;
    letter-spacing: 1.5px;
}

.login-with-plate .login-remember {
    /* Texto metálico prateado */
    background: linear-gradient(180deg,
        #e0e0e0 0%,
        #c0c0c0 30%,
        #e8e8e8 50%,
        #a8a8a8 70%,
        #c8c8c8 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

.login-with-plate .login-remember input[type="checkbox"] {
    accent-color: var(--copper-400);
}

.login-with-plate .login-version {
    /* Texto metálico mais sutil */
    background: linear-gradient(180deg,
        #c0c0c0 0%,
        #a0a0a0 30%,
        #d0d0d0 50%,
        #909090 70%,
        #b0b0b0 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.5));
    margin-top: 20px;
    margin-bottom: 0;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
}

/* Inputs sobre imagem de fundo - Estilo metálico escuro */
.login-with-plate .login-form .form-control {
    background: rgba(15, 12, 10, 0.75);
    border: 1px solid rgba(180, 160, 140, 0.25);
    color: #f0ece8;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.5),
        inset 0 -1px 0 rgba(255,255,255,0.03);
}

.login-with-plate .login-form .form-control::placeholder {
    color: rgba(180, 170, 160, 0.6);
}

.login-with-plate .login-form .form-control:focus {
    border-color: var(--copper-400);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.4),
        0 0 0 2px rgba(192, 106, 60, 0.4);
}

.login-with-plate .login-form .form-control:hover:not(:focus) {
    border-color: rgba(200, 180, 160, 0.5);
}

.login-subtitle {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;

    /* Texto metálico prateado */
    background: linear-gradient(180deg,
        #e8e8e8 0%,
        #c0c0c0 25%,
        #f5f5f5 50%,
        #a0a0a0 75%,
        #c8c8c8 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

/* Card do formulário - Estilo metálico prateado igual ao sidebar-menu */
.login-form-card {
    position: relative;
    border-radius: 8px;
    padding: 30px 25px;

    /* Gradiente metálico prateado */
    background:
        /* Luz central (brilho suave no topo) */
        radial-gradient(ellipse 100% 40% at 50% 0%,
            rgba(255,255,255,0.3) 0%,
            transparent 60%
        ),
        /* Gradiente metálico prateado */
        linear-gradient(180deg,
            #e8e8e8 0%,
            #c0c0c0 25%,
            #f5f5f5 50%,
            #a0a0a0 75%,
            #c8c8c8 100%
        );

    /* Bordas metálicas */
    border: 2px solid;
    border-color: rgba(255,255,255,0.5) rgba(0,0,0,0.3) rgba(0,0,0,0.35) rgba(255,255,255,0.4);

    /* Sombras */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.2),
        0 10px 40px rgba(0,0,0,0.6);
}

/* Parafusos nos 4 cantos */
.login-form-card::before,
.login-form-card::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #909090 0%, #707070 30%, #505050 60%, #404040 100%
    );
    box-shadow: inset 0 -1px 1px rgba(255,255,255,0.4);
    z-index: 10;
}

.login-form-card::before {
    top: 10px;
    left: 10px;
}

.login-form-card::after {
    top: 10px;
    right: 10px;
}

/* Parafusos inferiores via pseudo-elementos do form */
.login-form {
    position: relative;
}

.login-form::before,
.login-form::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #909090 0%, #707070 30%, #505050 60%, #404040 100%
    );
    box-shadow: inset 0 -1px 1px rgba(255,255,255,0.4);
    z-index: 10;
}

.login-form::before {
    bottom: -20px;
    left: -15px;
}

.login-form::after {
    bottom: -20px;
    right: -15px;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 16px;
}

/* Labels - Texto estampado no metal */
.login-form .form-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    display: block;

    /* Cor metálica escura - como texto prensado */
    color: #404040;

    /* Efeito de texto prensado */
    text-shadow:
        0 1px 0 rgba(255,255,255,0.7),
        0 -1px 1px rgba(0,0,0,0.15);
}

/* Inputs - Área rebaixada no metal */
.login-form .form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;

    /* Fundo afundado */
    background:
        linear-gradient(180deg,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,0.08) 50%,
            rgba(255,255,255,0.05) 100%
        );

    /* Borda metálica */
    border: 1px solid #808080;

    /* Texto escuro */
    color: #2a2a2a;

    /* Efeito de sulco */
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -1px 0 rgba(255,255,255,0.3);
}

.login-form .form-control::placeholder {
    color: #707070;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--copper-400);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.2),
        0 0 0 2px rgba(192, 106, 60, 0.3);
}

.login-form .form-control:hover:not(:focus) {
    border-color: #606060;
}

/* Checkbox - Estilo metálico */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;

    /* Texto estampado */
    color: #505050;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.7),
        0 -1px 1px rgba(0,0,0,0.15);
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--copper-500);
}

/* Mensagem de erro */
.login-error {
    background: linear-gradient(180deg, #c45050 0%, #a03030 100%);
    color: #fff;
    border: 1px solid #802020;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.3);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 2px 6px rgba(0,0,0,0.3);
}

.login-error.show {
    display: block;
}

/* Botão ENTRAR - Estilo metálico cobre */
.login-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;

    /* Gradiente metálico cobre */
    background:
        linear-gradient(180deg,
            #C08050 0%,
            #A86840 15%,
            #8C5030 40%,
            #703C24 60%,
            #8C5030 85%,
            #A86840 100%
        );

    /* Borda */
    border: 1px solid #4A2810;

    /* Texto claro */
    color: #F8F0E8;

    /* Texto gravado */
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);

    /* Sombra */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.login-btn:hover {
    background:
        linear-gradient(180deg,
            #D09060 0%,
            #B87850 15%,
            #9C6040 40%,
            #804C34 60%,
            #9C6040 85%,
            #B87850 100%
        );
    color: #FFFFFF;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.5);
}

.login-btn:active {
    background:
        linear-gradient(180deg,
            #703C24 0%,
            #8C5030 25%,
            #A86840 50%,
            #8C5030 75%,
            #703C24 100%
        );
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(1px);
}

/* Versão */
.login-version {
    font-size: 11px;
    margin-top: 24px;
    letter-spacing: 1px;

    /* Texto metálico sutil */
    color: #606060;
    text-shadow: 0 1px 0 rgba(255,255,255,0.1);
}
