:root {
    --dorado: #d4af37;
    --negro: #121212;
    --gris: #f4f4f4;
}

body {
    background-color: #f0f2f5;
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRightFade {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.sidebar {
    height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
    position: fixed;
    width: 260px;
    padding-top: 30px;
    z-index: 1000;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
}

.sidebar h2 {
    color: var(--dorado);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-weight: 800;
    font-size: 1.8rem;
}

.sidebar a {
    display: block;
    padding: 18px 30px;
    color: #bbb;
    text-decoration: none;
    transition: 0.3s;
    font-size: 1.1rem;
    border-left: 4px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dorado);
    border-left-color: var(--dorado);
}

.main-content {
    margin-left: 260px;
    padding: 40px;
}

.user-profile-badge {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.user-profile-badge i {
    font-size: 45px;
    color: var(--dorado);
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.user-profile-badge p {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flash-msg {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border-radius: 10px;
    padding: 15px;
    font-weight: bold;
    animation: slideUpFade 0.4s ease-out;
}

.flash-error {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid #ff4444;
}

.flash-warning {
    background: rgba(255, 193, 7, 0.9);
    color: black;
    border: 1px solid #ffc107;
}

.flash-success {
    background: rgba(40, 167, 69, 0.9);
    border: 1px solid #28a745;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #0a0a0a, #1a1a1a, #2b220d, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.login-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

.login-card {
    background: rgba(20, 20, 20, 0.5);
    padding: 50px 40px;
    border-radius: 20px;
    color: white;
    border: 1px solid rgba(212, 175, 55, 0.3);
    width: 420px;
    backdrop-filter: blur(15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.login-input-group {
    position: relative;
    margin-bottom: 25px;
}

.login-input-group i {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #666;
    transition: 0.3s;
    font-size: 1.2rem;
}

.login-input-group input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: 0.3s;
}

.login-input-group input:focus {
    outline: none;
    border-color: var(--dorado);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.8);
}

.login-input-group input:focus+i {
    color: var(--dorado);
}

.preview-area {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    background-color: #ffffff;
    
    background-image: linear-gradient(#f1f1f1 1px, transparent 1px), linear-gradient(90deg, #f1f1f1 1px, transparent 1px);
    background-size: 20px 20px;
    border: 3px solid #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideRightFade 0.8s ease-out forwards;
    
}

.base-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
    transition: 0.4s ease;
}

.overlay-stamp {
    position: absolute;
    cursor: grab;
    z-index: 10;
    mix-blend-mode: multiply;
    pointer-events: auto;
    border: 2px solid transparent;
    border-radius: 5px;
}

.overlay-stamp.active-stamp {
    border: 2px dashed var(--dorado);
    background: rgba(212, 175, 55, 0.05);
}

.overlay-text {
    position: absolute;
    font-size: 30px;
    font-weight: bold;
    color: #333333;
    font-family: 'Impact', sans-serif;
    cursor: grab;
    z-index: 20;
    white-space: nowrap;
    user-select: none;
    pointer-events: auto;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}

.controls-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    opacity: 0;
    animation: slideUpFade 0.6s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.controls-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.controls-card:nth-child(1) {
    animation-delay: 0.1s;
}

.controls-card:nth-child(2) {
    animation-delay: 0.3s;
}

.controls-card:nth-child(3) {
    animation-delay: 0.5s;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.base-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: 0.3s;
    opacity: 0.6;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.base-option:hover {
    opacity: 1;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.base-option.active {
    border-color: var(--dorado);
    opacity: 1;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

.range-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offcanvas {
    background-color: var(--negro);
    color: white;
    border-left: 2px solid var(--dorado);
}

.btn-warning {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.btn-warning:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4) !important;
}

.btn-warning.btn-animated {
    animation: pulseGlow 2s infinite;
}

.upload-zone {
    border: 2px dashed var(--dorado);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    background: rgba(212, 175, 55, 0.05);
    cursor: pointer;
    transition: 0.3s;
}

.upload-zone:hover {
    background: rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.upload-zone input[type="file"] {
    display: none;
}

.sticker-invertido {
    filter: invert(100%);
    mix-blend-mode: screen;
}

#foto-cliente {
    mix-blend-mode: normal !important;
}

.foto-propia {
    mix-blend-mode: normal !important;
}