/* ============================================
   ÓRDENES DE PAGO - DASHBOARD ESTUDIANTE
   ============================================ */

.student-orders-wrapper {
    width: 100%;
}

/* Header card */
.student-orders-header {
    background: linear-gradient(135deg, #2a14b8 0%, #6d4ef5 100%);
    border-radius: clamp(10px, 2vw, 16px);
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.75rem);
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    color: #fff;
}

.student-orders-title {
    font-size: clamp(1.05rem, 3.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 .2rem;
    color: #fff;
}

.student-orders-subtitle {
    font-size: clamp(.75rem, 2.2vw, .88rem);
    opacity: .85;
    margin: 0;
}

/* Search + filter bar */
.student-orders-controls {
    background: #fff;
    border-radius: clamp(10px, 2vw, 14px);
    padding: clamp(.75rem, 2vw, 1rem) clamp(.85rem, 2.5vw, 1.25rem);
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    margin-bottom: clamp(.85rem, 2vw, 1.25rem);
    display: flex;
    gap: clamp(.5rem, 1.5vw, .85rem);
    flex-wrap: wrap;
    align-items: center;
}

.student-orders-search {
    position: relative;
    flex: 1 1 clamp(200px, 50%, 400px);
    display: flex;
    align-items: center;
    background: #f8f9ff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s;
}

.student-orders-search:focus-within {
    border-color: #6d4ef5;
    box-shadow: 0 0 0 3px rgba(109,78,245,.08);
}

.student-orders-search i {
    position: absolute;
    left: clamp(.65rem, 1.5vw, .9rem);
    color: #adb5bd;
    font-size: clamp(.82rem, 2vw, .95rem);
    pointer-events: none;
}

.student-orders-search ._search-input {
    border: none;
    background: transparent;
    padding: clamp(.45rem, 1.5vw, .6rem) clamp(.5rem, 1vw, .75rem) clamp(.45rem, 1.5vw, .6rem) clamp(2rem, 4vw, 2.4rem);
    font-size: clamp(.8rem, 2.2vw, .9rem);
    flex: 1;
    outline: none;
    color: #343a40;
}

.student-orders-search-btn {
    background: linear-gradient(135deg, #2a14b8, #6d4ef5);
    color: #fff;
    border: none;
    padding: clamp(.45rem, 1.2vw, .6rem) clamp(.75rem, 2vw, 1.1rem);
    font-size: clamp(.78rem, 2vw, .88rem);
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.student-orders-search-btn:hover { opacity: .88; }

.student-orders-filter {
    position: relative;
    flex: 0 1 clamp(170px, 35%, 220px);
    display: flex;
    align-items: center;
    background: #f8f9ff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.student-orders-filter i {
    position: absolute;
    left: clamp(.65rem, 1.5vw, .9rem);
    color: #adb5bd;
    font-size: clamp(.82rem, 2vw, .9rem);
    pointer-events: none;
}

.student-orders-filter select {
    border: none;
    background: transparent;
    padding: clamp(.45rem, 1.5vw, .6rem) clamp(.5rem, 1vw, .75rem) clamp(.45rem, 1.5vw, .6rem) clamp(2rem, 4vw, 2.4rem);
    font-size: clamp(.8rem, 2.2vw, .9rem);
    width: 100%;
    outline: none;
    cursor: pointer;
    color: #343a40;
}

/* Table card */
.student-orders-table {
    background: #fff;
    border-radius: clamp(10px, 2vw, 16px);
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    overflow: visible;
}

/* Desktop column headers */
.student-orders-col-headers {
    display: none;
    background: #f8f9fa;
    padding: clamp(.6rem, 1.5vw, .85rem) clamp(1rem, 2.5vw, 1.25rem);
    border-bottom: 2px solid #e9ecef;
    border-radius: clamp(10px, 2vw, 16px) clamp(10px, 2vw, 16px) 0 0;
    font-size: clamp(.72rem, 1.8vw, .8rem);
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@media (min-width: 640px) {
    .student-orders-col-headers { display: flex; align-items: center; }
}

.soc-num   { flex: 0 0 clamp(90px, 18%, 130px); }
.soc-desc  { flex: 1; }
.soc-total { flex: 0 0 clamp(70px, 12%, 100px); text-align: center; }
.soc-state { flex: 0 0 clamp(100px, 16%, 140px); text-align: center; }
.soc-acts  { flex: 0 0 clamp(50px, 8%, 70px); text-align: center; }

/* Order item */
.student-order-item {
    padding: clamp(.85rem, 2.5vw, 1.1rem) clamp(1rem, 2.5vw, 1.25rem);
    border-bottom: 1px solid #f1f3f5;
    transition: background .18s;
}

.student-order-item:last-child { border-bottom: none; border-radius: 0 0 clamp(10px, 2vw, 16px) clamp(10px, 2vw, 16px); }
.student-order-item:hover { background: #f8f7ff; }

/* Mobile: card layout */
.student-order-item-inner {
    display: flex;
    flex-direction: column;
    gap: clamp(.5rem, 1.5vw, .65rem);
}

@media (min-width: 640px) {
    .student-order-item-inner {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }
}

/* Fields */
.soi-num {
    flex: 0 0 clamp(90px, 18%, 130px);
}

.soi-desc {
    flex: 1;
    min-width: 0;
}

.soi-total {
    flex: 0 0 clamp(70px, 12%, 100px);
    text-align: left;
}

.soi-state {
    flex: 0 0 clamp(100px, 16%, 140px);
}

.soi-acts {
    flex: 0 0 clamp(50px, 8%, 70px);
    text-align: center;
}

@media (min-width: 640px) {
    .soi-total { text-align: center; }
    .soi-state { text-align: center; }
}

/* Mobile field labels */
.soi-label {
    display: inline-block;
    font-size: clamp(.68rem, 1.8vw, .75rem);
    font-weight: 600;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .1rem;
}

@media (min-width: 640px) {
    .soi-label { display: none; }
}

/* Order number */
.soi-order-number {
    font-family: 'Courier New', monospace;
    font-size: clamp(.78rem, 2.2vw, .88rem);
    font-weight: 700;
    color: #495057;
    background: #e9ecef;
    padding: clamp(3px, .8vw, 5px) clamp(7px, 1.5vw, 11px);
    border-radius: 7px;
    display: inline-block;
}

/* Description */
.soi-desc-text {
    font-size: clamp(.8rem, 2.2vw, .9rem);
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.soi-desc-icon {
    width: clamp(26px, 5vw, 34px);
    height: clamp(26px, 5vw, 34px);
    border-radius: 8px;
    background: linear-gradient(135deg, #eef0ff, #e8e4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.soi-desc-icon i {
    color: #6d4ef5;
    font-size: clamp(.75rem, 1.8vw, .9rem);
}

/* Amount */
.soi-amount {
    font-size: clamp(.88rem, 2.5vw, 1rem);
    font-weight: 700;
    color: #1e7e34;
}

/* Status badges */
.soi-badge-pending   { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.soi-badge-completed { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.soi-badge-error     { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.soi-badge-verifying { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.soi-badge-expired   { background: #e9ecef; color: #495057; border: 1px solid #dee2e6; }

.soi-badge-pending, .soi-badge-completed, .soi-badge-error,
.soi-badge-verifying, .soi-badge-expired {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: clamp(3px,.8vw,5px) clamp(8px,1.5vw,12px);
    border-radius: 20px;
    font-size: clamp(.7rem, 1.8vw, .8rem);
    font-weight: 600;
    white-space: nowrap;
}

/* Actions dropdown */
.soi-dropdown .dropdown-toggle {
    background: transparent;
    border: 1.5px solid #dee2e6;
    color: #6c757d;
    padding: clamp(4px, 1vw, 7px) clamp(8px, 1.5vw, 11px);
    border-radius: 8px;
    transition: all .2s;
    font-size: clamp(.82rem, 2vw, .92rem);
}

.soi-dropdown .dropdown-toggle:hover {
    background: #6d4ef5;
    color: #fff;
    border-color: #6d4ef5;
}

.soi-dropdown .dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    border: none;
    padding: 6px;
    font-size: clamp(.8rem, 2vw, .88rem);
}

.soi-dropdown .dropdown-item {
    border-radius: 7px;
    padding: clamp(6px, 1.5vw, 9px) clamp(10px, 2vw, 14px);
    transition: background .18s;
}

.soi-dropdown .dropdown-item:hover {
    background: #f0eeff;
    color: #6d4ef5;
}

/* Loading / empty */
.student-orders-loading {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1rem;
    color: #6c757d;
}

.student-orders-empty {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1rem;
}

.student-orders-empty i {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #dee2e6;
    margin-bottom: .85rem;
    display: block;
}

.student-orders-empty p {
    font-size: clamp(.88rem, 2.2vw, 1rem);
    color: #6c757d;
}
