/* =============================================
   PANEL DE USUARIO — Real Bikes Locker
   ============================================= */

html, body { background: #0d0d0d !important; }

.panel-layout {
    max-width: 1200px;
    margin: 100px auto 80px;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    min-height: calc(100vh - 180px);
}

/* ---- SIDEBAR ---- */
.panel-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    align-self: flex-start;
}

.panel-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.panel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,255,65,0.1);
    border: 1px solid rgba(0,255,65,0.2);
    color: var(--green);
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-user-email {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.panel-nav { padding: 8px 0; }

.panel-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.panel-nav-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.panel-nav-item:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.panel-nav-item.active { color: var(--green); background: rgba(0,255,65,0.06); border-left: 2px solid var(--green); }

/* ---- MAIN ---- */
.panel-main {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - 180px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.panel-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
}

.panel-publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.panel-publish-btn:hover { background: #00e63a; transform: translateY(-1px); }

/* ---- TABS ---- */
.panel-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}

.panel-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 8px 24px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.panel-tab:hover { color: rgba(255,255,255,0.7); }
.panel-tab.active { background: rgba(0,255,65,0.1); color: var(--green); }

/* ---- SECTION ---- */
.panel-section { display: none; }
.panel-section.active { display: block; }

/* ---- FILTROS ---- */
.panel-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.panel-filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.panel-filter-btn:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }
.panel-filter-btn.active { background: rgba(0,255,65,0.08); border-color: rgba(0,255,65,0.25); color: var(--green); }

/* ---- LISTA DE ITEMS ---- */
.panel-list { display: flex; flex-direction: column; gap: 12px; }

.panel-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 16px;
    transition: border-color 0.2s;
}

.panel-item:hover { border-color: rgba(255,255,255,0.12); }

.panel-item-img {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.panel-item-img img { width: 100%; height: 100%; object-fit: cover; }
.panel-item-img svg { width: 28px; height: 28px; }

.panel-item-info { flex: 1; min-width: 0; }

.panel-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.panel-item-id {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
}

.panel-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    border: 1px solid;
    letter-spacing: 0.3px;
}

.panel-item-nombre {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-item-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin: 0;
}

.panel-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.panel-item-precio {
    font-size: 16px;
    font-weight: 900;
    color: var(--green);
    margin: 0;
}

.panel-item-actions { display: flex; gap: 8px; }

.panel-item-btn {
    background: rgba(0,255,65,0.08);
    border: 1px solid rgba(0,255,65,0.2);
    color: var(--green);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.panel-item-btn:hover { background: var(--green); color: #000; }

.panel-item-btn.outline {
    background: transparent;
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
}

.panel-item-btn.outline:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.3); }

.panel-item-note {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
}

/* ---- EMPTY STATE ---- */
.panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 16px;
}

.panel-empty svg { width: 52px; height: 52px; }
.panel-empty p { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.5); margin: 0; }

.panel-empty-btn {
    background: transparent;
    border: 1.5px solid var(--green-border);
    color: var(--green);
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.panel-empty-btn:hover { background: var(--green); color: #000; }

/* ---- MODAL PUBLICAR ---- */
.panel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.panel-modal-overlay.active { opacity: 1; visibility: visible; }

.panel-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    z-index: 2001;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.panel-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 1;
}

.panel-modal-header h2 {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.panel-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.panel-modal-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.panel-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }

.panel-form-row { display: flex; gap: 14px; }
.panel-form-row .panel-form-field { flex: 1; }

.panel-form-field { display: flex; flex-direction: column; gap: 6px; }

.panel-form-field label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
}

.req { color: #ff4444; }

.panel-form-field input,
.panel-form-field select,
.panel-form-field textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.panel-form-field input:focus,
.panel-form-field select:focus,
.panel-form-field textarea:focus { border-color: rgba(0,255,65,0.4); }

.panel-form-field select option { background: #1a1a1a; }
.panel-form-field textarea { resize: vertical; min-height: 90px; }

.panel-foto-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1.5px dashed rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.panel-foto-upload:hover { border-color: rgba(0,255,65,0.3); background: rgba(0,255,65,0.02); }
.panel-foto-upload span { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 600; }
.panel-foto-upload small { font-size: 11px; color: rgba(255,255,255,0.25); }

.panel-foto-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.panel-foto-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.panel-foto-thumb img { width: 100%; height: 100%; object-fit: cover; }

.panel-form-note {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0;
    line-height: 1.6;
}

.panel-form-error {
    font-size: 13px;
    color: #ff4444;
    text-align: center;
    margin: 0;
    min-height: 18px;
}

.panel-form-submit {
    width: 100%;
    background: var(--green);
    border: none;
    color: #000;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.panel-form-submit:hover { background: #00e63a; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .panel-layout {
        flex-direction: column;
        margin-top: 80px;
        gap: 20px;
    }

    .panel-sidebar { width: 100%; position: static; }

    .panel-nav { display: flex; padding: 0; }

    .panel-nav-item {
        flex: 1;
        justify-content: center;
        padding: 12px 8px;
        font-size: 12px;
        border-left: none !important;
        border-bottom: 2px solid transparent;
    }

    .panel-nav-item.active { border-bottom-color: var(--green); border-left: none; }

    .panel-item { flex-wrap: wrap; }
    .panel-item-right { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }

    .panel-form-row { flex-direction: column; }

    .panel-modal { width: 95%; max-height: 95vh; }

    .panel-tabs { width: 100%; }
    .panel-tab { flex: 1; }
}

/* ---- REGISTRAR ENVÍO ---- */
.envio-aviso {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0,255,65,0.04);
    border: 1px solid rgba(0,255,65,0.12);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.envio-aviso svg { flex-shrink: 0; margin-top: 2px; }

.envio-aviso strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 4px;
}

.envio-aviso p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.envio-section { margin-bottom: 36px; }

.envio-section-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    margin: 0 0 14px;
}

.envio-venta-item {
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.envio-venta-item.selected {
    border-color: rgba(0,255,65,0.35) !important;
    background: rgba(0,255,65,0.04) !important;
}

.envio-form-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 36px;
}

.envio-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.envio-orden-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.envio-orden-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--green);
    background: rgba(0,255,65,0.08);
    border: 1px solid rgba(0,255,65,0.2);
    border-radius: 50px;
    padding: 3px 10px;
}

.envio-orden-prod {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.envio-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.envio-nota {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0;
    line-height: 1.6;
}

.envio-form-btns {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.envio-submit {
    width: auto !important;
    padding: 12px 28px !important;
}

.panel-form-success {
    font-size: 13px;
    color: var(--green);
    text-align: center;
    margin: 0;
    min-height: 18px;
}