/* =========================
   CONTENEDOR PRINCIPAL
========================= */

.price-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 50px;
    min-height: 90vh;
    box-sizing: border-box;
}

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

.price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 25px;
}

.price-header h1 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
}

/* BOTÓN ADD */

.btn-add-price {
    background: #cd1218;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
    white-space: nowrap;
}

.btn-add-price:hover {
    background: #a70e14;
}

/* =========================
   CARDS
========================= */

.price-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(100px, .8fr) minmax(120px, .8fr) auto;
    align-items: center;
    gap: 20px;

    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    box-sizing: border-box;
}

.price-col {
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.price-type {
    font-weight: 800;
    color: #111;
}

.price-money {
    font-size: 17px;
    font-weight: 800;
    color: #cd1218;
    white-space: nowrap;
}

/* =========================
   ACCIONES
========================= */

.price-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.price-actions form {
    margin: 0;
}

/* SWITCH */

.switch-btn {
    width: 44px;
    height: 24px;
    border-radius: 50px;
    border: none;
    background: #ccc;
    position: relative;
    cursor: pointer;
    transition: .25s;
    padding: 0;
    flex: 0 0 auto;
}

.switch-btn span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
}

.switch-btn.active {
    background: #cd1218;
}

.switch-btn.active span {
    left: 23px;
}

/* BOTONES CIRCULARES */

.btn-circle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: .25s;
}

.btn-edit {
    background: #f4f4f4;
}

.btn-edit:hover {
    background: #ddd;
}

.btn-delete {
    background: #ffe6e6;
}

.btn-delete:hover {
    background: #ffcccc;
}

/* =========================
   EMPTY
========================= */

.price-empty {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    text-align: center;
    color: #777;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

/* =========================
   ALERTS
========================= */

.price-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.price-alert.success {
    background: #e8f7ed;
    color: #1c7c3c;
}

.price-alert.error {
    background: #fdeaea;
    color: #a11919;
}

/* =========================
   MODAL
========================= */

.price-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 18px;
    box-sizing: border-box;
}

.price-modal.is-open {
    display: flex;
}

.price-modal-box {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-sizing: border-box;
}

.price-modal-box h2 {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 800;
}

/* CLOSE */

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
}

/* FORM */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* SAVE */

.btn-save {
    width: 100%;
    background: #cd1218;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.btn-save:hover {
    background: #a70e14;
}

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

/* Laptops medianas */
@media (max-width: 1200px) {
    .price-page {
        padding: 70px 18px 45px;
    }

    .price-card {
        grid-template-columns: minmax(160px, 1.4fr) minmax(90px, .7fr) minmax(115px, .7fr) auto;
        gap: 14px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .price-page {
        padding: 40px 18px 40px;
    }

    .price-card {
        grid-template-columns: 1fr 1fr;
        gap: 14px 18px;
    }

    .price-type {
        grid-column: 1 / 2;
    }

    .price-money {
        text-align: right;
    }

    .price-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }
}

/* Mobile grande */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px;
    }

    .price-page {
        padding: 28px 0 36px;
    }

    .price-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .price-header h1 {
        font-size: 26px;
    }

    .btn-add-price {
        width: 100%;
        justify-content: center;
    }

    .price-card {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 10px;
    }

    .price-col {
        font-size: 14px;
    }

    .price-money {
        text-align: left;
        font-size: 18px;
    }

    .price-actions {
        justify-content: space-between;
        padding-top: 12px;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .dashboard-content {
        padding: 14px;
    }

    .price-page {
        padding: 22px 0 30px;
    }

    .price-header h1 {
        font-size: 22px;
    }

    .price-card {
        border-radius: 12px;
        padding: 16px;
    }

    .price-actions {
        gap: 8px;
    }

    .btn-circle {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .switch-btn {
        width: 42px;
        height: 23px;
    }

    .switch-btn.active span {
        left: 21px;
    }

    .price-modal-box {
        padding: 24px 18px;
        border-radius: 14px;
    }
}

.ahd-month-plans {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ahd-month-plan {
    border: 1px solid #cd1218;
    background: #fff;
    color: #cd1218;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.ahd-month-plan:hover,
.ahd-month-plan.is-active {
    background: #cd1218;
    color: #fff;
}
