*{box-sizing:border-box}
body{
    margin:0;
    background:#eef2f6;
    color:#243447;
    font:14px Arial,sans-serif;
}
header{
    background:#142438;
    color:#fff;
    padding:20px 25px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px;
}
header h1{font-size:23px;margin:0}
nav{
    background:#20364e;
    padding:12px 25px;
    display:flex;
    flex-wrap:wrap;
    gap:20px;
}
nav a{color:#fff;text-decoration:none}
nav a:hover{color:#77c9ff}
main{max-width:1600px;margin:auto;padding:22px}
h2{font-size:21px;margin-top:0}
.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:15px;
    margin-bottom:22px;
}
.card,.panel{
    background:#fff;
    border:1px solid #dce3eb;
    border-radius:8px;
    padding:20px;
    box-shadow:0 2px 5px rgba(0,0,0,.04);
}
.panel{margin-bottom:20px}
.number{font-size:32px;font-weight:bold;margin-top:10px}
.green,.active{color:#168344}
.red,.expired{color:#c53030}
.orange{color:#d97706}
.disabled{color:#6b7280}
.blue{color:#2465b5}
.badge{
    display:inline-block;
    background:#d97706;
    color:#fff;
    padding:6px 10px;
    border-radius:4px;
    font-size:12px;
    font-weight:bold;
}
table{border-collapse:collapse;width:100%;background:#fff}
th,td{
    text-align:left;
    padding:11px 10px;
    border-bottom:1px solid #e5e9ef;
    white-space:nowrap;
}
th{background:#f3f6fa;color:#475569}
tbody tr:hover{background:#f5faff}
.scroll{overflow-x:auto}
button,.button{
    display:inline-block;
    background:#2266ad;
    color:#fff;
    border:0;
    padding:10px 16px;
    border-radius:5px;
    cursor:pointer;
    text-decoration:none;
    font-size:14px;
}
button:hover,.button:hover{background:#184f88}
button.danger{background:#bb3434}
button.secondary{background:#64748b}
input,select{
    width:100%;
    padding:10px;
    border:1px solid #bbc8d6;
    border-radius:5px;
    font:inherit;
    background:#fff;
}
label{display:block;margin:12px 0 6px}
.login{
    max-width:410px;
    margin:85px auto;
    background:#fff;
    padding:30px;
    border:1px solid #dae2ec;
    border-radius:10px;
}
.login button{width:100%;margin-top:20px}
.error{
    background:#fff0f0;
    border:1px solid #edbaba;
    color:#b91c1c;
    padding:12px;
    margin-bottom:15px;
}
.form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:18px;
}
.inline{display:inline-block;margin:4px}
.muted{color:#64748b}
footer{color:#64748b;text-align:center;padding:20px}
@media(max-width:600px){
    main{padding:10px}
    header{padding:15px}
    .panel{padding:12px}
    .login{margin:30px 10px}
}


/* Dashboard links */

.dashboard-link {
    display:block;
    color:inherit;
    text-decoration:none;
    transition:transform .15s,box-shadow .15s;
}

.dashboard-link:hover {
    transform:translateY(-3px);
    box-shadow:0 5px 15px rgba(0,0,0,.16);
}

.card-blue {border-top:5px solid #2563eb}
.card-green {border-top:5px solid #15803d}
.card-red {border-top:5px solid #b91c1c}
.card-orange {border-top:5px solid #b45309}

/* Customer status rows */

tr.customer-active,
tr.customer-active:hover {
    background:#187a40;
    color:#fff;
}

tr.customer-expired,
tr.customer-expired:hover {
    background:#b91c1c;
    color:#fff;
}

tr.customer-disabled,
tr.customer-disabled:hover {
    background:#a84b08;
    color:#fff;
}

tr.customer-active td,
tr.customer-expired td,
tr.customer-disabled td {
    color:#fff;
    border-bottom:1px solid rgba(255,255,255,.25);
}

tr.customer-active td a:not(.button),
tr.customer-expired td a:not(.button),
tr.customer-disabled td a:not(.button) {
    color:#fff;
    font-weight:bold;
}

tr[class^="customer-"] .button {
    background:#fff;
    color:#243447;
    padding:7px 12px;
}

tr[class^="customer-"] .delete-button {
    background:#641818;
    color:#fff;
    margin-left:4px;
}

tr[class^="customer-"] .delete-button:hover {
    background:#450a0a;
}

/* Filters */

.filter-bar {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:18px;
}

.filter-all {background:#2563eb}
.filter-active {background:#187a40}
.filter-expired {background:#b91c1c}
.filter-disabled {background:#a84b08}

.filter-bar .selected {
    outline:2px solid #334155;
    outline-offset:2px;
}

/* Deletion confirmation */

.delete-panel {
    max-width:650px;
    border-top:5px solid #b91c1c;
}

.delete-confirm {
    padding:15px;
    background:#f1f5f9;
    border-radius:5px;
    margin-bottom:20px;
}

.button.secondary {
    background:#64748b;
}

/* Live customer search */

.customer-toolbar {
    display:flex;
    align-items:center;
    gap:10px;
    margin:15px 0;
}

.customer-toolbar input {
    flex:1;
    min-width:0;
    padding:13px 15px;
    font-size:16px;
    border:2px solid #94a3b8;
    border-radius:6px;
}

.customer-toolbar input:focus {
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.search-info {
    color:#475569;
    font-size:14px;
    font-weight:bold;
    margin-bottom:12px;
}

.pagination {
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:6px;
    padding-top:20px;
}

.pagination button {
    min-width:40px;
    height:40px;
    padding:8px 12px;
    background:#e2e8f0;
    color:#243447;
    font-weight:bold;
}

.pagination button:hover {
    background:#cbd5e1;
}

.pagination button.page-active {
    background:#2266ad;
    color:#fff;
}

.pagination button:disabled {
    opacity:.35;
    cursor:default;
}

.no-results {
    padding:25px;
    text-align:center;
    color:#64748b;
    font-weight:bold;
}



/* ANDMANBIL_CUSTOMER_EDIT_V2 */

.customer-edit {
    padding:24px;
    border-radius:14px;
    box-shadow:0 5px 20px rgba(20,36,56,.08);
}

.customer-edit .edit-header {
    display:flex;
    align-items:center;
    gap:18px;
    padding:24px;
    border-radius:12px;
    color:#fff;
    margin-bottom:25px;
    background:linear-gradient(120deg,#142438,#284b70);
    box-shadow:0 5px 14px rgba(0,0,0,.13);
}

.customer-edit .edit-status-active {
    background:linear-gradient(120deg,#14532d,#198754);
}

.customer-edit .edit-status-expired {
    background:linear-gradient(120deg,#7f1d1d,#dc2626);
}

.customer-edit .edit-status-disabled {
    background:linear-gradient(120deg,#78350f,#d97706);
}

.customer-edit .edit-avatar {
    width:58px;
    height:58px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    background:rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.25);
    border-radius:12px;
}

.customer-edit .edit-identity {
    flex:1;
    min-width:0;
}

.customer-edit .edit-kicker {
    font-size:10px;
    font-weight:bold;
    letter-spacing:2px;
    opacity:.8;
}

.customer-edit .edit-header h2 {
    color:#fff;
    font-size:24px;
    margin:7px 0;
    overflow-wrap:break-word;
}

.customer-edit .edit-identity-meta {
    font-size:14px;
    opacity:.92;
}

.customer-edit .edit-status {
    background:rgba(255,255,255,.19);
    border:1px solid rgba(255,255,255,.35);
    padding:9px 14px;
    border-radius:6px;
    font-weight:bold;
    letter-spacing:.7px;
}

.customer-edit .edit-network,
.customer-edit .edit-subscription {
    background:linear-gradient(145deg,#f8fafc,#eaf0f7);
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:20px;
    margin-bottom:25px;
}

.customer-edit .edit-network h3,
.customer-edit .edit-subscription h3 {
    margin:0 0 14px;
    color:#20364e;
    font-size:15px;
    letter-spacing:1px;
}

.customer-edit .edit-network-grid,
.customer-edit .edit-subscription-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
}

.customer-edit .edit-network-footer {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
    margin-top:16px;
}

.customer-edit .edit-lock {
    display:inline-block;
    padding:7px 11px;
    border-radius:5px;
    font-size:12px;
    font-weight:bold;
}

.customer-edit .lock-off {
    color:#92400e;
    background:#fef3c7;
    border:1px solid #fcd34d;
}

.customer-edit .lock-on {
    color:#166534;
    background:#dcfce7;
    border:1px solid #86efac;
}

.customer-edit .edit-section-title {
    color:#475569;
    font-size:12px;
    font-weight:bold;
    letter-spacing:1.7px;
    margin:0 0 14px;
}

.customer-edit .edit-speed-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
    margin-bottom:25px;
}

.customer-edit .edit-speed {
    padding:20px;
    border:1px solid;
    border-top-width:5px;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(15,23,42,.07);
    transition:transform .18s,box-shadow .18s;
}

.customer-edit .edit-speed:hover {
    transform:translateY(-3px);
    box-shadow:0 10px 22px rgba(15,23,42,.13);
}

.customer-edit .speed-bg {
    background:linear-gradient(150deg,#f0fdf4,#dcfce7);
    border-color:#86c99e;
    border-top-color:#168344;
    color:#14532d;
}

.customer-edit .speed-int {
    background:linear-gradient(150deg,#fff7ed,#ffedd5);
    border-color:#efb578;
    border-top-color:#d97706;
    color:#9a3412;
}

.customer-edit .speed-up {
    background:linear-gradient(150deg,#eff6ff,#dbeafe);
    border-color:#91b9e9;
    border-top-color:#2563eb;
    color:#1e40af;
}

.customer-edit .speed-heading {
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

.customer-edit .speed-heading h3 {
    margin:0 0 4px;
    font-size:16px;
    font-weight:bold;
}

.customer-edit .speed-heading small {
    font-size:12px;
    opacity:.8;
}

.customer-edit .speed-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    flex-shrink:0;
    background:rgba(255,255,255,.65);
    border-radius:10px;
    font-size:25px;
    font-weight:bold;
}

.customer-edit .speed-preview {
    background:rgba(255,255,255,.68);
    padding:16px 10px;
    text-align:center;
    border-radius:9px;
    margin-bottom:18px;
    border:1px solid rgba(255,255,255,.85);
}

.customer-edit .speed-preview span {
    font-size:36px;
    font-weight:bold;
    font-variant-numeric:tabular-nums;
}

.customer-edit .speed-preview small {
    font-size:12px;
    font-weight:bold;
}

.customer-edit label {
    font-size:12px;
    font-weight:bold;
    letter-spacing:.35px;
    margin:14px 0 7px;
}

.customer-edit input:not([type="checkbox"]) {
    height:45px;
    font-size:17px;
    font-weight:bold;
    border:1px solid #aebdce;
    border-radius:7px;
    color:#243447;
    transition:border-color .15s,box-shadow .15s;
}

.customer-edit input[readonly] {
    background:#e2e8f0;
    color:#475569;
}

.customer-edit input:focus {
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

.customer-edit .speed-bg input:focus {
    border-color:#168344;
    box-shadow:0 0 0 4px rgba(22,131,68,.15);
}

.customer-edit .speed-int input:focus {
    border-color:#d97706;
    box-shadow:0 0 0 4px rgba(217,119,6,.15);
}

.customer-edit .edit-access {
    display:flex;
    align-items:center;
    padding:14px 18px;
    background:#fff;
    border:1px solid #cbd5e1;
    border-radius:8px;
}

.customer-edit .edit-access label {
    display:flex;
    align-items:center;
    gap:12px;
    margin:0;
    font-size:15px;
}

.customer-edit .edit-access input {
    width:22px !important;
    height:22px;
    accent-color:#168344;
    cursor:pointer;
}

.customer-edit .edit-actions {
    display:flex;
    align-items:center;
    gap:12px;
    padding-top:18px;
    border-top:1px solid #dce3eb;
}

.customer-edit .edit-actions .edit-save {
    background:linear-gradient(135deg,#168344,#116530);
    box-shadow:0 3px 9px rgba(22,131,68,.24);
    font-weight:bold;
    padding:13px 24px;
    border-radius:7px;
}

.customer-edit .edit-actions .edit-save:hover {
    background:#115c2e;
}

.customer-edit .edit-actions a {
    background:#64748b;
    padding:13px 22px;
    border-radius:7px;
}

.customer-edit .edit-actions a:hover {
    background:#475569;
}

@media(max-width:900px) {
    .customer-edit .edit-speed-grid {
        grid-template-columns:1fr;
    }
}

@media(max-width:600px) {
    .customer-edit {
        padding:12px;
    }

    .customer-edit .edit-header {
        padding:16px;
        flex-wrap:wrap;
        gap:12px;
    }

    .customer-edit .edit-header h2 {
        font-size:20px;
    }

    .customer-edit .edit-network-grid,
    .customer-edit .edit-subscription-grid {
        grid-template-columns:1fr;
        gap:10px;
    }

    .customer-edit .edit-speed {
        padding:16px;
    }

    .customer-edit .edit-actions button,
    .customer-edit .edit-actions a {
        flex:1;
        text-align:center;
    }
}

@media(prefers-reduced-motion:reduce) {
    .customer-edit * {
        transition:none !important;
        transform:none !important;
    }
}


/* ANDMANBIL_EDIT_BG_IP_V3 */

.customer-edit .ip-check {
    margin-top:9px;
    padding:11px 13px;
    border-radius:7px;
    font-size:13px;
    font-weight:bold;
    overflow-wrap:break-word;
}

.customer-edit .ip-check-ok {
    background:#dcfce7;
    border:1px solid #86efac;
    color:#166534;
}

.customer-edit .ip-check-error {
    background:#fee2e2;
    border:1px solid #fca5a5;
    color:#991b1b;
}

.customer-edit .ip-check-wait {
    background:#fef3c7;
    border:1px solid #fcd34d;
    color:#92400e;
}

.customer-edit .edit-save:disabled {
    background:#94a3b8;
    color:#f8fafc;
    opacity:.7;
    cursor:not-allowed;
    box-shadow:none;
}

