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

input, select, button {
    font-family: inherit;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
    min-height: 42px;
}

.btn-logout {
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #b31237; /* red */
    color: #fff;
    border: 2px solid #b31237;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500; /* não negrito */
    letter-spacing: .6px;
    box-shadow: 0 4px 16px rgba(179, 18, 55, 0.35);
    margin-left: auto; /* fixa na direita */
}

.btn-logout svg { fill: currentColor; }

.btn-logout:hover {
    background: #8f0f2c;
    border-color: #8f0f2c;
    box-shadow: 0 6px 18px rgba(179, 18, 55, 0.5);
}

h1 {
    text-align: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Center title specifically inside header row */
.header-row h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0; /* override global margin */
    width: max-content;
}


.select-container {
    background: #1c1c1c;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.select-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #a0a0a0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.select-container select {
    width: 100%;
    padding: 10px 50px 10px 20px;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    font-size: 15px;
    background: #0f0f0f;
    color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    height: 46px;
    line-height: 1.5;
}

.select-container select:hover {
    border-color: #3a3a3a;
    background: #141414;
    background-position: right 20px center; /* fixa a posição do ícone */
}

/* Garante que o ícone nunca se mova em nenhum estado */
.select-container select,
.select-container select:hover,
.select-container select:focus,
.select-container select:active {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-position: right 20px center !important;
    background-repeat: no-repeat !important;
}

.select-container select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #141414;
}

.select-container select option {
    background-color: #1a1a1a;
    color: #fff;
    padding: 12px;
}

.product-options {
    margin-top: 24px;
    display: none;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    height: 50px;
    line-height: 1.5;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

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

.product-data {
    margin-top: 24px;
    padding: 0;
    background-color: transparent;
    border-radius: 8px;
    display: none;
}

.product-data h3 {
    margin-top: 0;
    color: #fff;
    font-size: 18px;
}

.product-data pre {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Edit Header */
.edit-header {
    margin-bottom: 32px;
    padding: 24px 0;
    border-bottom: 1px solid #2a2a2a;
}

.edit-header h2 {
    color: #fff;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* Prize List */
.prize-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 2-col grid for prize quotas (optional) */
.prize-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .prize-grid {
        grid-template-columns: 1fr;
    }
}

/* 2-col grid specifically for roulette cards */
.roulette-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .roulette-grid {
        grid-template-columns: 1fr;
    }
}

.prize-card {
    background: #1c1c1c;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2a2a2a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prize-card:hover {
    border-color: #3a3a3a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.prize-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

.prize-number-award {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    max-width: 100%;
}

/* Single field layout (used in roulette value) */
.prize-number-award.roulette-single {
    grid-template-columns: 1fr;
}

.input-field {
    background-color: #0f0f0f;
    border: 2px solid #2a2a2a;
    color: #fff;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    height: 42px;
    line-height: 38px;
    box-sizing: border-box;
    width: 100%;
}

.input-field:hover:not(:disabled) {
    border-color: #3a3a3a;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background-color: #141414;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #0a0a0a;
    border-color: #222;
}

.input-field::placeholder {
    color: #666;
    opacity: 1;
}

.input-field:disabled::placeholder {
    color: #555;
}

/* Remove spinner de inputs number */
.input-field[type="number"]::-webkit-outer-spin-button,
.input-field[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-field[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    flex-shrink: 0;
    height: 42px;
}

.toggle-label {
    color: #888;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a4a4a;
    transition: .3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #e91e63;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-status {
    color: #ccc;
    font-weight: 600;
    font-size: 13px;
    min-width: 30px;
}

/* Winner Section */
.winner-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.winner-section.collapsed {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding-top: 0;
    border-top: 0;
    margin-top: 0;
    overflow: hidden;
}

.winner-field {
    flex: 1;
}

.winner-id-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.winner-id-label {
    color: #a0a0a0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.winner-id-field {
    width: 100px;
}

/* Footer Buttons */
.footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #2a2a2a;
}

.btn-footer {
    padding: 12px 32px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 46px;
    line-height: 1.5;
}

.btn-cancel-footer {
    background-color: #0f0f0f;
    color: #888;
    border: 2px solid #2a2a2a;
}

.btn-cancel-footer:hover {
    background-color: #1a1a1a;
    color: #ccc;
    border-color: #3a3a3a;
}

.btn-save-footer {
    background-color: #e91e63;
    color: white;
    border: 2px solid #e91e63;
}

.btn-save-footer:hover {
    background-color: #d81558;
    border-color: #d81558;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.5);
    transform: translateY(-2px);
}

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

@media (max-width: 1024px) {
    .prize-top-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .prize-number-award {
        width: 100%;
    }
    
    .toggle-group {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .select-container {
        padding: 24px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        padding: 16px 24px;
    }
    
    .prize-card {
        padding: 20px;
    }
    
    .prize-top-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .prize-number-award {
        flex-direction: row;
        gap: 8px;
        max-width: 100%;
    }
    
    .toggle-group {
        justify-content: space-between;
        width: 100%;
    }
    
    .winner-section {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .winner-id-group {
        width: 100%;
        justify-content: flex-start;
    }
    
    .winner-id-field {
        flex: 1;
    }
    
    .footer-buttons {
        gap: 12px;
    }
    
    .btn-footer {
        flex: 1;
        padding: 14px 20px;
    }
}
