/* ===============================
   SUBSCRIBER PAGE LAYOUT
   =============================== */

.subscriber-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* Header must align with cards */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
}

/* Buttons inline, no wrapping */
.page-header > div {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Desktop grid */
@media (min-width: 900px) {
    .subscriber-container {
        grid-template-columns: 2fr 1fr;
    }

    /* Header full width */
    .page-header {
        grid-column: 1 / -1;
    }

    /* Customer Info full width */
    .subscriber-container > .card:first-of-type {
        grid-column: 1 / -1;
    }

    /* Package left */
    .subscriber-container > .card:nth-of-type(2) {
        grid-column: 1 / 2;
    }

    /* Usage right */
    .subscriber-container > .card:nth-of-type(3) {
        grid-column: 2 / 3;
    }
}

/* ===============================
   CARD COMPACTNESS
   =============================== */

.card {
    padding: 14px 16px;
}

.card h3 {
    margin-bottom: 10px;
}

/* Key-value rows tighter */
.kv {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.kv label {
    font-size: 13px;
    color: #6b7280;
}

.kv strong {
    font-size: 14px;
}

/* Usage tiles */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.usage-grid div {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
/* ================================
   MODAL OVERLAY (GLOBAL FIX)
================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* hidden state */
.modal.hidden {
    display: none;
}

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

.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: modalFade 0.25s ease-out;
}

/* title */
.modal-box h3 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
}

/* ================================
   FORM ELEMENTS
================================ */

.modal-box input,
.modal-box select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    font-size: 14px;
    outline: none;
}

.modal-box input:focus,
.modal-box select:focus {
    border-color: #4f46e5;
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* ================================
   ANIMATION
================================ */

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
