:root{
    color-scheme:dark;
    --bg:#08090d;
    --card:rgba(14,16,24,.82);
    --soft:rgba(255,255,255,.055);
    --line:rgba(255,255,255,.105);
    --line-strong:rgba(255,255,255,.18);
    --text:#fff6ec;
    --muted:#b9bdc8;
    --muted2:#7e8799;
    --red:#ff2a1f;
    --red2:#ff6a37;
    --blue:#28aaff;
    --green:#39e59b;
    --amber:#ffd166;
    --danger:#ff6b6b;
    --radius:24px;
    --shadow:0 26px 80px rgba(0,0,0,.46);
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--bg)}
body{
    min-height:100vh;
    margin:0;
    font-family:Vazirmatn,Tahoma,Arial,sans-serif;
    color:var(--text);
    background:#08090d;
    overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{border:0}

.page-bg{
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:
        radial-gradient(circle at 20% 8%,rgba(255,42,31,.22),transparent 30%),
        radial-gradient(circle at 82% 5%,rgba(40,170,255,.20),transparent 30%),
        radial-gradient(circle at 50% 100%,rgba(255,106,55,.11),transparent 35%),
        linear-gradient(145deg,#05060a,#10131b 52%,#06070b);
}
.page-bg::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(to bottom,rgba(255,255,255,.03),transparent 18%,rgba(0,0,0,.44));
}

.app-shell{
    width:min(520px,calc(100% - 28px));
    min-height:100vh;
    margin:0 auto;
    padding:46px 0 22px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.brand-card{
    text-align:center;
    margin-bottom:18px;
}
.brand-link{
    width:136px;
    height:136px;
    margin:0 auto 18px;
    display:grid;
    place-items:center;
    border-radius:34px;
    background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.035));
    border:1px solid var(--line-strong);
    box-shadow:0 0 46px rgba(255,42,31,.19),0 0 52px rgba(40,170,255,.12),var(--shadow);
    overflow:hidden;
}
.brand-link img{
    width:118px;
    height:118px;
    object-fit:cover;
    border-radius:26px;
    display:block;
}
.brand-kicker{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:0 13px;
    border-radius:999px;
    background:rgba(255,42,31,.10);
    border:1px solid rgba(255,42,31,.22);
    color:#ffb09e;
    font-size:.72rem;
    font-weight:950;
    letter-spacing:.16em;
}
.brand-card h1{
    margin:14px 0 8px;
    font-size:clamp(1.75rem,7vw,2.55rem);
    line-height:1.25;
    font-weight:950;
}
.brand-card p{
    margin:0;
    color:var(--muted);
    line-height:1.9;
    font-size:.96rem;
}

.search-card,.result-card,.empty-card{
    border:1px solid var(--line);
    background:var(--card);
    backdrop-filter:blur(18px);
    box-shadow:var(--shadow);
    border-radius:var(--radius);
}
.search-card{
    padding:18px;
}
.field-label{
    display:block;
    margin:0 2px 9px;
    color:var(--muted);
    font-size:.82rem;
    font-weight:900;
}
.input-wrap{
    position:relative;
    margin-bottom:12px;
}
.input-wrap input{
    width:100%;
    height:58px;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(0,0,0,.26);
    color:var(--text);
    outline:0;
    padding:0 16px 0 88px;
    direction:ltr;
    text-align:left;
    font-weight:800;
    transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.input-wrap input::placeholder{
    color:rgba(185,189,200,.58);
    direction:rtl;
    text-align:right;
}
.input-wrap input:focus{
    border-color:rgba(255,106,55,.58);
    box-shadow:0 0 0 4px rgba(255,42,31,.10);
    background:rgba(0,0,0,.34);
}
.paste-btn{
    position:absolute;
    left:8px;
    top:8px;
    height:42px;
    min-width:68px;
    padding:0 12px;
    border-radius:13px;
    background:rgba(255,255,255,.07);
    color:var(--muted);
    font-size:.78rem;
    font-weight:950;
    cursor:pointer;
    transition:.18s ease;
}
.paste-btn:hover,.paste-btn.ok{
    background:rgba(255,42,31,.13);
    color:#ffd4ca;
}
.primary-btn{
    width:100%;
    height:58px;
    border-radius:18px;
    background:linear-gradient(135deg,var(--red),#bd0614 56%,#0a6bdc);
    color:#fff;
    font-weight:950;
    cursor:pointer;
    box-shadow:0 16px 38px rgba(255,42,31,.22);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    transition:transform .18s ease,filter .18s ease,opacity .18s ease;
}
.primary-btn:hover{transform:translateY(-1px);filter:brightness(1.08)}
.primary-btn:disabled{opacity:.68;cursor:not-allowed;transform:none;filter:none}
.loader{
    display:none;
    width:18px;
    height:18px;
    border:2px solid rgba(255,255,255,.35);
    border-top-color:#fff;
    border-radius:999px;
    animation:spin .75s linear infinite;
}
.is-loading .loader{display:block}
@keyframes spin{to{transform:rotate(1turn)}}

.message{
    margin-top:12px;
    border-radius:16px;
    padding:12px 14px;
    line-height:1.85;
    font-size:.88rem;
    font-weight:850;
    border:1px solid rgba(255,107,107,.23);
    background:rgba(255,107,107,.085);
    color:#ffd0d0;
}
.message.success{
    border-color:rgba(57,229,155,.22);
    background:rgba(57,229,155,.075);
    color:#c9ffe9;
}

.results{
    display:grid;
    gap:14px;
    margin:16px 0 0;
}
.results-head{
    display:none;
}
.result-card{
    padding:18px;
}
.result-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
    padding-bottom:14px;
    border-bottom:1px solid var(--line);
}
.client-title{
    margin:0 0 8px;
    font-size:1rem;
    line-height:1.5;
    font-weight:950;
    direction:ltr;
    text-align:right;
    word-break:break-word;
}
.client-meta{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}
.meta-pill{
    border:1px solid var(--line);
    background:var(--soft);
    border-radius:999px;
    color:var(--muted);
    padding:5px 9px;
    font-size:.72rem;
    font-weight:850;
}
.status{
    flex:0 0 auto;
    white-space:nowrap;
    border-radius:999px;
    padding:7px 11px;
    font-size:.75rem;
    font-weight:950;
    border:1px solid var(--line);
    background:var(--soft);
}
.status-active{color:var(--green);border-color:rgba(57,229,155,.23);background:rgba(57,229,155,.075)}
.status-expired,.status-disabled{color:#ffd0d0;border-color:rgba(255,107,107,.23);background:rgba(255,107,107,.08)}
.status-traffic_exceeded{color:var(--amber);border-color:rgba(255,209,102,.25);background:rgba(255,209,102,.08)}

.result-body{display:block}
.gauge{display:none}
.stats{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.stat{
    min-width:0;
    border:1px solid var(--line);
    background:rgba(255,255,255,.045);
    border-radius:16px;
    padding:13px 12px;
}
.stat-label{
    display:block;
    color:var(--muted2);
    font-size:.72rem;
    font-weight:900;
    margin-bottom:7px;
}
.stat-value{
    display:block;
    color:var(--text);
    font-size:1rem;
    font-weight:950;
    direction:ltr;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.green{color:var(--green)}
.blue{color:#abdfff}
.red{color:#ffd0d0}
.amber{color:var(--amber)}
.empty-card{
    padding:18px;
    text-align:center;
    color:var(--muted);
    font-weight:850;
    line-height:1.9;
}
.empty-card small{color:var(--muted2)}
.footer{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:18px 0 0;
    color:rgba(185,189,200,.58);
    font-size:.76rem;
    font-weight:900;
    letter-spacing:.06em;
}
.footer a{color:#ff9d86}

@media(max-width:520px){
    .app-shell{width:min(100% - 22px,520px);padding:28px 0 18px;justify-content:flex-start}
    .brand-link{width:118px;height:118px;border-radius:30px;margin-bottom:14px}
    .brand-link img{width:102px;height:102px;border-radius:24px}
    .brand-card{margin-bottom:14px}
    .brand-card h1{margin-top:12px;font-size:1.72rem}
    .brand-card p{font-size:.9rem}
    .search-card,.result-card,.empty-card{border-radius:20px}
    .search-card{padding:15px}
    .input-wrap input,.primary-btn{height:54px;border-radius:16px}
    .paste-btn{height:38px;border-radius:12px}
    .result-top{flex-direction:column;align-items:stretch}
    .status{align-self:flex-start}
    .stats{gap:8px}
    .stat{padding:12px 10px;border-radius:14px}
    .stat-value{font-size:.92rem}
}
