@import url("../fonts/all.css");

:root {
    --bg: #f5f7fb;
    --panel: #fff;
    --text: #182033;
    --muted: #74809a;
    --line: #e6eaf2;
    --primary: #5b5ce2;
    --primary2: #7c3aed;
    --success: #0f9f6e;
    --danger: #d92d20;
    --shadow: 0 12px 32px rgba(24, 32, 51, .08);
    font-family: Estedad, IRANSans, Yekan Bakh, Tahoma, Arial, sans-serif
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 14px
}

a {
    text-decoration: none;
    color: inherit
}

button,
input,
select,
textarea {
    font: inherit
}

.app-shell {
    min-height: 100vh;
    display: flex
}

.sidebar {
    width: 270px;
    background: #111827;
    color: #fff;
    position: fixed;
    inset: 0 0 0 auto;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    z-index: 20
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(91, 92, 226, .35)
}

.brand strong,
.brand small {
    display: block
}

.brand small {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 11px
}

.nav {
    margin-top: 36px;
    display: grid;
    gap: 8px
}

.nav a {
    padding: 13px 15px;
    border-radius: 12px;
    color: #c8ced9;
    transition: .2s
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    color: #c8ced9
}

.sidebar-footer a {
    color: #fca5a5
}

.main {
    margin-right: 270px;
    min-width: 0;
    width: 100%
}

.topbar {
    padding: 28px 34px 18px;
    display: flex;
    align-items: center;
    gap: 14px
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 25px
}

.topbar p {
    margin: 0;
    color: var(--muted)
}

.menu-button {
    display: none;
    border: 0;
    background: var(--panel);
    border-radius: 12px;
    padding: 10px 13px;
    box-shadow: var(--shadow)
}

.content {
    padding: 12px 34px 40px
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px
}

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow)
}

.stat-card {
    padding: 22px
}

.stat-card span {
    color: var(--muted)
}

.stat-card strong {
    display: block;
    margin-top: 13px;
    font-size: 30px
}

.panel {
    overflow: hidden;
    margin-bottom: 22px
}

.panel-head,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px
}

.panel-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line)
}

.panel-head h2 {
    margin: 0 0 5px
}

.panel-head p {
    margin: 0;
    color: var(--muted)
}

.toolbar {
    margin-bottom: 18px
}

.search-box {
    max-width: 400px;
    flex: 1
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    padding: 11px 17px;
    cursor: pointer
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: #fff
}

.btn.secondary {
    background: #eef0ff;
    color: var(--primary)
}

.btn.danger {
    background: #feeceb;
    color: var(--danger)
}

.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px
}

th,
td {
    text-align: right;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle
}

th {
    color: var(--muted);
    font-weight: 600;
    background: #fafbfe
}

tr:last-child td {
    border-bottom: 0
}

code {
    direction: ltr;
    display: inline-block;
    background: #f0f2f7;
    padding: 4px 7px;
    border-radius: 7px
}

.status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px
}

.status.success {
    background: #e8f8f1;
    color: var(--success)
}

.status.danger {
    background: #feeceb;
    color: var(--danger)
}

.status.muted {
    background: #eef1f5;
    color: #667085
}

.block {
    display: block;
    margin-top: 7px;
    color: var(--muted)
}

.actions {
    display: flex;
    gap: 7px;
    align-items: center
}

.actions form {
    display: flex;
    gap: 7px
}

.icon-btn {
    border: 0;
    background: #f3f5f9;
    border-radius: 9px;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap
}

.icon-btn.danger {
    color: var(--danger)
}

.empty {
    text-align: center !important;
    color: var(--muted);
    padding: 35px !important
}

.form-panel {
    padding: 24px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px
}

.form-grid label,
.form-stack label,
.inline-form label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 600
}

.form-grid .full {
    grid-column: 1/-1
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8deea;
    background: #fff;
    border-radius: 11px;
    padding: 12px 13px;
    outline: none;
    transition: .2s
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 92, 226, .1)
}

label small {
    color: var(--muted);
    font-weight: 400
}

.switch-row {
    display: flex !important;
    align-items: center;
    gap: 9px
}

.switch-row input {
    width: auto
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 14px;
    align-items: end
}

.alert {
    padding: 13px 16px;
    border-radius: 12px;
    margin-bottom: 16px
}

.alert.success {
    background: #e8f8f1;
    color: #087a53
}

.alert.error {
    background: #feeceb;
    color: #b42318
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at top right, #e7e7ff, transparent 35%), var(--bg)
}

.login-card {
    width: min(430px, 100%);
    background: #fff;
    padding: 32px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line)
}

.login-brand {
    margin-bottom: 28px
}

.form-stack {
    display: grid;
    gap: 17px
}

.pagination {
    display: flex;
    gap: 7px;
    padding: 18px;
    justify-content: center
}

.pagination a {
    padding: 8px 11px;
    background: #f2f4f7;
    border-radius: 8px
}

.pagination a.active {
    background: var(--primary);
    color: #fff
}

@media(max-width:1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .sidebar {
        transform: translateX(110%);
        transition: .25s
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main {
        margin-right: 0
    }

    .menu-button {
        display: block
    }
}

@media(max-width:700px) {

    .content,
    .topbar {
        padding-right: 16px;
        padding-left: 16px
    }

    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr
    }

    .form-grid .full {
        grid-column: auto
    }

    .inline-form {
        grid-template-columns: 1fr
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column
    }

    .toolbar .btn {
        width: 100%
    }

    .topbar h1 {
        font-size: 21px
    }
}