/* The dashboard of the hub of the bots: a dark glass theme with gold. */
:root {
    --bg: #070a12;
    --bg2: #0c1220;
    --glass: rgba(255, 255, 255, .055);
    --glass-strong: rgba(255, 255, 255, .085);
    --border: rgba(255, 255, 255, .10);
    --gold: #e8c46a;
    --gold-soft: rgba(232, 196, 106, .16);
    --text: #e9edf6;
    --mute: #8b95ab;
    --ok: #3fbf7f;
    --warn: #e8b64c;
    --bad: #e05c5c;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Vazirmatn, "IRANSans", Tahoma, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.9;
    direction: rtl;
}

/* The slow aurora of the background. */
body::before {
    content: "";
    position: fixed;
    inset: -40%;
    background:
        radial-gradient(38% 42% at 18% 22%, rgba(56, 116, 255, .20), transparent 60%),
        radial-gradient(34% 38% at 82% 18%, rgba(232, 196, 106, .13), transparent 62%),
        radial-gradient(46% 46% at 62% 84%, rgba(120, 60, 255, .14), transparent 66%);
    filter: blur(28px);
    animation: aurora 26s ease-in-out infinite alternate;
    z-index: -2;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    z-index: -1;
    pointer-events: none;
}
@keyframes aurora {
    0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
    100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f6dfa4; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 26px 20px 70px; }

/* ------------------------------------------------------------- the header */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--glass-strong), var(--glass));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark {
    width: 46px; height: 46px; border-radius: 14px;
    background: conic-gradient(from 140deg, #2b7fff, var(--gold), #a05cff, #2b7fff);
    display: grid; place-items: center;
    font-size: 22px; font-weight: 800; color: #0a0e18;
    box-shadow: 0 0 26px rgba(232, 196, 106, .35);
}
.brand h1 { margin: 0; font-size: 19px; letter-spacing: .2px; }
.brand small { display: block; color: var(--mute); font-size: 12.5px; margin-top: -4px; }
.top .who { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; }

/* ---------------------------------------------------------------- the tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a {
    padding: 9px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    font-size: 14px;
    transition: .2s;
}
.tabs a:hover { border-color: var(--gold); color: var(--gold); }
.tabs a.on {
    background: var(--gold-soft);
    border-color: rgba(232, 196, 106, .55);
    color: var(--gold);
    box-shadow: 0 0 18px rgba(232, 196, 106, .18) inset;
}

/* ---------------------------------------------------------------- the cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(150deg, var(--glass-strong), var(--glass));
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(232, 196, 106, .35); }
.card::after {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .5;
}
.card h3 { margin: 0 0 4px; font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.card .domain { color: var(--mute); font-size: 12.5px; word-break: break-all; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 999px;
    font-size: 12px; border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
}
.pill.ok { color: var(--ok); border-color: rgba(63, 191, 127, .4); }
.pill.bad { color: var(--bad); border-color: rgba(224, 92, 92, .4); }
.pill.warn { color: var(--warn); border-color: rgba(232, 182, 76, .4); }
.pill.gold { color: var(--gold); border-color: rgba(232, 196, 106, .45); background: var(--gold-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ---------------------------------------------------------------- the meters */
.meter { margin-top: 12px; }
.meter .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mute); margin-bottom: 5px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #2b7fff, var(--gold));
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.bar.warn span { background: linear-gradient(90deg, #e8b64c, #e07a3c); }
.bar.bad span { background: linear-gradient(90deg, #e05c5c, #b93c3c); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-top: 12px; font-size: 13px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; }

.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 15px; border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    color: var(--text); font-size: 13px; cursor: pointer;
    transition: .2s; font-family: inherit;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold {
    background: linear-gradient(135deg, #f3d68d, #d9ad4e);
    color: #201803; border-color: transparent; font-weight: 700;
    box-shadow: 0 8px 24px rgba(232, 196, 106, .25);
}
.btn.gold:hover { filter: brightness(1.07); color: #201803; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- the forms */
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--mute); }
.field input, .field select, .field textarea {
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, .25);
    color: var(--text);
    font-family: inherit; font-size: 14px;
    transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 196, 106, .12);
}
.hint { font-size: 12px; color: var(--mute); }

.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 16px; font-size: 13.5px; }
.notice.ok { border-color: rgba(63, 191, 127, .45); background: rgba(63, 191, 127, .10); }
.notice.bad { border-color: rgba(224, 92, 92, .45); background: rgba(224, 92, 92, .10); }
.notice.info { border-color: rgba(232, 196, 106, .4); background: var(--gold-soft); }
pre.log {
    background: rgba(0, 0, 0, .45);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    font-size: 12px; line-height: 1.7;
    max-height: 340px; overflow: auto;
    white-space: pre-wrap; word-break: break-all;
    direction: ltr; text-align: left;
}

/* --------------------------------------------------------------- the login */
.login-page {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 24px;
}
.login-card {
    width: min(430px, 100%);
    padding: 38px 34px 32px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035));
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative; overflow: hidden;
}
.login-card::before {
    content: "";
    position: absolute; inset: -50% -10% auto -10%; height: 70%;
    background: radial-gradient(50% 60% at 50% 0%, rgba(232, 196, 106, .22), transparent 70%);
    pointer-events: none;
}
.logo-ring {
    width: 108px; height: 108px; margin: 0 auto 18px;
    border-radius: 50%;
    background: conic-gradient(from 140deg, #2b7fff, var(--gold), #a05cff, #2b7fff);
    display: grid; place-items: center;
    animation: spin 9s linear infinite;
    box-shadow: 0 0 46px rgba(232, 196, 106, .30);
}
.logo-ring span {
    width: 84px; height: 84px; border-radius: 50%;
    background: #0a0f1c;
    display: grid; place-items: center;
    font-size: 34px; font-weight: 800; color: var(--gold);
    animation: spin 9s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-card h1 { margin: 0 0 6px; font-size: 21px; }
.login-card p.sub { margin: 0 0 24px; color: var(--mute); font-size: 13px; }
.login-card input {
    width: 100%; padding: 13px 16px; margin-bottom: 12px;
    border-radius: 13px; border: 1px solid var(--border);
    background: rgba(0, 0, 0, .32); color: var(--text);
    font-family: inherit; font-size: 15px; text-align: center;
}
.login-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 196, 106, .12); }
.login-card button {
    width: 100%; padding: 13px; border: none; border-radius: 13px;
    background: linear-gradient(135deg, #f3d68d, #d9ad4e);
    color: #201803; font-size: 15px; font-weight: 800; cursor: pointer;
    font-family: inherit;
    box-shadow: 0 10px 30px rgba(232, 196, 106, .28);
    transition: .2s;
}
.login-card button:hover { filter: brightness(1.08); }
.login-foot { margin-top: 18px; color: var(--mute); font-size: 11.5px; }

@media (max-width: 640px) {
    .wrap { padding: 16px 12px 50px; }
    .top { padding: 14px 16px; }
}
