.panel-sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #1e90ff;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-transform: uppercase;
    overflow: hidden;
}

.sidebar-user-email {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-user-name {
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-plan {
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    text-transform: capitalize;
}

.sidebar-user form {
    margin: 0;
}

.sidebar-user-logout {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.sidebar-user-logout:hover {
    background: #1e90ff;
    border-color: #1e90ff;
    color: #fff;
}

.sidebar-user-logout i {
    font-size: 18px;
}

.topbar-right .dropdown {
    position: relative;
}

.topbar-right .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 200px;
}

.topbar-right .dropdown-toggle::after {
    margin-left: 0.75em;
}

.topbar-user-meta {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.topbar-user-plan {
    font-size: 11px;
    font-weight: 600;
    color: #1e90ff;
    text-transform: capitalize;
}

.dash-shorten {
    display: flex;
    align-items: center;
    gap: 28px;
}

.dash-shorten-head {
    flex-shrink: 0;
    max-width: 260px;
}

.dash-shorten-head h5 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.dash-shorten-sub {
    display: block;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.dash-shorten-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.dash-shorten-field {
    position: relative;
    flex: 1;
}

.dash-shorten-field i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
}

.dash-shorten-field .form-control {
    height: 52px;
    padding-left: 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 15px;
    box-shadow: none;
}

.dash-shorten-field .form-control:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, .12);
}

.dash-shorten-btn {
    height: 52px;
    padding: 0 26px;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .dash-shorten {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .dash-shorten-head {
        max-width: none;
    }
}

@media (max-width: 479.98px) {
    .dash-shorten-form {
        flex-wrap: wrap;
    }

    .dash-shorten-btn {
        width: 100%;
    }
}

.chart-wrap {
    position: relative;
    height: 260px;
}

.map-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2.8;
    max-height: 640px;
}

.map-wrap .jvm-zoom-btn {
    background: #1e90ff;
    border-radius: 6px;
    width: 22px;
    height: 22px;
    line-height: 14px;
    padding: 4px;
}

.map-wrap .jvm-zoom-btn.jvm-zoomin {
    top: 12px;
}

.map-wrap .jvm-zoom-btn.jvm-zoomout {
    top: 42px;
}

.plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.plan-option {
    margin: 0;
    cursor: pointer;
}

.plan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    transition: border-color .15s ease, background .15s ease;
}

.plan-option input:checked + .plan-option-body {
    border-color: #1e90ff;
    background: rgba(30, 144, 255, .12);
}

.plan-option input:focus-visible + .plan-option-body {
    outline: 2px solid #1e90ff;
    outline-offset: 2px;
}

.plan-option-name {
    font-weight: 600;
}

.plan-option-price {
    color: #1e90ff;
    font-size: 14px;
}

.plan-option-meta {
    font-size: 12px;
    opacity: .7;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: modalFadeIn .2s ease-out;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    margin: 0;
    pointer-events: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn .2s ease-out;
}

.modal-dialog-sm { max-width: 420px; }
.modal-dialog-md { max-width: 600px; }
.modal-dialog-lg { max-width: 800px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #192a56;
    color: #fff;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 600;
}

.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, .15);
}

.modal-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .8);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    color: #374151;
}

.modal-body p {
    margin: 0;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e8ecf1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer form {
    margin: 0;
    display: inline;
}

.modal-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.modal-btn-secondary {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #374151;
}

.modal-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.modal-btn-confirm {
    background: #1e90ff;
    color: #fff;
}

.modal-btn-confirm:hover {
    background: #1677d6;
}

.modal-danger .modal-btn-confirm {
    background: #dc2626;
}

.modal-danger .modal-btn-confirm:hover {
    background: #b91c1c;
}

.modal-warning .modal-btn-confirm {
    background: #ca8a04;
}

.modal-info .modal-btn-confirm {
    background: #3b82f6;
}

.modal-dialog > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 90vh;
}

.plan-options-modal .plan-option-body {
    border-color: #e2e8f0;
    background: #fff;
}

.plan-options-modal .plan-option-name {
    color: #1f2937;
}

.plan-options-modal .plan-option-meta {
    color: #6b7280;
    opacity: 1;
}

.plan-options-modal .plan-option input:checked + .plan-option-body {
    border-color: #1e90ff;
    background: rgba(30, 144, 255, .08);
}

.plan-option-current {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #1e90ff;
    background: rgba(30, 144, 255, .12);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

#toastContainer .toast {
    opacity: 1;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-left: 4px solid #1e90ff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
    animation: toastSlideIn .25s ease-out;
}

#toastContainer .toast--success { border-left-color: #16a34a; }
#toastContainer .toast--error { border-left-color: #dc2626; }
#toastContainer .toast--info { border-left-color: #1e90ff; }
#toastContainer .toast--undo { border-left-color: #475569; }

#toastContainer .toast.toast-exit {
    animation: toastSlideOut .25s ease-in forwards;
}

#toastContainer .toast__icon {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    margin-top: 1px;
}

#toastContainer .toast--success .toast__icon { color: #16a34a; }
#toastContainer .toast--error .toast__icon { color: #dc2626; }
#toastContainer .toast--info .toast__icon { color: #1e90ff; }
#toastContainer .toast--undo .toast__icon { color: #475569; }

#toastContainer .toast__content {
    flex: 1;
    min-width: 0;
}

#toastContainer .toast__title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

#toastContainer .toast__message {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.4;
    word-wrap: break-word;
}

#toastContainer .toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
}

#toastContainer .toast__close:hover { color: #475569; }

#toastContainer .toast__undo-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #1e90ff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}

#toastContainer .toast__undo-btn:hover { background: rgba(30, 144, 255, .1); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

.settings-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #eaedf1;
    flex-wrap: wrap;
}

.settings-tab {
    padding: 10px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.settings-tab:hover {
    color: #1e90ff;
    border-bottom-color: rgba(30, 144, 255, .35);
}

.settings-tab.active {
    color: #1e90ff;
    border-bottom-color: #1e90ff;
}

.panel-table .color-swatch,
.panel-table .tag-chip {
    vertical-align: middle;
}

.panel-table--closed tbody tr:last-child td {
    border-bottom: 1px solid #f0f2f5;
}

.detail-header .meta {
    align-items: center;
    flex-wrap: wrap;
}

.detail-header .meta-tags {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.detail-header .meta-tags .tag-chip {
    margin: 0;
}

.bill-status-card { border-left: 4px solid #1e90ff; }
.bill-status-card.bill-status-cancel { border-left-color: #e5a50a; }
.bill-status-card.bill-status-past_due { border-left-color: #dc3545; }
.bill-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bill-plan-name { font-size: 20px; font-weight: 700; color: #192a56; margin-bottom: 6px; }
.bill-price { font-size: 24px; font-weight: 700; color: #192a56; white-space: nowrap; }
.bill-price span { font-size: 14px; font-weight: 500; color: #888; }
.bill-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.bill-badge i { font-size: 13px; }
.bill-badge-active { background: #e6f7ec; color: #1a7f4b; }
.bill-badge-warning { background: #fdf3dd; color: #9a6f08; }
.bill-badge-danger { background: #fbe3e6; color: #b3263a; }
.bill-badge-muted { background: #eef0f4; color: #66708a; }
.bill-validity { margin: 18px 0; padding: 12px 16px; background: #f6f8fc; border-radius: 8px; color: #3b4666; font-size: 15px; }
.bill-validity strong { color: #192a56; }
.bill-days { display: block; margin-top: 4px; font-size: 13px; color: #7a839c; }
.bill-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bill-plan-list { display: flex; flex-direction: column; gap: 12px; }
.bill-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border: 1px solid #e7eaf0; border-radius: 10px; flex-wrap: wrap; transition: border-color .15s ease, box-shadow .15s ease; }
.bill-plan-row:hover { border-color: #bcd6f5; box-shadow: 0 2px 12px rgba(30, 144, 255, .07); }
.bill-plan-row-main { flex: 1 1 300px; min-width: 0; }
.bill-plan-row-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bill-plan-row-name { font-size: 17px; font-weight: 700; color: #192a56; }
.bill-plan-row-price { font-size: 17px; font-weight: 700; color: #1e90ff; }
.bill-plan-row-price span { font-size: 13px; font-weight: 500; color: #9aa3b5; }
.bill-plan-row-feats { color: #5a6480; font-size: 13.5px; margin-top: 6px; }
.bill-plan-row-form { margin: 0; }
.bill-plan-row-btn { width: 200px; text-align: left; white-space: nowrap; }
@media (max-width: 560px) {
    .bill-plan-row-form, .bill-plan-row-btn { width: 100%; }
}
.bill-history-table td .bill-link { color: #1e90ff; text-decoration: none; white-space: nowrap; }
.bill-history-table td .bill-link:hover { text-decoration: underline; }
.bill-empty { text-align: center; padding: 40px 16px; color: #8a93a8; }
.bill-empty i { font-size: 40px; display: block; margin-bottom: 10px; color: #c3cad8; }
.bill-landing { max-width: 520px; margin: 60px auto; text-align: center; }
.bill-landing h4 { color: #192a56; margin-bottom: 10px; }
.bill-landing-icon { font-size: 56px; color: #1e90ff; display: block; margin-bottom: 16px; }
.bill-spinner { width: 48px; height: 48px; margin: 0 auto 22px; border: 4px solid #e3e8f2; border-top-color: #1e90ff; border-radius: 50%; animation: bill-spin 0.9s linear infinite; }
@keyframes bill-spin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: 0.7; pointer-events: none; position: relative; }
.bill-badge-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eaf4ff; color: #1364b6; text-decoration: none; }
.bill-badge-chip:hover { background: #d8ebff; }
@media (max-width: 640px) {
    .bill-history-table thead { display: none; }
    .bill-history-table, .bill-history-table tbody, .bill-history-table tr, .bill-history-table td { display: block; width: 100%; }
    .bill-history-table tr { border: 1px solid #e7eaf0; border-radius: 8px; margin-bottom: 10px; padding: 6px 10px; }
    .bill-history-table td { display: flex; justify-content: space-between; gap: 12px; text-align: right !important; border: none; padding: 6px 0; }
    .bill-history-table td::before { content: attr(data-label); font-weight: 600; color: #66708a; text-align: left; }
}

.usage-meter { background: #fff; border: 1px solid #e7eaf0; border-radius: 10px; padding: 14px 18px; margin-bottom: 24px; }
.usage-meter-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.usage-meter-label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: #192a56; }
.usage-meter-label i { color: #1e90ff; font-size: 16px; }
.usage-meter-count { font-size: 14px; color: #66708a; white-space: nowrap; }
.usage-meter-count strong { color: #192a56; font-size: 15px; }
.usage-meter-inf { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: #eaf4ff; color: #1364b6; font-size: 12px; font-weight: 600; }
.usage-meter-inf i { font-size: 13px; }
.usage-meter-track { height: 8px; margin-top: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.usage-meter-fill { display: block; height: 100%; border-radius: 999px; background: #1e90ff; transition: width .3s ease; }
.usage-meter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.usage-meter-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #7a839c; }
.usage-meter-note i { font-size: 14px; }
.usage-meter-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: #1e90ff; text-decoration: none; }
.usage-meter-link:hover { text-decoration: underline; }
.usage-meter--warn .usage-meter-fill { background: #e0a106; }
.usage-meter--warn .usage-meter-note { color: #9a6f08; }
.usage-meter--full .usage-meter-fill { background: #d63b50; }
.usage-meter--full .usage-meter-note { color: #b3263a; }
.usage-meter--full .usage-meter-link { color: #b3263a; }
