:root {
    color-scheme: light;
    --bg: #f6f6f7;
    --surface: #ffffff;
    --card: #ffffff;
    --text: #1a1a1a;
    --muted: #6d7175;
    --primary: #008060;
    --primary-dark: #006e52;
    --border: #e1e3e5;
    --border-strong: #c9cccf;
    --danger-bg: #fef2f2;
    --danger-text: #991b1b;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --topbar-height: 56px;
    --panel-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: iranyekan, Vazirmatn, Tahoma, Arial, sans-serif;
    line-height: 1.7;
}

body.panel-nav-open {
    overflow: hidden;
}

.page-shell {
    min-height: 100vh;
    display: block;
}

.panel-main {
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 28px 20px 40px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

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

.card {
    width: 100%;
    padding: 20px;
}

.auth-card {
    max-width: 520px;
}

.jet-panel--guest .panel-main {
    display: grid;
    place-items: start center;
    min-height: 100vh;
    padding-top: 48px;
}

h1,
h2 {
    margin: 0;
    color: var(--text);
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

p {
    color: var(--muted);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.card-heading-between {
    align-items: center;
    justify-content: space-between;
}

.card-heading p,
.helper-text {
    margin: 6px 0 0;
}

.card-icon {
    display: inline-grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: var(--radius-md);
    background: #e3f1ed;
    font-size: 22px;
}

.dashboard-meta {
    min-width: 0;
    text-align: left;
}

.dashboard-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-meta strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.dashboard-card h2 {
    font-size: 20px;
}

form {
    display: block;
    margin: 0;
}

.panel-main form {
    display: grid;
    gap: 16px;
}

.product-card-actions form {
    display: inline;
    gap: 0;
    margin: 0;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.18);
    border-color: var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label input {
    width: auto;
}

.panel-main button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.panel-main button:hover {
    background: var(--primary-dark);
}

button {
    font: inherit;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.button-secondary {
    background: #475569;
    color: #fff;
}

.button-secondary:hover {
    background: #334155;
    color: #fff;
}

.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: #b91c1c;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button-danger:hover {
    background: #991b1b;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.product-card-media {
    aspect-ratio: 4 / 3;
    background: #f8fafc;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-placeholder {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.product-card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.product-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-card-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
}

.product-status {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.product-status.is-active {
    background: var(--success-bg);
    color: var(--success-text);
}

.product-status.is-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.product-card-price {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.product-card-meta,
.product-card-description {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.product-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.product-card-actions form {
    display: inline;
}

.product-card-actions .button-secondary,
.product-card-actions .button-danger {
    min-height: 44px;
    padding-inline: 14px;
}

.product-form-preview img {
    display: block;
    width: 100%;
    max-width: 220px;
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

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

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: right;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

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

@media (max-width: 900px) {
    .panel-main {
        padding: 16px 14px 32px;
    }

    .card-heading-between {
        align-items: stretch;
        flex-direction: column;
    }

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

    .dashboard-buttons {
        width: 100%;
    }

    .dashboard-buttons > * {
        flex: 1 1 0;
        text-align: center;
    }
}
