:root {
    --bg: #f4efe5;
    --bg-soft: #fdf7ef;
    --ink: #2a2722;
    --muted: #6b655c;
    --accent: #7a946d;
    --accent-2: #cbb992;
    --line: rgba(42, 39, 34, 0.16);
    --shadow: 0 24px 60px rgba(41, 35, 26, 0.16);
        --pastel-pink: #ffc8dd;
    --pastel-pink-dark: #ffafcc;
    --pastel-blue: #a2d2ff;
    --pastel-blue-dark: #8ecae6;
    --pastel-purple: #cdb4db;
    
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #ffffff;
    color: var(--ink);
    min-height: 100vh;
}

.auth-page {
    display: block;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.toast-pink {
    background: #ff5c8a;
    color: #fff;
    border: none;
}

.toast-pink .toast-header {
    background: #ff5c8a;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.toast-pink .toast-body {
    color: #fff;
}

.toast-pink .btn-close {
    filter: invert(1);
}

.toast-status {
    border: none;
}

.toast-status.toast-success {
    background: #16a34a;
    color: #ffffff;
}

.toast-status.toast-success .toast-header {
    background: #16a34a;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.toast-status.toast-success .toast-body {
    color: #ffffff;
}

.toast-status.toast-success .btn-close {
    filter: invert(1);
}

.toast-status.toast-danger {
    background: #dc2626;
    color: #ffffff;
}

.toast-status.toast-danger .toast-header {
    background: #dc2626;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.toast-status.toast-danger .toast-body {
    color: #ffffff;
}

.toast-status.toast-danger .btn-close {
    filter: invert(1);
}

.toast-status.toast-warning {
    background: #facc15;
    color: #422006;
}

.toast-status.toast-warning .toast-header {
    background: #facc15;
    color: #422006;
    border-bottom: 1px solid rgba(66, 32, 6, 0.2);
}

.toast-status.toast-warning .toast-body {
    color: #422006;
}

.toast-status.toast-warning .btn-close {
    filter: none;
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    padding: 48px 20px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
}

.login-page .auth {
    grid-template-columns: 1fr;
    max-width: 520px;
}

.admin-layout {
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1fr) minmax(320px, 0.9fr);
    align-items: start;
    max-width: 100%;
    width: 100%;
    padding-left: 56px;
    padding-right: 56px;
}

.products-page .admin-layout {
    grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.8fr);
    align-items: start;
    gap: 32px;
}

.products-page .admin-products {
    grid-column: 1 / -1;
}

.panel-page .admin-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.9fr);
    align-items: start;
}

.panel-page .auth-card {
    grid-column: 1 / -1;
}

.currency-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.panel-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.modal-dialog {
    margin: 1.75rem auto;
}

.panel-actions .btn.btn-compact {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.currency-label {
    font-weight: 600;
    color: var(--muted);
}

.currency-bar select {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 8px 36px 8px 14px;
    background: white;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-card {    
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    backdrop-filter: blur(12px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
background: linear-gradient(140deg, #ff83fb, #eebff6);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-tag {
    color: var(--muted);
    font-size: 0.9rem;
}

h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.lead {
    color: var(--muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.field span {
    font-size: 0.9rem;
    color: var(--muted);
}

.field input {
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    background: white;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    width: 100%;
}

.field select,
.field input[type="file"] {
 border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    width: 100%;
}

.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.field select:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.field input:focus {
    outline: 2px solid rgba(122, 148, 109, 0.35);
    border-color: rgba(122, 148, 109, 0.6);
}

.field select:focus,
.field input[type="file"]:focus {
    outline: 2px solid rgba(122, 148, 109, 0.35);
    border-color: rgba(122, 148, 109, 0.6);
}

.field-hint {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.checkbox input {
    accent-color: var(--accent);
}

.btn {
    border-radius: 12px;
    padding: 12px 20px;
    border: none;
    background: linear-gradient(135deg, var(--pastel-pink), var(--pastel-pink-dark));
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 10px rgba(255, 175, 204, 0.3);
}

.btn-preview-mobile {
    display: none;
    margin-top: 10px;
    background: var(--pastel-blue);
}

.btn-preview-mobile:hover {
    background: var(--pastel-blue-dark);
    box-shadow: 0 8px 16px rgba(162, 210, 255, 0.4);
}

.btn.btn-compact {
    padding: 8px 16px;
    font-size: 0.9rem;
    width: auto;
}

.btn.btn-subasta {
    display: block;
    text-align: center;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-blue-dark));
    box-shadow: 0 4px 10px rgba(142, 202, 230, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-blue-dark));
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(162, 210, 255, 0.4);
    color: #ffffff;
}

.link {
    color: #4d6a52;
    font-weight: 600;
}

.switch {
   
    font-size: 0.95rem;
    background: rgb(255, 255, 255);

}

.admin-switch {
    grid-column: 2 / 4;
    margin-top: 4px;
}

.admin-products .table-wrap {
    max-height: 68vh;
    overflow-y: auto;
}

.auth-panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(248, 242, 231, 0.92));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    min-height: 380px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -60px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(122, 148, 109, 0.35), transparent 70%);
}

.panel-content {
    display: grid;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.auth-panel h2 {
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.auth-panel p {
    color: var(--muted);
    line-height: 1.6;
}

.admin-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.section-title {
    font-family: "Fraunces", serif;
    font-size: 1.4rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 0.95rem;
    table-layout: fixed;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: none;
    vertical-align: middle;
}

.admin-table td {
    white-space: normal;
    line-height: 1.4;
}

.admin-table thead th {
    color: #000000;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.admin-table tbody tr {
    box-shadow: 0 8px 18px rgba(28, 28, 28, 0.08);
}

.admin-table tbody td {
    background: #ffffff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.admin-table tbody td:first-child {
    border-left: 1px solid var(--line);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.admin-table tbody td:last-child {
    border-right: 1px solid var(--line);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

@media (min-width: 901px) {
    .admin-table {
        min-width: 980px;
    }
}

.admin-table tbody tr:hover td {
    background: #fdf8f2;
}

.thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(122, 148, 109, 0.15);
    font-weight: 600;
    font-size: 0.85rem;
}

.btn.btn-small {
    width: auto;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.winner {
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
}

.winner-name {
    font-weight: 700;
}

.winner-meta {
    color: var(--muted);
    font-size: 0.8rem;
}

.winner-amount {
    color: var(--ink);
    font-weight: 700;
}

.currency-stack {
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--muted);
}

.currency-line {
    white-space: nowrap;
}

.history-changes {
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.history-changes strong {
    color: var(--ink);
    font-weight: 600;
    margin-right: 6px;
}

.history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 10px 0 18px;
    align-items: end;
}

.history-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-stats {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.panel-stats div {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.95rem;
    gap: 12px;
}

.panel-stats strong {
    color: var(--ink);
    font-size: 1.1rem;
}

@media (max-width: 720px) {
    .auth {
        padding: 32px 16px 48px;
    }

    .auth-card,
    .auth-panel {
        padding: 24px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-panel {
        order: -1;
    }

    .admin-layout {
        grid-template-columns: 1fr;
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-switch {
        grid-column: auto;
    }
}

@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        padding-left: 32px;
        padding-right: 32px;
    }

    .products-page .admin-layout {
        background: rgb(255, 255, 255);
    }

    .panel-page .admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .product-preview-wrapper {
        display: none;
    }
    .btn-preview-mobile {
        display: block;
    }
    .admin-table {
        min-width: auto;
        table-layout: auto;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.85rem;
        white-space: normal;
        padding: 10px 8px;
    }

    .thumb {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .admin-table {
        font-size: 0.75rem;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.75rem;
        padding: 8px 6px;
    }

    .admin-table tbody tr {
        box-shadow: 0 4px 10px rgba(28, 28, 28, 0.05);
    }

    .admin-table tbody td:first-child {
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
    }

    .admin-table tbody td:last-child {
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .thumb {
        width: 36px;
        height: 36px;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .action-row {
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .currency-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .auth-card,
    .auth-panel {
        padding: 20px;
    }

    .admin-table {
        font-size: 0.65rem;
        min-width: auto;
        table-layout: auto;
        border-spacing: 0 6px;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.65rem;
        padding: 6px 4px;
        word-break: break-word;
    }

    .admin-table thead th {
        font-size: 0.60rem;
    }

    .admin-table tbody tr {
        box-shadow: 0 2px 6px rgba(28, 28, 28, 0.04);
    }

    .admin-table tbody td:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .admin-table tbody td:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .thumb {
        width: 32px;
        height: 32px;
    }

    .history-changes {
        font-size: 0.55rem;
    }

    .btn-compact {
        font-size: 0.70rem;
        padding: 6px 8px;
    }

    .btn-small {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .action-row {
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .admin-table {
        font-size: 0.60rem;
        border-spacing: 0 4px;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.60rem;
        padding: 4px 3px;
    }

    .admin-table thead th {
        font-size: 0.55rem;
    }

    .admin-table tbody tr {
        box-shadow: 0 1px 3px rgba(28, 28, 28, 0.03);
    }

    .admin-table tbody td:first-child {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
    }

    .admin-table tbody td:last-child {
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
    }

    .thumb {
        width: 28px;
        height: 28px;
    }

    .btn-compact {
        font-size: 0.65rem;
        padding: 5px 6px;
    }

    .btn-small {
        padding: 4px 6px;
        font-size: 0.60rem;
    }

    .action-row {
        gap: 2px;
    }

    .auth-card,
    .auth-panel {
        padding: 16px;
    }
}

/* Preview Styles mimicking producto.php */
.product-preview-wrapper {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 16px;
}

.preview-title {
    font-family: "Fraunces", serif;
    font-size: 1.4rem;
    color: var(--ink);
}

.preview-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.preview-image-box {
    width: 100%;
    height: 280px;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.preview-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.preview-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}

.preview-product-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.preview-price-block {
    display: flex;
    flex-direction: column;
    text-align: center;
    flex-grow: 1;
}

.preview-price-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.preview-price-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.preview-price-value.highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00B4FF;
}

.preview-category-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f78da7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Flatpickr Custom Theme */
.flatpickr-calendar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--line);
    width: auto;
    font-family: "Space Grotesk", sans-serif;
}

.flatpickr-months .flatpickr-month {
    background: var(--bg-soft);
    color: var(--ink);
    fill: var(--ink);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--pastel-pink-dark);
    fill: var(--pastel-pink-dark);
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--pastel-blue);
    fill: var(--pastel-blue);
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
    color: var(--ink);
}

.flatpickr-weekday {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.flatpickr-day {
    color: var(--ink);
    font-weight: 500;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: #fff0f5; /* Light pink hover */
    border-color: #fff0f5;
}

.flatpickr-day.today {
    border-color: var(--pastel-pink);
}

.flatpickr-day.today:hover {
    background: var(--pastel-pink);
    color: white;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--pastel-pink-dark);
    border-color: var(--pastel-pink-dark);
    color: white;
    box-shadow: none;
}

.flatpickr-time {
    border-top: 1px solid var(--line);
}

.flatpickr-time .numInputWrapper:hover {
    background: #fff0f5;
}

.flatpickr-time .arrowUp:after {
    border-bottom-color: var(--pastel-pink-dark);
}

.flatpickr-time .arrowDown:after {
    border-top-color: var(--pastel-pink-dark);
}

/* Cropper Modal */
.cropper-modal-img-container {
    display: block;
    max-width: 100%;
    height: 45vh;
    margin-bottom: 1rem;
}

.cropper-modal-img-container img {
    max-width: 100%;
    max-height: 100%;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.45);
    padding: 1rem;
}

.modal.show {
    display: block;
}

.modal .modal-dialog {
    width: min(100%, 560px);
    margin: 4vh auto;
}

.modal .modal-dialog.modal-lg {
    width: min(100%, 920px);
}

.modal .modal-content {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(20, 28, 45, 0.2);
}

.modal .modal-header,
.modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
}

.modal .modal-header {
    border-bottom: 1px solid #edf2f7;
}

.modal .modal-body {
    padding: 18px;
}

.modal .modal-footer {
    border-top: 1px solid #edf2f7;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal .btn-close {
    appearance: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eef2f7;
    cursor: pointer;
    position: relative;
}

.modal .btn-close::before,
.modal .btn-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background: #475569;
    transform-origin: center;
}

.modal .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#cropperModal .modal-dialog {
    width: min(100%, 980px);
}

#cropperModal .modal-footer .btn {
    width: auto;
    min-width: 145px;
}

.modal-expiracion .modal-content {
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 50px rgba(20, 28, 45, 0.2);
}

.modal-expiracion .modal-header {
    border-bottom: 1px solid #edf2f7;
}

.modal-expiracion .modal-body p {
    margin-bottom: 0.75rem;
    color: #334155;
    line-height: 1.5;
}

.modal-expiracion .modal-footer {
    border-top: 1px solid #edf2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.modal-expiracion .modal-footer .btn {
    width: auto;
    min-width: 145px;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: none;
    transform: none;
}

.modal-expiracion .modal-footer .btn:hover {
    transform: none;
}

.modal-expiracion .btn[data-bs-dismiss="modal"] {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.modal-expiracion #expConfirmAddDate,
.modal-expiracion #expConfirmSaveWithDate {
    background: #ffffff;
    color: #334155;
    border: 1px solid #d1d9e6;
}

.modal-expiracion #expConfirmKeepNoDate {
    background: linear-gradient(135deg, var(--pastel-pink), var(--pastel-pink-dark));
    color: #ffffff;
    border: none;
}

.modal-expiracion #expDateWrap .field {
    gap: 6px;
}

.modal-expiracion #expDateModalInput {
    border-radius: 10px;
    border: 1px solid #d1d9e6;
    padding: 10px 12px;
}

.modal-preview .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
}

.modal-preview .btn-close {
    display: none;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.page-info {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
}

.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--muted);
    box-shadow: none;
    transform: none;
}

/* --- Responsive Table (Card View) --- */
@media (max-width: 900px) {
    .admin-table thead {
        display: none;
    }
    
    .admin-table, 
    .admin-table tbody, 
    .admin-table tr, 
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tbody tr {
        margin-bottom: 20px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #ffffff;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        border-top: none !important; 
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
    }

    .admin-table td:last-child {
        border-bottom: none;
    }

    .admin-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        margin-right: 15px;
        text-align: left;
    }

    /* Ajustes específicos para Imagen y Acciones */
    .admin-table td[data-label="Imagen"] { justify-content: center; padding-bottom: 15px; }
    .admin-table td[data-label="Imagen"]::before { display: none; }
    
    .admin-table td[data-label="Acciones"] { display: block; margin-top: 10px; }
    .admin-table td[data-label="Acciones"]::before { display: none; }
    .admin-table td[data-label="Acciones"] .action-row { justify-content: center; }
}

/* --- History Table Improvements --- */
.date-cell {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.date-cell .date { font-weight: 600; color: var(--ink); }
.date-cell .time { font-size: 0.8rem; color: var(--muted); }

.product-cell {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.product-cell .product-name { font-weight: 600; }
.product-cell .product-id { font-size: 0.75rem; color: var(--muted); }

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-default { background: #f3f4f6; color: #64748b; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-blue-dark));
    color: white;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.changes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.change-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}
.change-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 4px;
}
.change-diff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.val-old {
    text-decoration: line-through;
    color: #94a3b8;
}
.val-new {
    color: var(--ink);
    font-weight: 600;
    background: rgba(122, 148, 109, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
.arrow { color: #cbd5e1; font-weight: bold; }
.no-changes { font-style: italic; color: #cbd5e1; font-size: 0.85rem; }

@media (max-width: 900px) {
    .admin-table td.changes-col {
        display: block;
        text-align: left;
    }
    .admin-table td.changes-col::before {
        display: block;
        margin-bottom: 8px;
    }
}
