* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

body.theme-pink {
    background: linear-gradient(135deg, #c2185b, #e91e63, #ad1457);
    color: #ffffff;
}

body.theme-dark {
    background: #000000;
    color: #b7ff00;
}

.page {
    min-height: 100vh;
    padding: 24px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    background: #fff;
}

.title {
    text-align: center;
    margin: 0 0 24px 0;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.subtitle {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: bold;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.frontoffice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: 20px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.theme-pink .card {
    background: rgba(255,255,255,0.95);
    color: #333333;
}

.theme-dark .card {
    background: #0f0f0f;
    color: #b7ff00;
    border: 1px solid #2c2c2c;
    box-shadow: 0 0 12px rgba(183, 255, 0, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
}

.select-input,
.textarea-input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
    background: #ffffff;
    color: #333333;
}

.textarea-input {
    min-height: 96px;
    resize: vertical;
}

input[type="file"] {
    cursor: pointer;
}

.file-input {
    padding: 9px 12px;
}

.file-picker {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    color: #ad1457;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.file-picker input {
    display: none;
}

.image-preview {
    min-height: 120px;
    margin-top: 12px;
    border-radius: 12px;
    border: 1px dashed #e2a7bd;
    background: #fff7fb;
    color: #ad1457;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: bold;
}

.image-preview img {
    width: 100%;
    max-height: 190px;
    object-fit: contain;
    display: block;
}

.image-preview.is-empty {
    padding: 16px;
}

.theme-pink input {
    background: #ffffff;
    color: #333;
}

.theme-dark input {
    background: #111111;
    color: #b7ff00;
    border: 1px solid #2f2f2f;
}

button {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-primary {
    background: linear-gradient(135deg, #e91e63, #ad1457);
    color: #fff;
}

.btn-secondary {
    background: #eeeeee;
    color: #333;
}

.btn-danger {
    background: #c62828;
    color: #fff;
}

.theme-dark .btn-primary {
    background: #b7ff00;
    color: #111;
}

.theme-dark .btn-secondary {
    background: #1a1a1a;
    color: #b7ff00;
    border: 1px solid #2f2f2f;
}

.theme-dark .btn-danger {
    background: #ff1744;
    color: #fff;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.front-payments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-option {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #f7f7f7;
    color: #333;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.payment-option:hover {
    opacity: 1;
}

.payment-option.is-selected {
    border-color: #e91e63;
    background: linear-gradient(135deg, #fff3f8, #ffffff);
    color: #ad1457;
    box-shadow: 0 8px 18px rgba(233,30,99,0.18);
}

.payment-icon {
    display: inline-flex;
    width: 38px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    color: #ad1457;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.theme-dark .payment-option {
    background: #111111;
    color: #b7ff00;
    border-color: #2f2f2f;
}

.theme-dark .payment-option.is-selected {
    border-color: #b7ff00;
    background: #1a1a1a;
    color: #b7ff00;
    box-shadow: 0 0 14px rgba(183,255,0,0.16);
}

.theme-dark .payment-icon {
    background: #0a0a0a;
    color: #b7ff00;
}

.product-card {
    text-align: center;
}

.product-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #f2f2f2;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

.product-price {
    font-size: 15px;
    margin-bottom: 10px;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    padding: 12px;
    border-radius: 12px;
}

.theme-pink .list-item {
    background: #f8f8f8;
    color: #333;
}

.theme-dark .list-item {
    background: #111111;
    color: #b7ff00;
    border: 1px solid #222;
}

.order-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.order-meta {
    margin-top: 6px;
    font-size: 14px;
}

.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.campaign-preview {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin: 10px 0;
    background: #f8f8f8;
}

.delivery-note,
.payment-brands {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #fff3f8;
    color: #6d1740;
    font-size: 14px;
    line-height: 1.35;
}

.brand-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.brand-row span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    color: #ad1457;
    font-size: 12px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(173,20,87,0.12);
}

.delivery-note.ok {
    background: #ecfff3;
    color: #166534;
}

.delivery-note.alert {
    background: #fff7e6;
    color: #8a5600;
}

.front-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 20, 20, 0.46);
}

.front-modal {
    width: min(460px, 100%);
    background: #ffffff;
    color: #222222;
    border: 1px solid rgba(173, 20, 87, 0.16);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.app-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.logout-button {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    min-width: 76px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: #ffffff;
    padding: 10px 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.theme-pink .logout-button {
    background: rgba(109, 23, 64, 0.72);
}

.theme-dark .logout-button {
    background: #1a1a1a;
    color: #b7ff00;
    border-color: #2f2f2f;
}

.theme-pink .title,
.theme-pink > .app-footer {
    color: #ffffff;
}

.theme-dark .app-footer {
    color: rgba(255, 255, 255, 0.72);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.check-row input {
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0;
}

hr {
    border: none;
    height: 1px;
    background: rgba(255,255,255,0.18);
    margin: 18px 0;
}

.theme-dark hr {
    background: rgba(183,255,0,0.18);
}

.panel-big {
    font-size: 24px;
    text-align: center;
}

.panel-big .card {
    padding: 22px;
}

@media (max-width: 900px) {
    .grid-2,
    .frontoffice-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 24px;
    }

    .logo img {
        width: 110px;
        height: 110px;
    }

    .payment-options {
        grid-template-columns: 1fr;
    }
}
