* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "Segoe UI", "Tajawal", "Cairo", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(1100px 520px at 85% -10%, rgba(76, 110, 245, .16), transparent 60%),
        radial-gradient(900px 480px at 0% 110%, rgba(124, 58, 237, .18), transparent 60%),
        radial-gradient(700px 400px at 50% 120%, rgba(255, 215, 106, .06), transparent 60%),
        #0a0d1a;
    color: #e8ecff;
    min-height: 100vh;
    direction: rtl;
    background-attachment: fixed;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 44px 44px;
    z-index: 0;
}
a { color: #9db7ff; text-decoration: none; transition: color .2s; }
a:hover { color: #c6d6ff; text-decoration: none; }

.wrap { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 26px 16px 70px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 20px;
    background: rgba(17, 22, 46, .72);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    margin-bottom: 26px;
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.topbar .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 1.12rem;
    color: #ffd76a;
    letter-spacing: .2px;
}
.brand-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd76a, #ff9f43);
    box-shadow: 0 0 14px rgba(255, 215, 106, .8);
}
.topbar .nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topbar .nav a {
    font-weight: 600;
    font-size: .88rem;
    color: #a9b6e8;
    padding: 7px 14px;
    border-radius: 999px;
    transition: all .2s;
}
.topbar .nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.topbar .nav a.active {
    color: #0a0d1a;
    background: linear-gradient(135deg, #ffd76a, #ffb34d);
    box-shadow: 0 6px 18px rgba(255, 179, 77, .35);
}
.topbar .nav a.danger-link { color: #ff9d9d; }
.topbar .nav a.danger-link:hover { background: rgba(255, 100, 100, .1); color: #ffb3b3; }

h1 { font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1.35; }
h2 { font-size: 1.05rem; font-weight: 800; color: #dde5ff; }

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 26px 26px;
    margin-bottom: 20px;
    border-radius: 20px;
    background:
        linear-gradient(140deg, rgba(76, 110, 245, .14), rgba(124, 58, 237, .06) 55%, transparent),
        rgba(17, 22, 46, .55);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    backdrop-filter: blur(16px);
    animation: rise .5s ease both;
}
.hero h1 { margin: 8px 0 6px; }
.hero p { color: #9aa6d4; font-size: .95rem; line-height: 1.8; max-width: 520px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 800;
    color: #ffd76a;
    background: rgba(255, 215, 106, .1);
    border: 1px solid rgba(255, 215, 106, .3);
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: .3px;
}
.version-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 210px;
    padding: 16px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 215, 106, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 30px rgba(0, 0, 0, .3);
}
.version-pill svg { width: 34px; height: 34px; flex: none; }
.v-label { display: block; font-size: .74rem; color: #8f9ccf; font-weight: 700; }
.v-num { display: block; font-size: 1.5rem; font-weight: 900; color: #ffd76a; line-height: 1.25; }
.v-code { display: block; font-size: .78rem; color: #9aa6d4; font-weight: 600; }

.card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32);
    animation: rise .5s ease both;
}
.card p { margin: 6px 0; line-height: 1.9; color: #b9c3ec; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; font-size: .82rem; color: #8f9ccf; }
.card-icon {
    width: 42px; height: 42px;
    flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(76, 110, 245, .25), rgba(124, 58, 237, .25));
    border: 1px solid rgba(255, 255, 255, .12);
    color: #ffd76a;
}
.card-icon svg { width: 21px; height: 21px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.stat {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    padding: 18px 16px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .3);
    animation: rise .5s ease both;
}
.stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #4c6ef5, #7c3aed, #ffd76a);
    opacity: .9;
}
.stat .num { font-size: 1.55rem; font-weight: 900; color: #9db7ff; display: block; margin-bottom: 4px; }
.stat .lbl { color: #8f9ccf; font-size: .84rem; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: right;
    padding: 11px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: .9rem;
}
th {
    color: #ffd76a;
    font-weight: 800;
    background: rgba(255, 255, 255, .04);
    font-size: .82rem;
}
tbody tr, table tr { transition: background .15s; }
table tr:hover { background: rgba(76, 110, 245, .07); }

form fieldset {
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, .12);
}
legend { color: #ffd76a; font-weight: 800; padding: 0 8px; font-size: .92rem; }
label { display: block; margin: 12px 0 6px; font-weight: 700; color: #cdd7ff; font-size: .9rem; }

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.field { min-width: 0; }
.field label { margin-top: 0; }

input[type=text], input[type=number], input[type=password], input[type=url], textarea, select {
    width: 100%;
    padding: 10px 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(9, 12, 28, .65);
    color: #eef1ff;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #5d6899; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4c6ef5;
    background: rgba(9, 12, 28, .85);
    box-shadow: 0 0 0 3px rgba(76, 110, 245, .22), 0 0 24px rgba(76, 110, 245, .12);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.8; }

input[type=file] {
    width: 100%;
    padding: 10px 13px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, .22);
    background: rgba(9, 12, 28, .4);
    color: #cdd7ff;
    cursor: pointer;
    font-size: .88rem;
}
input[type=file]::file-selector-button {
    background: linear-gradient(135deg, #4c6ef5, #7c3aed);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    padding: 8px 14px;
    margin-left: 10px;
    cursor: pointer;
}
.hint { display: block; margin-top: 5px; font-size: .76rem; color: #7885b8; }

.dropzone input { display: none; }
.dropzone label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 28px 18px;
    border: 1.5px dashed rgba(255, 215, 106, .35);
    border-radius: 16px;
    background: rgba(255, 215, 106, .04);
    cursor: pointer;
    transition: all .2s;
}
.dropzone label:hover {
    background: rgba(76, 110, 245, .09);
    border-color: #4c6ef5;
    box-shadow: 0 0 30px rgba(76, 110, 245, .18);
}
.dropzone svg { width: 34px; height: 34px; color: #ffd76a; }
.dz-title { font-weight: 800; color: #e6ebff; font-size: .95rem; }
.dz-hint { font-size: .8rem; color: #8f9ccf; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4c6ef5, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: .92rem;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(76, 110, 245, .35);
    transition: all .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124, 58, 237, .45); background: linear-gradient(135deg, #5b7aff, #8a4dff); }
.btn.big { padding: 13px 30px; font-size: 1rem; }
.btn.warn { background: linear-gradient(135deg, #ff9f43, #ee5a24); box-shadow: 0 10px 26px rgba(238, 90, 36, .35); }
.btn.warn:hover { background: linear-gradient(135deg, #ffb04f, #f0652e); box-shadow: 0 14px 34px rgba(238, 90, 36, .45); }
.btn.danger { background: linear-gradient(135deg, #ff5f5f, #d62739); box-shadow: 0 10px 26px rgba(214, 39, 57, .35); }
.btn.danger:hover { background: linear-gradient(135deg, #ff7373, #e03244); }
.btn.ghost {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: none;
    color: #cdd7ff;
}
.btn.ghost:hover { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: none; transform: translateY(-2px); }

.check { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.check input[type=checkbox] {
    -webkit-appearance: none;
    appearance: none;
    width: 46px;
    height: 25px;
    flex: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    position: relative;
    cursor: pointer;
    transition: all .25s;
}
.check input[type=checkbox]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #cdd7ff;
    transition: all .25s;
}
.check input[type=checkbox]:checked {
    background: linear-gradient(90deg, #4c6ef5, #7c3aed);
    border-color: transparent;
}
.check input[type=checkbox]:checked::after {
    left: calc(100% - 21px);
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, .6);
}
.check label { margin: 0; cursor: pointer; color: #cdd7ff; }

.stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .3);
    animation: rise .5s ease both;
}
.maint-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}
.maint-dur { display: flex; flex-direction: column; }
.maint-dur label { margin: 0 0 8px; }
.maint-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.step-btn {
    width: 46px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    color: #ffd76a;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
}
.step-btn:hover {
    background: rgba(255, 215, 106, .15);
    border-color: rgba(255, 215, 106, .5);
    transform: translateY(-1px);
}
.step-btn.down { color: #9db7ff; }
.step-btn.down:hover { background: rgba(76, 110, 245, .18); border-color: rgba(76, 110, 245, .5); }
.step-num { font-size: 2.1rem; font-weight: 900; color: #ffd76a; line-height: 1.1; }
.step-lbl { font-size: .78rem; color: #8f9ccf; font-weight: 700; text-align: center; line-height: 1.5; }

.ok, .err {
    padding: 13px 16px;
    border-radius: 13px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: rise .4s ease both;
}
.ok {
    background: rgba(40, 160, 100, .12);
    border: 1px solid rgba(40, 160, 100, .35);
    color: #7ee2a5;
}
.err {
    background: rgba(214, 39, 57, .12);
    border: 1px solid rgba(214, 39, 57, .4);
    color: #ff9d9d;
}

.login-box { max-width: 400px; margin: 9vh auto 0; }
.login-box .card { padding: 34px 30px; }
.login-box h1 { text-align: center; margin-bottom: 8px; }
.login-box .sub { text-align: center; color: #8f9ccf; margin-bottom: 20px; font-size: .9rem; }
.login-box .btn { width: 100%; margin-top: 18px; }

.u-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.small { font-size: .82rem; color: #8f9ccf; }
.mono { direction: ltr; text-align: left; font-family: Consolas, "Courier New", monospace; font-size: .84rem; }
.fname { display: inline-flex; align-items: center; gap: 7px; color: #cdd7ff; }
.fname::before {
    content: "";
    width: 9px; height: 9px;
    border-radius: 3px;
    background: linear-gradient(135deg, #ffd76a, #ff9f43);
    box-shadow: 0 0 8px rgba(255, 215, 106, .6);
    flex: none;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
    .hero { flex-direction: column; align-items: stretch; text-align: center; }
    .hero p { margin-inline: auto; }
    .version-pill { justify-content: center; }
    .topbar { justify-content: center; }
}
