/* ===== Origami Invoice - Minimal App Styles ===== */
/* Only styles Bootstrap 5 cannot handle natively */

/* 1. Number input spinner removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* 2. SweetAlert z-index fix */
.swal2-container { z-index: 20000 !important; }
.swal2-popup { z-index: 20001 !important; }

/* 3. Dashboard stat cards */
.stat-card {
    height: 100%;
}
.stat-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.stat-label {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.5rem 0;
}
.stat-detail {
    background-color: var(--bs-light);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: auto;
}
.trend-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* 4. Empty state */
.empty-state {
    text-align: center;
    padding: 2rem 1.25rem;
    color: var(--bs-secondary-color);
}
.empty-state i {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 0.625rem;
    display: block;
}

/* 5. Month calendar filter */
.month-filter-btn {
    white-space: nowrap;
    padding: 0.375rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}
.month-filter-btn .month-name {
    font-size: 0.8rem;
    font-weight: 700;
}
.month-filter-btn .month-year {
    font-size: 0.65rem;
    opacity: 0.85;
}

/* 6. Subscription modal wide */
#subscriptionModal .modal-subscription-wide {
    max-width: 55vw;
}
@media (max-width: 992px) {
    #subscriptionModal .modal-subscription-wide { max-width: 98vw; }
}
@media (max-width: 576px) {
    #subscriptionModal .modal-subscription-wide { max-width: 100vw; margin: 0.5rem; }
}

/* 7. Profile info rows */
.profile-info-row {
    display: flex;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    align-items: center;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label {
    flex: 0 0 35%;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
}
.profile-info-label i { margin-right: 0.5rem; opacity: 0.7; }
.profile-info-value {
    flex: 1;
    font-size: 0.9375rem;
}

/* 8. Summary items (subscriber show page) */
.summary-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}
.summary-item:last-of-type { border-bottom: none; }
.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.summary-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 9. Contact item (subscriber show) */
.contact-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bs-light);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}
.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

/* 10. Rank badge (dashboard top schools) */
.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* 11. Promotion components */
.promo-summary-card {
    background: var(--bs-light);
    border-radius: 0.5rem;
    padding: 1rem;
}
.promo-summary-label {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.promo-summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.25rem;
}
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.promo-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: border-color 0.2s;
}
.promo-card.is-eligible {
    border-color: var(--bs-success);
    background-color: rgba(var(--bs-success-rgb), 0.03);
}
.promo-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    text-transform: uppercase;
}
.promo-pill.ok { background-color: rgba(var(--bs-success-rgb), 0.15); color: var(--bs-success); }
.promo-pill.locked { background-color: rgba(var(--bs-secondary-rgb), 0.15); color: var(--bs-secondary); }
.promo-pill.claim { background-color: rgba(var(--bs-info-rgb), 0.15); color: var(--bs-info); }
.promo-progress {
    height: 6px;
    background: var(--bs-border-color);
    border-radius: 3px;
    overflow: hidden;
}
.promo-progress-bar {
    height: 100%;
    background: var(--bs-primary);
    border-radius: 3px;
    transition: width 0.3s;
}
.promo-req-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}
.promo-req-row:last-child { border-bottom: none; }
.promo-claim-btn {
    width: 100%;
    margin-top: 0.75rem;
}

/* 12. Mobile adjustments */
@media (max-width: 768px) {
    .stat-value { font-size: 1.4rem; }
    .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-info-label {
        flex: 1;
        margin-bottom: 0.25rem;
    }
}

/* 12. Print styles */
@media print {
    .btn, .card-header, .page-header, .pc-sidebar, .pc-header, .pc-footer { display: none !important; }
    .card { box-shadow: none; border: 1px solid #dee2e6; }
}
