/* =============================================================
   Galorina Vendors - Frontend CSS
   Colores: Primario #252074 | Secundario #006B28
   ============================================================= */

:root {
    --gv-primary:        #252074;
    --gv-primary-dark:   #1a1655;
    --gv-primary-light:  #3d3894;
    --gv-secondary:      #006B28;
    --gv-secondary-dark: #005220;
    --gv-accent:         #f39c12;
    --gv-danger:         #e74c3c;
    --gv-success:        #27ae60;
    --gv-warning:        #f39c12;
    --gv-info:           #2980b9;
    --gv-white:          #ffffff;
    --gv-gray-50:        #f8f9fa;
    --gv-gray-100:       #f1f3f5;
    --gv-gray-200:       #e9ecef;
    --gv-gray-300:       #dee2e6;
    --gv-gray-400:       #ced4da;
    --gv-gray-500:       #adb5bd;
    --gv-gray-600:       #6c757d;
    --gv-gray-700:       #495057;
    --gv-gray-800:       #343a40;
    --gv-gray-900:       #212529;
    --gv-radius-sm:      4px;
    --gv-radius:         8px;
    --gv-radius-lg:      12px;
    --gv-shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
    --gv-shadow:         0 2px 8px rgba(0,0,0,0.10);
    --gv-shadow-lg:      0 4px 20px rgba(0,0,0,0.12);
    --gv-transition:     0.2s ease;
    --gv-font:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =============================================================
   RESET Y BASE
   ============================================================= */

.gv-dashboard *,
.gv-prompt-box * {
    box-sizing: border-box;
}

.gv-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: var(--gv-font);
    color: var(--gv-gray-800);
    font-size: 14px;
    line-height: 1.5;
}

/* =============================================================
   PROMPT BOXES (login / suscripcion)
   ============================================================= */

.gv-prompt-box {
    max-width: 480px;
    margin: 60px auto;
    padding: 48px 40px;
    background: var(--gv-white);
    border-radius: var(--gv-radius-lg);
    box-shadow: var(--gv-shadow-lg);
    text-align: center;
}

.gv-prompt-icon {
    margin-bottom: 20px;
}

.gv-prompt-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gv-primary);
    margin: 0 0 12px;
}

.gv-prompt-box p {
    color: var(--gv-gray-600);
    margin: 0 0 24px;
}

/* =============================================================
   HEADER
   ============================================================= */

.gv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gv-white);
    border-radius: var(--gv-radius-lg);
    box-shadow: var(--gv-shadow-sm);
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: nowrap;
}

.gv-header-left {
    flex: 1;
    min-width: 0;
}

.gv-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gv-primary);
    margin: 0 0 4px;
}

.gv-header-title svg {
    color: var(--gv-primary);
    flex-shrink: 0;
}

.gv-header-sub {
    font-size: 13px;
    color: var(--gv-gray-600);
    margin: 0;
}

.gv-header-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gv-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.gv-badge-plan {
    background: var(--gv-primary);
    color: var(--gv-white);
}

.gv-badge-products {
    background: var(--gv-secondary);
    color: var(--gv-white);
}

/* =============================================================
   LAYOUT
   ============================================================= */

.gv-dashboard-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .gv-dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   HAMBURGER BUTTON (hidden on desktop)
   ============================================================= */

.gv-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--gv-radius-sm);
    flex-shrink: 0;
    transition: background var(--gv-transition);
}

.gv-hamburger:hover {
    background: var(--gv-gray-100);
}

.gv-hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gv-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.gv-hamburger.is-open .gv-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.gv-hamburger.is-open .gv-hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
}
.gv-hamburger.is-open .gv-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================
   SIDEBAR OVERLAY (mobile only - hidden by default)
   ============================================================= */

.gv-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* =============================================================
   SIDEBAR MOBILE HEADER (hidden on desktop)
   ============================================================= */

.gv-sidebar-mobile-header {
    display: none;
}

.gv-sidebar-close {
    display: none;
}

/* =============================================================
   MOBILE DRAWER  (<= 900px)
   ============================================================= */

@media (max-width: 900px) {

    /* Show hamburger */
    .gv-hamburger {
        display: flex;
    }

    /* Activate overlay */
    .gv-sidebar-overlay {
        display: block;
    }

    .gv-sidebar-overlay.is-visible {
        opacity: 1;
        pointer-events: all;
    }

    /* Drawer */
    .gv-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 9999 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.2) !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        gap: 0;
        /* Ensure it stays in DOM but off-screen */
        visibility: visible;
    }

    .gv-sidebar.is-open {
        transform: translateX(0) !important;
    }

    /* Mobile drawer header */
    .gv-sidebar-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 16px 14px;
        background: var(--gv-primary);
        border-bottom: 1px solid rgba(255,255,255,0.15);
        flex-shrink: 0;
    }

    .gv-sidebar-mobile-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 15px;
        font-weight: 700;
        color: #fff;
    }

    .gv-sidebar-mobile-title svg {
        stroke: #fff;
    }

    .gv-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: none;
        background: rgba(255,255,255,0.15);
        border-radius: var(--gv-radius-sm);
        cursor: pointer;
        color: #fff;
        transition: background var(--gv-transition);
        flex-shrink: 0;
    }

    .gv-sidebar-close:hover {
        background: rgba(255,255,255,0.28);
    }

    .gv-sidebar-close svg {
        stroke: #fff;
        display: block;
    }

    /* Nav padding inside drawer */
    .gv-nav {
        padding: 10px 10px 0;
        flex: 1;
    }

    .gv-nav-item {
        padding: 13px 16px;
        font-size: 14px;
    }

    .gv-sidebar-footer {
        padding: 10px 10px 20px;
        margin-top: 0;
    }
}

/* =============================================================
   SIDEBAR
   ============================================================= */

.gv-sidebar {
    background: var(--gv-white);
    border-radius: var(--gv-radius-lg);
    box-shadow: var(--gv-shadow-sm);
    padding: 12px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gv-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gv-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--gv-radius);
    color: var(--gv-gray-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--gv-transition), color var(--gv-transition);
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.gv-nav-item:hover {
    background: var(--gv-gray-100);
    color: var(--gv-primary);
}

.gv-nav-item.active {
    background: var(--gv-primary);
    color: var(--gv-white);
}

.gv-nav-item.active svg {
    stroke: var(--gv-white);
}

.gv-nav-item svg {
    flex-shrink: 0;
    stroke: var(--gv-gray-500);
    transition: stroke var(--gv-transition);
}

.gv-nav-item:hover svg {
    stroke: var(--gv-primary);
}

.gv-sidebar-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gv-gray-200);
}

.gv-nav-logout {
    color: var(--gv-danger) !important;
}

.gv-nav-logout svg {
    stroke: var(--gv-danger) !important;
}

.gv-nav-logout:hover {
    background: #ffeaea !important;
}

/* =============================================================
   MAIN CONTENT
   ============================================================= */

.gv-dashboard-main {
    min-height: 400px;
}

.gv-view {
    background: var(--gv-white);
    border-radius: var(--gv-radius-lg);
    box-shadow: var(--gv-shadow-sm);
    padding: 28px;
}

.gv-view-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gv-primary);
    margin: 0 0 24px;
}

.gv-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.gv-view-header .gv-view-title {
    margin: 0;
}

/* =============================================================
   NOTICES
   ============================================================= */

.gv-notice {
    padding: 12px 20px;
    border-radius: var(--gv-radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.gv-notice-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--gv-success);
}

.gv-notice-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--gv-danger);
}

/* =============================================================
   OVERVIEW - STATS
   ============================================================= */

.gv-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 1100px) {
    .gv-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gv-stats-grid {
        grid-template-columns: 1fr;
    }
}

.gv-stat-card {
    background: var(--gv-gray-50);
    border: 1px solid var(--gv-gray-200);
    border-radius: var(--gv-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.gv-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--gv-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gv-stat-icon svg {
    stroke: var(--gv-white);
}

.gv-stat-icon-blue   { background: var(--gv-primary); }
.gv-stat-icon-green  { background: var(--gv-secondary); }
.gv-stat-icon-orange { background: #e67e22; }
.gv-stat-icon-purple { background: #8e44ad; }

.gv-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gv-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gv-gray-900);
    line-height: 1.2;
}

.gv-stat-label {
    font-size: 12px;
    color: var(--gv-gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* =============================================================
   QUICK ACTIONS
   ============================================================= */

.gv-quick-actions h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gv-gray-700);
    margin: 0 0 14px;
}

.gv-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .gv-quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gv-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--gv-gray-50);
    border: 1px solid var(--gv-gray-200);
    border-radius: var(--gv-radius);
    text-decoration: none;
    color: var(--gv-gray-700);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: background var(--gv-transition), border-color var(--gv-transition), color var(--gv-transition);
}

.gv-quick-action:hover {
    background: var(--gv-primary);
    border-color: var(--gv-primary);
    color: var(--gv-white);
}

.gv-quick-action:hover svg {
    stroke: var(--gv-white);
}

.gv-quick-action svg {
    stroke: var(--gv-primary);
    transition: stroke var(--gv-transition);
}

/* =============================================================
   TABLE
   ============================================================= */

.gv-products-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gv-table th {
    background: var(--gv-gray-50);
    color: var(--gv-gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--gv-gray-200);
    white-space: nowrap;
}

.gv-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gv-gray-100);
    vertical-align: middle;
    color: var(--gv-gray-800);
}

.gv-table tbody tr:hover {
    background: var(--gv-gray-50);
}

.gv-table tbody tr:last-child td {
    border-bottom: none;
}

/* Columna imagen */
.gv-td-image {
    width: 60px;
    padding: 8px 14px !important;
}

.gv-product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--gv-radius-sm);
    display: block;
}

.gv-product-thumb-placeholder {
    width: 48px;
    height: 48px;
    background: var(--gv-gray-100);
    border-radius: var(--gv-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gv-product-name a {
    color: var(--gv-primary);
    text-decoration: none;
    font-weight: 600;
}

.gv-product-name a:hover {
    text-decoration: underline;
}

.gv-product-location {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--gv-gray-500);
    margin-top: 2px;
}

.gv-td-price {
    font-weight: 600;
    white-space: nowrap;
}

.gv-td-price del {
    color: var(--gv-gray-400);
    font-weight: normal;
    font-size: 12px;
}

.gv-td-actions {
    white-space: nowrap;
}

/* Status badges */
.gv-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gv-status-publish { background: #d4edda; color: #155724; }
.gv-status-draft   { background: #fff3cd; color: #856404; }
.gv-status-pending { background: #d1ecf1; color: #0c5460; }

/* Botones de accion de tabla */
.gv-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--gv-radius-sm);
    border: 1px solid var(--gv-gray-300);
    background: var(--gv-white);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--gv-transition), border-color var(--gv-transition);
    color: var(--gv-gray-600);
}

.gv-action-btn + .gv-action-btn {
    margin-left: 6px;
}

.gv-action-btn svg {
    stroke: currentColor;
}

.gv-action-edit:hover {
    background: #e8f4ff;
    border-color: var(--gv-info);
    color: var(--gv-info);
}

.gv-action-delete:hover {
    background: #ffeaea;
    border-color: var(--gv-danger);
    color: var(--gv-danger);
}

/* Empty state */
.gv-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gv-gray-500);
}

.gv-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.gv-empty-state p {
    font-size: 15px;
    margin: 0 0 20px;
}

/* =============================================================
   FORMS
   ============================================================= */

.gv-product-form,
.gv-settings-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gv-form-section {
    background: var(--gv-white);
    border: 1px solid var(--gv-gray-200);
    border-radius: var(--gv-radius);
    padding: 24px;
}

.gv-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gv-primary);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gv-gray-100);
}

.gv-form-section-title svg {
    stroke: var(--gv-primary);
    flex-shrink: 0;
}

.gv-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gv-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.gv-form-row:last-child {
    margin-bottom: 0;
}

.gv-form-group + .gv-form-group {
    margin-top: 16px;
}

.gv-form-row + .gv-form-group,
.gv-form-group + .gv-form-row {
    margin-top: 16px;
}

.gv-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gv-gray-700);
}

.gv-required {
    color: var(--gv-danger);
    margin-left: 2px;
}

.gv-form-group input[type="text"],
.gv-form-group input[type="number"],
.gv-form-group input[type="url"],
.gv-form-group input[type="email"],
.gv-form-group select,
.gv-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gv-gray-300);
    border-radius: var(--gv-radius-sm);
    font-size: 14px;
    font-family: var(--gv-font);
    color: var(--gv-gray-800);
    background: var(--gv-white);
    transition: border-color var(--gv-transition), box-shadow var(--gv-transition);
    -webkit-appearance: none;
    appearance: none;
}

.gv-form-group input:focus,
.gv-form-group select:focus,
.gv-form-group textarea:focus {
    outline: none;
    border-color: var(--gv-primary);
    box-shadow: 0 0 0 3px rgba(37,32,116,0.12);
}

.gv-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

.gv-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.gv-field-help {
    font-size: 12px;
    color: var(--gv-gray-500);
    margin: 0;
}

/* Checkboxes */
.gv-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--gv-gray-50);
    border: 1px solid var(--gv-gray-200);
    border-radius: var(--gv-radius-sm);
    max-height: 200px;
    overflow-y: auto;
}

.gv-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: normal !important;
    color: var(--gv-gray-700);
    cursor: pointer;
    padding: 3px 0;
}

.gv-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gv-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.gv-checkbox-group {
    flex-direction: row;
    align-items: center;
}

/* =============================================================
   IMAGE UPLOAD
   ============================================================= */

.gv-upload-area {
    border: 2px dashed var(--gv-gray-300);
    border-radius: var(--gv-radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color var(--gv-transition), background var(--gv-transition);
    background: var(--gv-gray-50);
}

.gv-upload-area:hover,
.gv-upload-area.drag-over {
    border-color: var(--gv-primary);
    background: rgba(37,32,116,0.04);
}

.gv-upload-area svg {
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gv-upload-area p {
    margin: 0;
    font-size: 13px;
    color: var(--gv-gray-500);
}

.gv-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.gv-image-preview img,
.gv-current-image img {
    max-width: 160px;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--gv-radius-sm);
    border: 1px solid var(--gv-gray-200);
    margin-top: 10px;
    display: block;
}

.gv-current-image {
    margin-bottom: 8px;
}

.gv-current-image-label {
    display: block;
    font-size: 11px;
    color: var(--gv-gray-500);
    margin-top: 4px;
}

.gv-gallery-preview,
.gv-gallery-current {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gv-gallery-preview img,
.gv-gallery-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--gv-radius-sm);
    border: 1px solid var(--gv-gray-200);
}

/* =============================================================
   FORM ACTIONS
   ============================================================= */

.gv-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    flex-wrap: wrap;
}

/* =============================================================
   BUTTONS
   ============================================================= */

.gv-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--gv-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--gv-font);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--gv-transition), color var(--gv-transition), border-color var(--gv-transition), opacity var(--gv-transition);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.gv-btn svg {
    flex-shrink: 0;
}

.gv-btn:disabled,
.gv-btn.loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.gv-btn-primary {
    background: var(--gv-primary);
    color: var(--gv-white);
    border-color: var(--gv-primary);
}

.gv-btn-primary:hover {
    background: var(--gv-primary-dark);
    border-color: var(--gv-primary-dark);
    color: var(--gv-white);
}

.gv-btn-secondary {
    background: var(--gv-secondary);
    color: var(--gv-white);
    border-color: var(--gv-secondary);
}

.gv-btn-secondary:hover {
    background: var(--gv-secondary-dark);
    border-color: var(--gv-secondary-dark);
    color: var(--gv-white);
}

.gv-btn-ghost {
    background: transparent;
    color: var(--gv-gray-600);
    border-color: var(--gv-gray-300);
}

.gv-btn-ghost:hover {
    background: var(--gv-gray-100);
    color: var(--gv-gray-800);
}

.gv-btn-danger {
    background: var(--gv-danger);
    color: var(--gv-white);
    border-color: var(--gv-danger);
}

/* =============================================================
   SETTINGS VIEW
   ============================================================= */

.gv-plan-info-box {
    background: var(--gv-gray-50);
    border: 1px solid var(--gv-gray-200);
    border-radius: var(--gv-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.gv-plan-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--gv-gray-700);
    border-bottom: 1px solid var(--gv-gray-200);
}

.gv-plan-info-row:last-child {
    border-bottom: none;
}

.gv-plan-info-row strong {
    color: var(--gv-gray-900);
}

/* =============================================================
   LIMIT REACHED
   ============================================================= */

.gv-limit-reached {
    text-align: center;
    padding: 60px 20px;
}

.gv-limit-reached svg {
    margin-bottom: 16px;
}

.gv-limit-reached h2 {
    font-size: 20px;
    color: var(--gv-danger);
    margin: 0 0 10px;
}

.gv-limit-reached p {
    color: var(--gv-gray-600);
    margin: 0 0 24px;
}

/* =============================================================
   ERROR
   ============================================================= */

.gv-error-msg {
    padding: 16px 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: var(--gv-radius);
    border-left: 4px solid var(--gv-danger);
    font-size: 14px;
}

/* =============================================================
   NOTIFICATION TOAST
   ============================================================= */

.gv-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--gv-radius);
    box-shadow: var(--gv-shadow-lg);
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    animation: gv-toast-in 0.3s ease;
    font-family: var(--gv-font);
}

.gv-toast-success {
    background: #1a7a3c;
    color: var(--gv-white);
}

.gv-toast-error {
    background: #c0392b;
    color: var(--gv-white);
}

.gv-toast-info {
    background: var(--gv-primary);
    color: var(--gv-white);
}

.gv-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.gv-toast-close:hover {
    color: var(--gv-white);
}

@keyframes gv-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   TYPE-SPECIFIC FIELDS TRANSITION
   ============================================================= */

.gv-type-fields {
    padding-top: 16px;
    border-top: 1px dashed var(--gv-gray-300);
    margin-top: 16px;
    animation: gv-fade-in 0.2s ease;
}

@keyframes gv-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =============================================================
   LOADING SPINNER
   ============================================================= */

.gv-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: var(--gv-white);
    border-radius: 50%;
    animation: gv-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes gv-spin {
    to { transform: rotate(360deg); }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 768px) {
    .gv-dashboard {
        padding: 10px;
    }

    .gv-view {
        padding: 16px;
    }

    .gv-header {
        padding: 12px 14px;
    }

    .gv-header-title {
        font-size: 15px;
        gap: 7px;
    }

    .gv-header-title svg {
        width: 18px;
        height: 18px;
    }

    .gv-header-sub {
        font-size: 11px;
    }

    .gv-badge-products {
        display: none;
    }

    .gv-form-row {
        grid-template-columns: 1fr;
    }

    .gv-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gv-btn {
        justify-content: center;
    }

    .gv-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gv-quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gv-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .gv-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .gv-stat-card {
        padding: 14px 12px;
        gap: 10px;
    }
    .gv-stat-icon {
        width: 38px;
        height: 38px;
    }
    .gv-stat-value {
        font-size: 17px;
    }
    .gv-quick-action {
        padding: 14px 8px;
        font-size: 12px;
    }
}

/* ==========================================================================
   ESTILOS GLOBALES DE FORMULARIOS — Bordes sólidos gris claro
   Aplica de forma consistente a TODOS los formularios del plugin
   ========================================================================== */

/* --- Variables de formulario --- */
:root {
    --gv-input-border:        #d1d5db;
    --gv-input-border-focus:  #252074;
    --gv-input-border-error:  #ef4444;
    --gv-input-bg:            #ffffff;
    --gv-input-bg-disabled:   #f9fafb;
    --gv-input-radius:        8px;
    --gv-input-padding:       10px 14px;
    --gv-input-font-size:     14px;
    --gv-input-color:         #1e293b;
    --gv-input-placeholder:   #9ca3af;
    --gv-label-color:         #374151;
    --gv-label-weight:        600;
    --gv-label-size:          13px;
}

/* --- Reset base: todos los inputs, selects y textareas del plugin --- */
.gv-wrap input[type="text"],
.gv-wrap input[type="email"],
.gv-wrap input[type="password"],
.gv-wrap input[type="number"],
.gv-wrap input[type="tel"],
.gv-wrap input[type="url"],
.gv-wrap input[type="search"],
.gv-wrap input[type="date"],
.gv-wrap input[type="time"],
.gv-wrap input[type="datetime-local"],
.gv-wrap select,
.gv-wrap textarea,
.gv-input {
    display: block;
    width: 100%;
    padding: var(--gv-input-padding);
    font-size: var(--gv-input-font-size);
    font-family: inherit;
    color: var(--gv-input-color);
    background-color: var(--gv-input-bg);
    border: 1.5px solid var(--gv-input-border);
    border-radius: var(--gv-input-radius);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.gv-wrap input[type="text"]:focus,
.gv-wrap input[type="email"]:focus,
.gv-wrap input[type="password"]:focus,
.gv-wrap input[type="number"]:focus,
.gv-wrap input[type="tel"]:focus,
.gv-wrap input[type="url"]:focus,
.gv-wrap input[type="search"]:focus,
.gv-wrap input[type="date"]:focus,
.gv-wrap input[type="time"]:focus,
.gv-wrap input[type="datetime-local"]:focus,
.gv-wrap select:focus,
.gv-wrap textarea:focus,
.gv-input:focus {
    border-color: var(--gv-input-border-focus);
    box-shadow: 0 0 0 3px rgba(37, 32, 116, 0.10);
}

.gv-wrap input::placeholder,
.gv-wrap textarea::placeholder,
.gv-input::placeholder {
    color: var(--gv-input-placeholder);
}

.gv-wrap input:disabled,
.gv-wrap select:disabled,
.gv-wrap textarea:disabled,
.gv-input:disabled {
    background-color: var(--gv-input-bg-disabled);
    cursor: not-allowed;
    opacity: 0.75;
}

/* Select con flecha custom */
.gv-wrap select,
select.gv-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Textarea */
.gv-wrap textarea,
textarea.gv-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
.gv-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* --- Labels --- */
.gv-label {
    display: block;
    font-size: var(--gv-label-size);
    font-weight: var(--gv-label-weight);
    color: var(--gv-label-color);
    margin-bottom: 6px;
}
.gv-required {
    color: #ef4444;
    margin-left: 2px;
}

/* --- Grupos de formulario --- */
.gv-form-group {
    margin-bottom: 18px;
}

/* --- Filas responsive --- */
.gv-form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 0;
}
.gv-form-row--2 { grid-template-columns: 1fr 1fr; }
.gv-form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.gv-form-row--4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 768px) {
    .gv-form-row--2,
    .gv-form-row--3,
    .gv-form-row--4 {
        grid-template-columns: 1fr;
    }
}

/* --- Secciones de formulario --- */
.gv-form-section {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.gv-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f1f5f9;
}

/* --- Texto de ayuda --- */
.gv-form-help {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #0369a1;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* --- Zona de subida de imágenes --- */
.gv-image-upload-zone {
    border: 2px dashed var(--gv-input-border);
    border-radius: var(--gv-input-radius);
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gv-image-upload-zone:hover {
    border-color: var(--gv-input-border-focus);
    background: #f0f1ff;
}
.gv-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}
.gv-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.gv-image-preview {
    position: relative;
    display: inline-block;
}
.gv-image-preview img {
    max-width: 180px;
    max-height: 130px;
    border-radius: 6px;
    object-fit: cover;
    border: 1.5px solid var(--gv-input-border);
}
.gv-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

/* Galería */
.gv-gallery-upload-zone {
    border: 2px dashed var(--gv-input-border);
    border-radius: var(--gv-input-radius);
    padding: 16px;
    background: #f9fafb;
    min-height: 120px;
}
.gv-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.gv-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid var(--gv-input-border);
}
.gv-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gv-gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(239,68,68,.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.gv-gallery-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px dashed #94a3b8;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}
.gv-gallery-add-btn:hover {
    border-color: var(--gv-input-border-focus);
    color: var(--gv-input-border-focus);
    background: #f0f1ff;
}
.gv-file-input-hidden {
    display: none;
}

/* --- Acciones del formulario --- */
.gv-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    flex-wrap: wrap;
}

/* --- Botón volver --- */
.gv-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.18s;
}
.gv-back-link:hover { color: #252074; text-decoration: none; }

/* --- Badges de estado --- */
.gv-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.gv-badge-success { background: #dcfce7; color: #166534; }
.gv-badge-warning { background: #fef9c3; color: #854d0e; }
.gv-badge-error   { background: #fee2e2; color: #991b1b; }
.gv-badge-draft   { background: #f1f5f9; color: #475569; }

/* --- Botones de acción en tabla --- */
.gv-table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gv-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
}
.gv-action-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; text-decoration: none; }
.gv-action-btn--edit:hover  { border-color: #252074; color: #252074; background: #f0f1ff; }
.gv-action-btn--delete:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* --- Link genérico --- */
.gv-link { color: #252074; text-decoration: none; font-weight: 600; }
.gv-link:hover { text-decoration: underline; }

/* ==========================================================================
   WIDGET DE RESERVA (booking widget en página de propiedad)
   ========================================================================== */

.gv-booking-widget {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    position: sticky;
    top: 80px;
}
.gv-booking-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.gv-booking-price {
    font-size: 26px;
    font-weight: 800;
    color: #252074;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.gv-booking-price small {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}
.gv-booking-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1.5px solid var(--gv-input-border);
    border-radius: var(--gv-input-radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.gv-booking-date-field {
    padding: 10px 14px;
    cursor: pointer;
}
.gv-booking-date-field:first-child {
    border-right: 1.5px solid var(--gv-input-border);
}
.gv-booking-date-field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    margin-bottom: 2px;
}
.gv-booking-date-field input[type="date"] {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: transparent !important;
    width: 100%;
}
.gv-booking-date-field input[type="date"]:focus {
    border: none !important;
    box-shadow: none !important;
}
.gv-booking-guests {
    border: 1.5px solid var(--gv-input-border);
    border-radius: var(--gv-input-radius);
    padding: 10px 14px;
    margin-bottom: 16px;
}
.gv-booking-guests label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    margin-bottom: 2px;
}
.gv-booking-guests select {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background-image: none !important;
}
.gv-booking-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #475569;
    display: none;
}
.gv-booking-summary.is-visible { display: block; }
.gv-booking-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.gv-booking-summary-row:last-child {
    margin-bottom: 0;
    font-weight: 700;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 4px;
}
.gv-booking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #252074;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-sizing: border-box;
}
.gv-booking-btn:hover {
    background: #1a165a;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.gv-booking-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}
.gv-booking-notice {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-top: 10px;
}
.gv-booking-availability {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: none;
}
.gv-booking-availability.available {
    background: #dcfce7;
    color: #166534;
    display: block;
}
.gv-booking-availability.unavailable {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* ==========================================================================
   VISTA DE PROPIEDADES EN EL DASHBOARD
   ========================================================================== */

.gv-properties-table-wrap {
    overflow-x: auto;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
}
.gv-properties-table-wrap .gv-table {
    border: none;
    border-radius: 0;
}
.gv-properties-table-wrap .gv-table thead th:first-child { border-radius: 0; }
.gv-properties-table-wrap .gv-table thead th:last-child  { border-radius: 0; }

/* Filtros de propiedades */
.gv-props-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.gv-props-filter select,
.gv-props-filter input {
    padding: 8px 12px;
    font-size: 13px;
    border: 1.5px solid var(--gv-input-border);
    border-radius: 7px;
    background: #fff;
    color: #374151;
    outline: none;
    transition: border-color 0.18s;
}
.gv-props-filter select:focus,
.gv-props-filter input:focus {
    border-color: var(--gv-input-border-focus);
}
