@font-face {
    font-family: "Only Pub Display";
    src: url("../../YoungBest-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --admin-bg: #0b0d10;
    --admin-surface: #13161b;
    --admin-surface-2: #191d23;
    --admin-surface-3: #20252d;
    --admin-border: #2a3039;
    --admin-border-strong: #3a424d;
    --admin-text: #f7f5ef;
    --admin-muted: #929aa6;
    --admin-accent: #f5c842;
    --admin-accent-strong: #ffda66;
    --admin-accent-soft: rgba(245, 200, 66, 0.12);
    --admin-danger: #ff6b6b;
    --admin-danger-soft: rgba(255, 107, 107, 0.12);
    --admin-success: #5ed39a;
    --admin-success-soft: rgba(94, 211, 154, 0.12);
    --sidebar-width: 272px;
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body.admin-body,
body.login-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 82% -10%, rgba(245, 200, 66, 0.08), transparent 30rem),
        var(--admin-bg);
    color: var(--admin-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

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

:focus-visible {
    outline: 3px solid rgba(245, 200, 66, 0.52) !important;
    outline-offset: 2px;
}

.text-muted {
    color: var(--admin-muted) !important;
}

.admin-sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    min-height: 100vh;
    background: rgba(16, 19, 23, 0.98);
    border-right: 1px solid var(--admin-border);
    color: var(--admin-text);
    z-index: 1040;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 18px 18px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--admin-text);
    text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
    line-height: 1.15;
}

.brand-lockup strong {
    font-family: "Only Pub Display", Inter, sans-serif;
    font-size: 1.34rem;
    letter-spacing: 0.02em;
}

.brand-lockup small {
    margin-top: 4px;
    color: var(--admin-muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(245, 200, 66, 0.42);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(245, 200, 66, 0.18), rgba(245, 200, 66, 0.04));
    color: var(--admin-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.sidebar-brand {
    padding: 4px 8px 28px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.nav-caption {
    padding: 0 12px 8px;
    color: #69717d;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #aab1bb;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-nav-link i {
    width: 22px;
    color: #747d89;
    font-size: 1.05rem;
    text-align: center;
}

.sidebar-nav-link:hover {
    border-color: var(--admin-border);
    background: var(--admin-surface-2);
    color: var(--admin-text);
    transform: translateX(2px);
}

.sidebar-nav-link.active {
    border-color: rgba(245, 200, 66, 0.22);
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
}

.sidebar-nav-link.active i {
    color: var(--admin-accent);
}

.sidebar-bottom {
    margin-top: auto;
}

.site-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    color: var(--admin-muted);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.site-link:hover {
    border-color: var(--admin-border-strong);
    color: var(--admin-text);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 10px;
    border-top: 1px solid var(--admin-border);
}

.profile-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--admin-accent);
    color: #17130a;
    font-size: 0.85rem;
    font-weight: 850;
}

.profile-copy {
    min-width: 0;
    flex: 1;
}

.profile-copy strong,
.profile-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy strong {
    font-size: 0.82rem;
}

.profile-copy small {
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 0.7rem;
}

.profile-logout,
.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: transparent;
    color: var(--admin-muted);
    text-decoration: none;
    transition: 160ms ease;
}

.profile-logout:hover,
.icon-button:hover {
    border-color: var(--admin-border-strong);
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--admin-border);
    background: rgba(11, 13, 16, 0.88);
    backdrop-filter: blur(16px);
}

.sidebar-mobile-header {
    padding: 17px 18px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 44px clamp(24px, 4vw, 64px) 64px;
}

.content-wrap {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.page-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--admin-accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-eyebrow::before {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--admin-accent);
    content: "";
}

.page-title {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    font-weight: 760;
    letter-spacing: -0.045em;
}

.page-description {
    max-width: 640px;
    margin: 9px 0 0;
    color: var(--admin-muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.btn-admin-primary,
.btn-admin-secondary,
.btn-admin-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 17px;
    border-radius: 11px;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-admin-primary {
    border: 1px solid var(--admin-accent);
    background: var(--admin-accent);
    color: #17130a;
    box-shadow: 0 10px 24px rgba(245, 200, 66, 0.12);
}

.btn-admin-primary:hover {
    border-color: var(--admin-accent-strong);
    background: var(--admin-accent-strong);
    color: #17130a;
    transform: translateY(-1px);
}

.btn-admin-secondary {
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    color: var(--admin-text);
}

.btn-admin-secondary:hover {
    border-color: var(--admin-border-strong);
    background: var(--admin-surface-3);
    color: var(--admin-text);
}

.btn-admin-danger {
    border: 1px solid rgba(255, 107, 107, 0.32);
    background: var(--admin-danger-soft);
    color: #ff9292;
}

.btn-admin-danger:hover {
    border-color: var(--admin-danger);
    background: var(--admin-danger);
    color: #1a0c0c;
}

.button-sm {
    min-height: 38px;
    padding-inline: 13px;
    border-radius: 10px;
    font-size: 0.77rem;
}

.surface-card {
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    background: rgba(19, 22, 27, 0.9);
    box-shadow: var(--shadow-soft);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    min-height: 154px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(26, 30, 36, 0.96), rgba(18, 21, 26, 0.96));
}

.stat-card::after {
    position: absolute;
    top: -35px;
    right: -28px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(245, 200, 66, 0.045);
    content: "";
}

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

.stat-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(245, 200, 66, 0.18);
    border-radius: 11px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

.stat-label {
    color: var(--admin-muted);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-value {
    margin: 19px 0 6px;
    color: var(--admin-text);
    font-size: 2rem;
    font-weight: 780;
    letter-spacing: -0.04em;
}

.stat-note {
    margin: 0;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 18px;
}

.section-card {
    padding: 22px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 1.04rem;
    font-weight: 760;
}

.section-subtitle {
    margin: 4px 0 0;
    color: var(--admin-muted);
    font-size: 0.77rem;
}

.recent-list {
    display: grid;
    gap: 4px;
}

.recent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 13px 12px;
    border-radius: 12px;
}

.recent-row:hover {
    background: var(--admin-surface-2);
}

.recent-product {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.recent-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface-3);
    object-fit: cover;
}

.recent-product strong,
.recent-product small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-product strong {
    font-size: 0.84rem;
}

.recent-product small {
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 0.7rem;
}

.recent-price {
    color: var(--admin-accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    color: var(--admin-text);
    text-decoration: none;
    transition: 160ms ease;
}

.quick-action:hover {
    border-color: rgba(245, 200, 66, 0.35);
    background: var(--admin-accent-soft);
    color: var(--admin-text);
    transform: translateX(2px);
}

.quick-action-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: var(--admin-surface-3);
    color: var(--admin-accent);
}

.quick-action-copy {
    min-width: 0;
    flex: 1;
}

.quick-action-copy strong,
.quick-action-copy small {
    display: block;
}

.quick-action-copy strong {
    font-size: 0.8rem;
}

.quick-action-copy small {
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 0.68rem;
}

.quick-action > i {
    color: var(--admin-muted);
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 14px;
    margin-bottom: 22px;
    padding: 16px;
}

.filter-field {
    min-width: 220px;
}

.filter-field.grow {
    min-width: 240px;
    flex: 1;
}

.filter-label,
.form-label {
    display: block;
    margin-bottom: 7px;
    color: #c6cbd2;
    font-size: 0.74rem;
    font-weight: 750;
}

.input-shell {
    position: relative;
}

.input-shell > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--admin-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.input-shell .form-control {
    padding-left: 40px;
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: var(--admin-border);
    border-radius: 10px;
    background-color: var(--admin-surface-2);
    color: var(--admin-text);
    font-size: 0.86rem;
}

.form-control::placeholder {
    color: #707986;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(245, 200, 66, 0.72);
    background-color: var(--admin-surface-2);
    color: var(--admin-text);
    box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.1);
}

.form-control:disabled,
.form-select:disabled {
    background: #171a1f;
    color: #747c87;
}

.form-select option {
    background: var(--admin-surface-2);
}

.form-hint {
    margin-top: 7px;
    color: var(--admin-muted);
    font-size: 0.71rem;
    line-height: 1.5;
}

.results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 14px;
    color: var(--admin-muted);
    font-size: 0.77rem;
}

.results-meta strong {
    color: var(--admin-text);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    background: var(--admin-surface);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    border-color: rgba(245, 200, 66, 0.38);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.product-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--admin-surface-2);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.product-card:hover .product-media img {
    transform: scale(1.025);
}

.product-id {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(10, 12, 15, 0.72);
    color: #d9dce1;
    font-size: 0.64rem;
    font-weight: 750;
    backdrop-filter: blur(8px);
}

.product-body {
    display: flex;
    min-height: 178px;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.product-name {
    margin: 0;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 0.96rem;
    font-weight: 760;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-description {
    display: -webkit-box;
    min-height: 38px;
    margin: 7px 0 14px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 0.74rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.product-price {
    color: var(--admin-accent-strong);
    font-size: 1rem;
    font-weight: 820;
}

.product-actions {
    display: flex;
    gap: 7px;
}

.card-action {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    background: var(--admin-surface-2);
    color: var(--admin-muted);
    transition: 160ms ease;
}

.card-action:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

.card-action.danger:hover {
    border-color: var(--admin-danger);
    background: var(--admin-danger-soft);
    color: var(--admin-danger);
}

.empty-state {
    display: grid;
    min-height: 280px;
    place-items: center;
    padding: 42px 20px;
    border: 1px dashed var(--admin-border-strong);
    border-radius: 16px;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 16px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    font-size: 1.25rem;
}

.empty-state h3 {
    margin: 0 0 7px;
    font-size: 1rem;
}

.empty-state p {
    max-width: 420px;
    margin: 0 auto 18px;
    color: var(--admin-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.category-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 11px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 13px;
    background: var(--admin-surface);
}

.summary-chip i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

.summary-chip strong,
.summary-chip small {
    display: block;
}

.summary-chip strong {
    font-size: 1rem;
}

.summary-chip small {
    color: var(--admin-muted);
    font-size: 0.69rem;
}

.category-help {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(245, 200, 66, 0.18);
    border-radius: 12px;
    background: rgba(245, 200, 66, 0.055);
    color: #c9c3af;
    font-size: 0.75rem;
    line-height: 1.55;
}

.category-help i {
    margin-top: 1px;
    color: var(--admin-accent);
}

.category-container {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: var(--admin-surface);
    transition: border-color 160ms ease;
}

.category-container:hover {
    border-color: var(--admin-border-strong);
}

.main-cat-header,
.sub-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.main-cat-header {
    padding: 14px;
    background: var(--admin-surface-2);
}

.category-name-wrap {
    display: flex;
    min-width: 220px;
    flex: 1;
    align-items: center;
    gap: 10px;
}

.handle {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 9px;
    color: #737d89;
    cursor: grab;
}

.handle:hover {
    background: var(--admin-surface-3);
    color: var(--admin-text);
}

.handle:active {
    cursor: grabbing;
}

.category-input {
    min-height: 38px;
    border-color: transparent;
    background: transparent;
    font-weight: 740;
}

.category-input:hover,
.category-input:focus {
    border-color: var(--admin-border-strong);
    background: var(--admin-surface-3);
}

.sub-cat-list {
    min-height: 52px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sub-cat-list:empty::after {
    display: block;
    padding: 15px 22px 15px 62px;
    color: #66707c;
    font-size: 0.72rem;
    content: "Henüz alt kategori yok";
}

.sub-cat-item {
    padding: 10px 14px 10px 30px;
    border-top: 1px solid var(--admin-border);
    background: #111419;
}

.sub-cat-item .category-input {
    color: #c9ced5;
    font-size: 0.82rem;
    font-weight: 600;
}

.category-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.category-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    background: transparent;
    color: var(--admin-muted);
    font-size: 0.7rem;
    font-weight: 750;
    transition: 160ms ease;
}

.category-action:hover {
    border-color: var(--admin-border-strong);
    background: var(--admin-surface-3);
    color: var(--admin-text);
}

.category-action.save:hover {
    border-color: var(--admin-success);
    background: var(--admin-success-soft);
    color: var(--admin-success);
}

.category-action.danger:hover {
    border-color: var(--admin-danger);
    background: var(--admin-danger-soft);
    color: var(--admin-danger);
}

.ui-sortable-helper {
    border-color: var(--admin-accent) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ui-sortable-placeholder {
    min-height: 54px;
    visibility: visible !important;
    border: 1px dashed rgba(245, 200, 66, 0.42);
    background: var(--admin-accent-soft);
}

.admin-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--admin-border-strong);
    border-radius: 16px;
    background: var(--admin-surface);
    color: var(--admin-text);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.admin-modal .modal-header,
.admin-modal .modal-footer {
    border-color: var(--admin-border);
    background: var(--admin-surface-2);
}

.admin-modal .modal-title {
    font-size: 1rem;
    font-weight: 760;
}

.admin-modal .modal-body {
    padding: 22px;
}

.admin-modal .modal-footer {
    padding: 14px 22px;
}

.btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.72;
}

.form-panel {
    overflow: hidden;
}

.form-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.form-panel-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 760;
}

.form-panel-header p {
    margin: 5px 0 0;
    color: var(--admin-muted);
    font-size: 0.75rem;
}

.form-panel-body {
    padding: 26px;
}

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

.form-span-2 {
    grid-column: 1 / -1;
}

.upload-zone {
    display: grid;
    min-height: 172px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--admin-border-strong);
    border-radius: 13px;
    background: var(--admin-surface-2);
    cursor: pointer;
    transition: 160ms ease;
}

.upload-zone:hover {
    border-color: var(--admin-accent);
    background: var(--admin-accent-soft);
}

.upload-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.upload-placeholder {
    padding: 24px;
    color: var(--admin-muted);
    text-align: center;
}

.upload-placeholder i {
    display: block;
    margin-bottom: 10px;
    color: var(--admin-accent);
    font-size: 1.35rem;
}

.upload-placeholder strong,
.upload-placeholder small {
    display: block;
}

.upload-placeholder strong {
    color: var(--admin-text);
    font-size: 0.82rem;
}

.upload-placeholder small {
    margin-top: 5px;
    font-size: 0.7rem;
}

.upload-preview {
    display: none;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.alert-admin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 11px;
    background: var(--admin-danger-soft);
    color: #ffaaaa;
    font-size: 0.78rem;
    line-height: 1.5;
}

.admin-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1090;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 13px 16px;
    border: 1px solid rgba(94, 211, 154, 0.3);
    border-radius: 12px;
    background: #16221d;
    color: #c9f5df;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    font-size: 0.78rem;
    font-weight: 650;
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    transition: 180ms ease;
}

.admin-toast.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.admin-toast.error {
    border-color: rgba(255, 107, 107, 0.3);
    background: #281718;
    color: #ffb7b7;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-shell {
    display: grid;
    width: min(920px, 100%);
    min-height: 560px;
    grid-template-columns: 1.05fr 0.95fr;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 22px;
    background: var(--admin-surface);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.4);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px;
    border-right: 1px solid var(--admin-border);
    background:
        radial-gradient(circle at 15% 12%, rgba(245, 200, 66, 0.2), transparent 17rem),
        linear-gradient(155deg, #1d1b13, #111419 68%);
}

.login-brand-panel::after {
    position: absolute;
    right: -110px;
    bottom: -110px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(245, 200, 66, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(245, 200, 66, 0.025), 0 0 0 84px rgba(245, 200, 66, 0.018);
    content: "";
}

.login-message {
    position: relative;
    z-index: 1;
}

.login-message span {
    color: var(--admin-accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-message h1 {
    max-width: 360px;
    margin: 12px 0;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 1.02;
}

.login-message p {
    max-width: 350px;
    margin: 0;
    color: #a9a99f;
    font-size: 0.84rem;
    line-height: 1.7;
}

.login-note {
    position: relative;
    z-index: 1;
    color: #747a82;
    font-size: 0.7rem;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
}

.login-form-panel h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 760;
    letter-spacing: -0.03em;
}

.login-form-panel > p {
    margin: 7px 0 26px;
    color: var(--admin-muted);
    font-size: 0.8rem;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-muted);
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: var(--admin-surface-3);
    color: var(--admin-text);
}

@media (max-width: 1199.98px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .stats-grid .stat-card:last-child {
        grid-column: 1 / -1;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .admin-sidebar.offcanvas-md {
        visibility: visible !important;
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    .admin-sidebar {
        width: min(88vw, 300px);
        max-width: 300px;
    }

    .sidebar-inner {
        padding-top: 18px;
    }

    .admin-main {
        margin-left: 0;
        padding: 28px 18px 48px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .page-header .btn-admin-primary,
    .page-header .btn-admin-secondary {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid .stat-card:last-child {
        grid-column: auto;
    }

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

    .filter-field,
    .filter-field.grow {
        min-width: 0;
        width: 100%;
    }

    .category-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-cat-header,
    .sub-cat-item {
        align-items: stretch;
        flex-direction: column;
    }

    .category-name-wrap {
        width: 100%;
        min-width: 0;
    }

    .category-actions {
        justify-content: flex-end;
        width: 100%;
    }

    .sub-cat-item {
        padding-left: 14px;
    }

    .category-action span {
        display: none;
    }

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

    .form-span-2 {
        grid-column: auto;
    }

    .form-panel-body,
    .form-panel-header {
        padding-inline: 18px;
    }

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

    .form-actions a,
    .form-actions button {
        width: 100%;
    }

    .login-shell {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 240px;
        padding: 28px;
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }

    .login-message h1 {
        font-size: 2rem;
    }

    .login-message p,
    .login-note {
        display: none;
    }

    .login-form-panel {
        padding: 30px 24px 34px;
    }
}

@media (max-width: 575.98px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-media {
        aspect-ratio: 16 / 10;
    }

    .category-summary {
        grid-template-columns: 1fr;
    }

    .recent-row {
        gap: 10px;
        padding-inline: 4px;
    }

    .section-card {
        padding: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
