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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #B8860B 0%, #8B6914 50%, #6B4E1A 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.background-pattern {
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    padding: 40px 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, #B8860B 0%, #8B6914 50%, #6B4E1A 100%);
    color: white;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Dado 3D para tela de login */
.dice-3d-container {
    perspective: 1000px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.dice-3d {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: diceRotate 8s infinite linear;
    transform-origin: center center;
}

.dice-face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #B8860B 0%, #8B6914 50%, #6B4E1A 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 8px;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(184, 134, 11, 0.4);
}

.dice-dot {
    width: 12px;
    height: 12px;
    background: #1a1a1a;
    border-radius: 50%;
    margin: auto;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Configuração dos pontos para cada face */
/* Face 1: 1 ponto no centro */
.dice-front .dice-dot:nth-child(1) { grid-column: 2; grid-row: 2; }

/* Face 2: 2 pontos na diagonal (canto superior esquerdo e inferior direito) */
.dice-back .dice-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-back .dice-dot:nth-child(2) { grid-column: 3; grid-row: 3; }

/* Face 3: 3 pontos na diagonal */
.dice-right .dice-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-right .dice-dot:nth-child(2) { grid-column: 2; grid-row: 2; }
.dice-right .dice-dot:nth-child(3) { grid-column: 3; grid-row: 3; }

/* Face 4: 4 pontos nos cantos */
.dice-left .dice-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-left .dice-dot:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-left .dice-dot:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-left .dice-dot:nth-child(4) { grid-column: 3; grid-row: 3; }

/* Face 5: 5 pontos (4 nos cantos + 1 no centro) */
.dice-top .dice-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-top .dice-dot:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-top .dice-dot:nth-child(3) { grid-column: 2; grid-row: 2; }
.dice-top .dice-dot:nth-child(4) { grid-column: 1; grid-row: 3; }
.dice-top .dice-dot:nth-child(5) { grid-column: 3; grid-row: 3; }

/* Face 6: 6 pontos (2 colunas de 3) */
.dice-bottom .dice-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-bottom .dice-dot:nth-child(2) { grid-column: 1; grid-row: 2; }
.dice-bottom .dice-dot:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-bottom .dice-dot:nth-child(4) { grid-column: 3; grid-row: 1; }
.dice-bottom .dice-dot:nth-child(5) { grid-column: 3; grid-row: 2; }
.dice-bottom .dice-dot:nth-child(6) { grid-column: 3; grid-row: 3; }

/* Posicionamento das faces do cubo 3D */
.dice-front {
    transform: rotateY(0deg) translateZ(40px);
}

.dice-back {
    transform: rotateY(180deg) translateZ(40px);
}

.dice-right {
    transform: rotateY(90deg) translateZ(40px);
}

.dice-left {
    transform: rotateY(-90deg) translateZ(40px);
}

.dice-top {
    transform: rotateX(90deg) translateZ(40px);
}

.dice-bottom {
    transform: rotateX(-90deg) translateZ(40px);
}

/* Animação de rotação 3D */
@keyframes diceRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(90deg) rotateZ(0deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg) rotateZ(90deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(270deg) rotateZ(180deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

/* Hover effect - acelera a rotação */
.dice-3d-container:hover .dice-3d {
    animation-duration: 2s;
}

.logo-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

.login-body {
    padding: 40px;
}

.login-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.login-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.login-form .form-control:focus {
    border-color: #B8860B;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
    outline: none;
}

.login-form .form-control::placeholder {
    color: #999;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #B8860B;
}

.password-toggle:focus {
    outline: none;
    color: #B8860B;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #B8860B;
    border-color: #B8860B;
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.form-check-label {
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #B8860B 0%, #8B6914 50%, #6B4E1A 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.6);
    background: linear-gradient(135deg, #6B4E1A 0%, #8B6914 50%, #B8860B 100%);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.3);
    color: #fff;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #fee;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
}

.login-footer {
    padding: 20px 40px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc3545;
}

.is-invalid {
    border-color: #dc3545;
}

.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }

    .login-header {
        padding: 30px 20px 20px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .login-footer {
        padding: 15px 20px;
    }

    .logo-icon {
        font-size: 48px;
    }

    .logo-title {
        font-size: 24px;
    }

    .dice-3d-container {
        width: 60px;
        height: 60px;
    }

    .dice-3d {
        width: 60px;
        height: 60px;
    }

    .dice-face {
        width: 60px;
        height: 60px;
    }

    .dice-front {
        transform: rotateY(0deg) translateZ(30px);
    }

    .dice-back {
        transform: rotateY(180deg) translateZ(30px);
    }

    .dice-right {
        transform: rotateY(90deg) translateZ(30px);
    }

    .dice-left {
        transform: rotateY(-90deg) translateZ(30px);
    }

    .dice-top {
        transform: rotateX(90deg) translateZ(30px);
    }

    .dice-bottom {
        transform: rotateX(-90deg) translateZ(30px);
    }
}

