/* ============================================================
   QUEER GOODS ADMIN
   ============================================================ */


/* ------------------------------------------------------------
   Reset / Base
------------------------------------------------------------ */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
}

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

a {
    color: inherit;
}


/* ------------------------------------------------------------
   Admin Body
------------------------------------------------------------ */

.admin-body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: #f6f4f1;
    color: #181818;

    font-family: "Inter", Arial, sans-serif;
    line-height: 1.5;
}


/* ------------------------------------------------------------
   Header
------------------------------------------------------------ */

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #dedbd7;
}

.admin-header-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    color: #181818;
    text-decoration: none;
}

.admin-brand-logo {
    display: block;
    width: auto;
    height: 88px;
    object-fit: contain;
}

.admin-brand-section {
    color: #77716b;

    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* ------------------------------------------------------------
   Environment Indicator
------------------------------------------------------------ */

.admin-environment {
    padding: 0.35rem 0.65rem;

    border: 1px solid #181818;
    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}


/* ------------------------------------------------------------
   Navigation
------------------------------------------------------------ */

.admin-navigation {
    border-top: 1px solid #eeeae6;
}

.admin-navigation-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;

    display: flex;
    gap: 0.25rem;

    overflow-x: auto;
    scrollbar-width: thin;
}

.admin-navigation a {
    position: relative;

    flex: 0 0 auto;

    padding: 0.9rem 0.85rem;

    color: #625d58;

    font-size: 0.875rem;
    font-weight: 600;

    text-decoration: none;
    white-space: nowrap;
}

.admin-navigation a::after {
    content: "";

    position: absolute;
    right: 0.85rem;
    bottom: 0;
    left: 0.85rem;

    height: 3px;

    background: transparent;
}

.admin-navigation a.is-active {
    color: #181818;
}

.admin-navigation a.is-active::after {
    background: #181818;
}


/* ------------------------------------------------------------
   Main Content
------------------------------------------------------------ */

.admin-main {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;

    flex: 1;
}


/* ------------------------------------------------------------
   Page Header
------------------------------------------------------------ */

.admin-page-header {
    margin-bottom: 1.5rem;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-page-header h1 {
    margin: 0;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
    line-height: 1.1;
}

.admin-page-header p {
    max-width: 48rem;
    margin: 0.4rem 0 0;

    color: #6c6660;
}

.admin-header::after {
    content: "";
    display: block;
    height: 3px;

    background: linear-gradient(
        90deg,
        #e40303 0%,
        #ff8c00 16.66%,
        #ffed00 33.33%,
        #008026 50%,
        #24408e 66.66%,
        #732982 83.33%,
        #732982 100%
    );
}

/* ------------------------------------------------------------
   Cards
------------------------------------------------------------ */

.admin-card {
    padding: 1.25rem;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.admin-card + .admin-card {
    margin-top: 1rem;
}

.admin-card h2,
.admin-card h3 {
    margin-top: 0;
}


/* ------------------------------------------------------------
   Grid
------------------------------------------------------------ */

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}


/* ------------------------------------------------------------
   Forms
------------------------------------------------------------ */

.admin-form-group {
    margin-bottom: 1.25rem;
}

.admin-form-group label {
    display: block;
    margin-bottom: 0.4rem;

    font-size: 0.875rem;
    font-weight: 600;
}

.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;

    padding: 0.8rem 0.9rem;

    background: #ffffff;
    color: #181818;

    border: 1px solid #cfcac4;
    border-radius: 8px;

    outline: none;
}

.admin-textarea {
    min-height: 8rem;
    resize: vertical;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    border-color: #181818;
    box-shadow: 0 0 0 3px rgba(24, 24, 24, 0.08);
}


/* ------------------------------------------------------------
   Buttons
------------------------------------------------------------ */

.admin-button {
    min-height: 44px;
    padding: 0.7rem 1rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    color: #181818;

    border: 1px solid #cfcac4;
    border-radius: 8px;

    font-weight: 600;
    text-decoration: none;

    cursor: pointer;
}

.admin-button-primary {
    background: #181818;
    color: #ffffff;
    border-color: #181818;
}

.admin-button-danger {
    color: #a32222;
    border-color: #d9aaaa;
}


/* ------------------------------------------------------------
   Status Badges
------------------------------------------------------------ */

.admin-badge {
    display: inline-flex;
    align-items: center;

    padding: 0.3rem 0.55rem;

    background: #efedea;

    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
}


/* ------------------------------------------------------------
   Alerts
------------------------------------------------------------ */

.admin-alert {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;

    background: #ffffff;

    border: 1px solid #d9d5d0;
    border-radius: 8px;
}


/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */

.admin-footer {
    background: #ffffff;
    border-top: 1px solid #dedbd7;
}

.admin-footer-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem;

    display: flex;
    flex-direction: column;
    gap: 0.25rem;

    color: #77716b;

    font-size: 0.75rem;
}

/* ------------------------------------------------------------
   Empty States
------------------------------------------------------------ */

.admin-empty-state {
    max-width: 42rem;
}

.admin-empty-state p {
    margin-bottom: 1.25rem;
    color: #6c6660;
}


/* ------------------------------------------------------------
   Product List
------------------------------------------------------------ */

.admin-product-list {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.admin-product-list-header,
.admin-product-row {
    display: grid;

    grid-template-columns:
        minmax(240px, 2fr)
        minmax(100px, 0.8fr)
        80px
        80px
        110px
        30px;

    gap: 1rem;

    align-items: center;
}

.admin-product-list-header {
    padding: 0.75rem 1rem;

    background: #f3f1ee;
    color: #77716b;

    border-bottom: 1px solid #e1ded9;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-product-row {
    min-height: 76px;
    padding: 0.75rem 1rem;

    color: #181818;

    border-bottom: 1px solid #eeeae6;

    text-decoration: none;
}

.admin-product-row:last-child {
    border-bottom: 0;
}

.admin-product-image {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    object-fit: cover;

    background: #f1efec;

    border: 1px solid #dfdbd6;
    border-radius: 8px;
}

/* ------------------------------------------------------------
   Product Identity
------------------------------------------------------------ */

.admin-product-identity {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-product-placeholder {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1efec;
    color: #8a847e;

    border: 1px solid #dfdbd6;
    border-radius: 8px;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
}

.admin-product-name {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-product-name strong {
    overflow: hidden;

    font-size: 0.9rem;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-product-name span {
    color: #77716b;

    font-size: 0.75rem;
    font-weight: 500;
}


/* ------------------------------------------------------------
   Product Information
------------------------------------------------------------ */

.admin-product-type {
    color: #625d58;
    font-size: 0.85rem;
}

.admin-product-price {
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-product-stock {
    display: flex;
    flex-direction: column;
}

.admin-product-stock strong {
    font-size: 0.9rem;
}

.admin-product-stock span {
    color: #77716b;
    font-size: 0.7rem;
}

.admin-product-status {
    display: flex;
    align-items: center;
}

.admin-product-open {
    color: #8a847e;

    font-family: Georgia, serif;
    font-size: 1.75rem;
    line-height: 1;

    text-align: right;
}


/* ------------------------------------------------------------
   Product Status
------------------------------------------------------------ */

.admin-badge-published {
    background: #e8f3eb;
    color: #28623a;
}

.admin-badge-draft {
    background: #fff3d9;
    color: #785a14;
}

.admin-badge-inactive {
    background: #efedea;
    color: #69635e;
}



/* ------------------------------------------------------------
   Product Workspace
------------------------------------------------------------ */

.admin-product-back {
    margin-bottom: 1rem;
}

.admin-product-back a {
    color: #625d58;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}


/* Product Hero */

.admin-product-hero {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;

    margin-bottom: 1.25rem;
    padding: 1.5rem;
}

.admin-product-hero-image {
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f3f1ee;

    border: 1px solid #e1ded9;
    border-radius: 12px;
}

.admin-product-hero-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.admin-product-hero-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8a847e;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
}

.admin-product-hero-content {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.admin-product-hero-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-product-reference {
    margin-bottom: 0.4rem;

    color: #77716b;

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-product-hero h1 {
    margin: 0;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.25rem;
    line-height: 1.05;
}

.admin-product-hero-stats {
    display: flex;
    gap: 2.5rem;

    margin-top: 2rem;
}

.admin-product-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-product-hero-stat span {
    color: #77716b;

    font-size: 0.75rem;
    font-weight: 600;
}

.admin-product-hero-stat strong {
    font-size: 1.5rem;
}

.admin-product-hero-actions {
    margin-top: auto;
    padding-top: 1.5rem;
}


/* Workspace Grid */

.admin-product-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;

    margin-bottom: 1.25rem;
}

.admin-product-workspace-grid .admin-card {
    margin-top: 0;
}


/* Card Headers */

.admin-card-header {
    margin-bottom: 1.25rem;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-card-header h2 {
    margin: 0;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.25rem;
}

.admin-card-header p {
    margin: 0.25rem 0 0;

    color: #77716b;
    font-size: 0.8rem;
}

.admin-card-action {
    color: #181818;

    font-size: 0.8rem;
    font-weight: 700;

    text-decoration: none;
}


/* Detail List */

.admin-detail-list {
    margin: 0;
}

.admin-detail-list > div {
    padding: 0.65rem 0;

    display: flex;
    justify-content: space-between;
    gap: 1rem;

    border-bottom: 1px solid #eeeae6;
}

.admin-detail-list > div:first-child {
    padding-top: 0;
}

.admin-detail-list > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.admin-detail-list dt {
    color: #77716b;
    font-size: 0.8rem;
}

.admin-detail-list dd {
    margin: 0;

    font-size: 0.85rem;
    font-weight: 600;

    text-align: right;
}


/* Categories */

.admin-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-category-badge {
    padding: 0.45rem 0.7rem;

    background: #f3f1ee;

    border: 1px solid #dfdbd6;
    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 600;
}


/* Suppliers */

.admin-supplier-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-supplier-item + .admin-supplier-item {
    padding-top: 1rem;
    border-top: 1px solid #eeeae6;
}

.admin-supplier-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 0.65rem;
}

.admin-supplier-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;

    color: #77716b;

    font-size: 0.78rem;
}

.admin-supplier-details strong {
    color: #181818;
}


/* Stock */

.admin-stock-summary {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.admin-stock-summary strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.75rem;
    line-height: 1;
}

.admin-stock-summary span {
    color: #77716b;
    font-size: 0.8rem;
}

.admin-stock-history-empty {
    margin-top: 1rem;
    padding-top: 1rem;

    color: #8a847e;

    border-top: 1px solid #eeeae6;

    font-size: 0.78rem;
}


/* Images */

.admin-product-images-card {
    margin-top: 0;
}

.admin-image-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.admin-image-card {
    overflow: hidden;

    border: 1px solid #e1ded9;
    border-radius: 10px;
}

.admin-image-preview {
    position: relative;

    aspect-ratio: 1 / 1;

    background: #f3f1ee;
}

.admin-image-preview img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.admin-image-primary {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;

    padding: 0.3rem 0.5rem;

    background: #181818;
    color: #ffffff;

    border-radius: 999px;

    font-size: 0.65rem;
    font-weight: 700;
}

.admin-image-actions {
    padding: 0.65rem;

    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-image-actions form {
    margin: 0;
}

.admin-image-actions .admin-button {
    min-height: 36px;
    padding: 0.45rem 0.65rem;

    font-size: 0.72rem;
}

/* General */

.admin-muted {
    margin: 0;

    color: #77716b;
    font-size: 0.85rem;
}

/* ------------------------------------------------------------
   Product Edit
------------------------------------------------------------ */

.admin-product-edit-form {
    max-width: 900px;
}

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

.admin-form-wide {
    grid-column: 1 / -1;
}

.admin-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.admin-form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-form-field input,
.admin-form-field select,
.admin-form-field textarea {
    width: 100%;
    box-sizing: border-box;
}

.admin-price-input {
    position: relative;
    width: 100%;
}

.admin-price-input span {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);

    color: #625d58;
    pointer-events: none;
}

.admin-price-input input {
    width: 100%;
    padding-left: 1.75rem;
    box-sizing: border-box;
}

.admin-textarea-short {
    min-height: 5rem;
}

.admin-price-input {
    position: relative;
}

.admin-price-input > span {
    position: absolute;
    top: 50%;
    left: 0.9rem;

    color: #77716b;

    transform: translateY(-50%);
}

.admin-price-input .admin-input {
    padding-left: 1.8rem;
}

.admin-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-toggle-row {
    padding: 0.9rem;

    display: flex;
    align-items: flex-start;
    gap: 0.8rem;

    background: #faf9f7;

    border: 1px solid #e1ded9;
    border-radius: 8px;

    cursor: pointer;
}

.admin-toggle-row input {
    width: 20px;
    height: 20px;
    margin: 0.1rem 0 0;

    flex: 0 0 auto;
}

.admin-toggle-row span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-toggle-row strong {
    font-size: 0.875rem;
}

.admin-toggle-row small {
    color: #77716b;

    font-size: 0.75rem;
}

.admin-form-actions {
    margin-top: 1.25rem;

    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ------------------------------------------------------------
   Dashboard
------------------------------------------------------------ */

.admin-dashboard-stats {
    margin-bottom: 1.25rem;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}


.admin-dashboard-stat {
    min-width: 0;
    padding: 1.25rem;

    display: flex;
    flex-direction: column;

    background: #ffffff;
    color: #181818;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);

    text-decoration: none;
}


.admin-dashboard-stat-label {
    color: #77716b;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.admin-dashboard-stat strong {
    margin-top: 0.35rem;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.25rem;
    line-height: 1;
}


.admin-dashboard-stat-note {
    margin-top: 0.45rem;

    color: #8a847e;

    font-size: 0.75rem;
}


.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}


.admin-dashboard-grid .admin-card {
    margin-top: 0;
}


.admin-dashboard-actions {
    display: flex;
    flex-direction: column;
}


.admin-dashboard-action {
    padding: 0.9rem 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    color: #181818;

    border-bottom: 1px solid #eeeae6;

    text-decoration: none;
}


.admin-dashboard-action:first-child {
    padding-top: 0;
}


.admin-dashboard-action:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}


.admin-dashboard-action div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}


.admin-dashboard-action strong {
    font-size: 0.875rem;
}


.admin-dashboard-action div span {
    color: #77716b;

    font-size: 0.75rem;
}


.admin-dashboard-action > span {
    color: #8a847e;

    font-family: Georgia, serif;
    font-size: 1.6rem;
    line-height: 1;
}

/* ------------------------------------------------------------
   Category List
------------------------------------------------------------ */

.admin-category-list {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}


.admin-category-list-header,
.admin-category-row {
    display: grid;

    grid-template-columns:
        minmax(220px, 2fr)
        minmax(180px, 1.5fr)
        100px
        110px
        100px;

    gap: 1rem;

    align-items: center;
}


.admin-category-list-header {
    padding: 0.75rem 1rem;

    background: #f3f1ee;
    color: #77716b;

    border-bottom: 1px solid #e1ded9;

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.admin-category-row {
    min-height: 64px;
    padding: 0.75rem 1rem;

    border-bottom: 1px solid #eeeae6;
}


.admin-category-row:last-child {
    border-bottom: 0;
}


.admin-category-name strong {
    font-size: 1rem;
    font-weight: 600;
}


.admin-category-slug {
    color: #77716b;

    font-size: 0.9rem;
}


.admin-category-sort {
    font-size: 0.9rem;
    font-weight: 600;
}


.admin-category-status {
    display: flex;
    align-items: center;
}

/* ------------------------------------------------------------
   Supplier Table
------------------------------------------------------------ */

.admin-supplier-table {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.admin-supplier-table-header,
.admin-supplier-row {
    display: grid;

grid-template-columns:
    minmax(180px, 1.5fr)
    minmax(140px, 1fr)
    minmax(200px, 1.5fr)
    minmax(130px, 1fr)
    100px
    100px;

    gap: 1rem;

    align-items: center;
}

.admin-supplier-table-header {
    padding: 0.75rem 1rem;

    background: #f3f1ee;
    color: #77716b;

    border-bottom: 1px solid #e1ded9;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-supplier-row {
    min-height: 64px;
    padding: 0.75rem 1rem;

    border-bottom: 1px solid #eeeae6;
}

.admin-supplier-row:last-child {
    border-bottom: 0;
}

.admin-supplier-name strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-supplier-contact,
.admin-supplier-email,
.admin-supplier-telephone {
    min-width: 0;

    color: #625d58;

    font-size: 0.8rem;
}

.admin-supplier-email {
    overflow: hidden;
}

.admin-supplier-email a {
    display: block;

    overflow: hidden;

    color: #625d58;

    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}

.admin-supplier-status {
    display: flex;
    align-items: center;
}

/* ------------------------------------------------------------
   Goods Inward List
------------------------------------------------------------ */

.admin-goods-list {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}


.admin-goods-list-header,
.admin-goods-row {
    display: grid;

    grid-template-columns:
        minmax(140px, 1fr)
        minmax(180px, 1.5fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        110px
        30px;

    gap: 1rem;

    align-items: center;
}


.admin-goods-list-header {
    padding: 0.75rem 1rem;

    background: #f3f1ee;
    color: #77716b;

    border-bottom: 1px solid #e1ded9;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.admin-goods-row {
    min-height: 64px;
    padding: 0.75rem 1rem;

    color: #181818;

    border-bottom: 1px solid #eeeae6;

    text-decoration: none;
}


.admin-goods-row:last-child {
    border-bottom: 0;
}


.admin-goods-reference strong {
    font-size: 0.9rem;
    font-weight: 600;
}


.admin-goods-supplier {
    font-size: 0.85rem;
    font-weight: 600;
}


.admin-goods-supplier-reference,
.admin-goods-received {
    color: #625d58;

    font-size: 0.8rem;
}


.admin-goods-status {
    display: flex;
    align-items: center;
}


.admin-goods-open {
    color: #8a847e;

    font-family: Georgia, serif;
    font-size: 1.75rem;
    line-height: 1;

    text-align: right;
}

.admin-goods-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ------------------------------------------------------------
   Goods Inward Workspace
------------------------------------------------------------ */

.admin-goods-hero {
    margin-bottom: 1.25rem;
}


.admin-goods-hero-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}


.admin-goods-hero h1 {
    margin: 0;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.25rem;
    line-height: 1.05;
}


.admin-goods-summary {
    margin-top: 2rem;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}


.admin-goods-summary-item {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


.admin-goods-summary-item span {
    color: #77716b;

    font-size: 0.72rem;
    font-weight: 600;
}


.admin-goods-summary-item strong {
    overflow: hidden;

    font-size: 0.9rem;

    text-overflow: ellipsis;
}


.admin-goods-items-card {
    margin-bottom: 1rem;
}


.admin-goods-items {
    border: 1px solid #e1ded9;
    border-radius: 8px;

    overflow: hidden;
}


.admin-goods-items-header,
.admin-goods-item-row {
    display: grid;

    grid-template-columns:
        minmax(100px, 0.8fr)
        minmax(200px, 2fr)
        90px
        100px
        100px
        100px;

    gap: 1rem;

    align-items: center;
}


.admin-goods-items-header {
    padding: 0.65rem 0.75rem;

    background: #f3f1ee;
    color: #77716b;

    border-bottom: 1px solid #e1ded9;

    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


.admin-goods-item-row {
    min-height: 58px;
    padding: 0.65rem 0.75rem;

    border-bottom: 1px solid #eeeae6;

    font-size: 0.8rem;
}


.admin-goods-item-row:last-child {
    border-bottom: 0;
}


.admin-goods-item-sku {
    color: #625d58;
}


.admin-goods-item-product strong,
.admin-goods-item-total strong {
    font-weight: 600;
}


.admin-goods-item-action {
    text-align: right;
}


.admin-goods-item-action form {
    margin: 0;
}


.admin-goods-item-action .admin-button {
    min-height: 34px;
    padding: 0.4rem 0.65rem;

    font-size: 0.72rem;
}


.admin-goods-mobile-label {
    display: none;
}


.admin-goods-receive-warning {
    padding: 1rem;

    background: #fff8e8;

    border: 1px solid #ead7a5;
    border-radius: 8px;
}


.admin-goods-receive-warning strong {
    display: block;

    margin-bottom: 0.25rem;

    font-size: 0.875rem;
}


.admin-goods-receive-warning p {
    margin: 0;

    color: #6c6046;

    font-size: 0.8rem;
}

@media (max-width: 1023px) {

    .admin-category-list-header {
        display: none;
    }

    .admin-category-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.4rem 1rem;
    }

    .admin-category-name {
        grid-column: 1;
        grid-row: 1;
    }

    .admin-category-status {
        grid-column: 2;
        grid-row: 1;
    }

    .admin-category-slug {
        grid-column: 1;
        grid-row: 2;
    }

    .admin-category-actions {
        grid-column: 2;
        grid-row: 2;

        margin-top: 0;
    }

    .admin-category-sort {
        grid-column: 1 / -1;
        grid-row: 3;

        color: #77716b;
        font-size: 0.85rem;
    }

    .admin-category-sort::before {
        content: "Sort order: ";
        font-weight: 400;
    }

    .admin-navigation-inner {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;

        overflow: visible;
    }

    .admin-navigation a {
        min-width: 0;
        padding: 0.85rem 0.35rem;

        font-size: 0.8rem;

        text-align: center;
    }

    .admin-navigation a::after {
        right: 0.35rem;
        left: 0.35rem;
    }

    .admin-supplier-table-header {
        display: none;
    }

    .admin-supplier-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.5rem 0.75rem;
    }

    .admin-supplier-name {
        grid-column: 1;
        grid-row: 1;
    }

    .admin-supplier-status {
        grid-column: 2;
        grid-row: 1;
    }

    .admin-supplier-actions {
        grid-column: 3;
        grid-row: 1;

        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .admin-supplier-contact {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .admin-supplier-email {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .admin-supplier-telephone {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .admin-supplier-contact::before {
        content: "Contact: ";
        color: #8a847e;
        font-weight: 600;
    }

    .admin-supplier-email::before {
        content: "Email: ";
        color: #8a847e;
        font-weight: 600;
    }

    .admin-supplier-telephone::before {
        content: "Telephone: ";
        color: #8a847e;
        font-weight: 600;
    }

        .admin-goods-list-header {
        display: none;
    }

    .admin-supplier-contact,
    .admin-supplier-email,
    .admin-supplier-telephone {
        display: block;
        width: 100%;
        white-space: nowrap;
    }

    .admin-supplier-email a {
        display: inline;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .admin-goods-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem 1rem;
    }

    .admin-goods-reference {
        grid-column: 1;
        grid-row: 1;
    }

    .admin-goods-status {
        grid-column: 2;
        grid-row: 1;
    }

    .admin-goods-supplier,
    .admin-goods-supplier-reference,
    .admin-goods-received {
        grid-column: 1 / -1;
    }

    .admin-goods-supplier-reference::before {
        content: "Supplier ref: ";

        color: #8a847e;
        font-weight: 600;
    }

    .admin-goods-received::before {
        content: "Received: ";

        color: #8a847e;
        font-weight: 600;
    }

    .admin-goods-open {
        display: none;
    }

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


    .admin-goods-items-header {
        display: none;
    }


    .admin-goods-item-row {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 0.65rem 1.5rem;

        padding: 1rem;
    }


    .admin-goods-item-sku,
    .admin-goods-item-product,
    .admin-goods-item-quantity,
    .admin-goods-item-cost,
    .admin-goods-item-total,
    .admin-goods-item-action {
        min-width: 0;
    }


    .admin-goods-mobile-label {
        display: block;

        margin-bottom: 0.15rem;

        color: #8a847e;

        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }


    .admin-goods-item-action {
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
    }
}

/* ------------------------------------------------------------
   Admin Login
------------------------------------------------------------ */

.admin-login-page {
    min-height: 100vh;
    margin: 0;

    background: #f6f4f1;
    color: #181818;

    font-family: "Inter", Arial, sans-serif;
    line-height: 1.5;
}

.admin-login {
    min-height: 100vh;
    padding: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;

    background: #ffffff;

    border: 1px solid #e1ded9;
    border-radius: 16px;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
}

.admin-login-header {
    margin-bottom: 2rem;
    text-align: center;
}

.admin-login-logo {
    display: block;
    width: min(240px, 80%);
    height: auto;
    margin: 0 auto 1.75rem;
}

.admin-login-header h1 {
    margin: 0;

    font-family: "Playfair Display", Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
}

.admin-login-header p {
    margin: 0.5rem 0 0;

    color: #77716b;

    font-size: 0.9rem;
}

.admin-login-form .admin-form-group {
    margin-bottom: 1.25rem;
}

.admin-login-form label {
    display: block;
    margin-bottom: 0.4rem;

    font-size: 0.8rem;
    font-weight: 600;
}

.admin-login-form input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;

    background: #ffffff;
    color: #181818;

    border: 1px solid #cfcac4;
    border-radius: 8px;

    outline: none;
}

.admin-login-form input:focus {
    border-color: #181818;
    box-shadow: 0 0 0 3px rgba(24, 24, 24, 0.08);
}

.admin-password-field {
    position: relative;
}

.admin-password-field input {
    padding-right: 4.5rem;
}

.admin-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;

    padding: 0.25rem;

    background: transparent;
    color: #625d58;

    border: 0;

    font-size: 0.75rem;
    font-weight: 700;

    transform: translateY(-50%);
    cursor: pointer;
}

.admin-login-button {
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #181818;
    color: #ffffff;

    border: 1px solid #181818;
    border-radius: 8px;

    font-weight: 700;

    cursor: pointer;
}

.admin-login-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;

    border-top: 1px solid #eeeae6;

    text-align: center;
}

.admin-login-footer p {
    margin: 0;

    color: #8a847e;

    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-login-card .admin-alert {
    margin-bottom: 1.5rem;
}

.admin-login-card .admin-alert p {
    margin: 0;
}

.admin-login-card .admin-alert p + p {
    margin-top: 0.4rem;
}

.admin-login-card .admin-alert-error {
    background: #fff5f5;
    color: #8f2525;
    border-color: #e4bcbc;
}

.site-footer-admin {
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

.site-footer-admin a {
    color: inherit;
    opacity: 0.65;
    text-decoration: none;
}

.site-footer-admin a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================================
   Opening Stock
   ============================================================ */

.opening-stock-list {
    display: grid;
    gap: 12px;
}

.opening-stock-item {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.opening-stock-product {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opening-stock-sku {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #777;
}

.opening-stock-name {
    font-size: 1rem;
}

.opening-stock-form {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px 12px;
    align-items: end;
}

.opening-stock-label {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    font-weight: 600;
}

.opening-stock-form input[type="number"] {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.opening-stock-form .button {
    min-height: 42px;
    white-space: nowrap;
}

.opening-stock-complete h3 {
    margin-top: 0;
}


/* ------------------------------------------------------------
   Tablet and Desktop
   ------------------------------------------------------------ */

@media (min-width: 768px) {

    .opening-stock-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 24px;
        align-items: center;
    }

    .opening-stock-form {
        grid-template-columns: 90px auto;
        width: auto;
    }

    .opening-stock-form input[type="number"] {
        width: 90px;
    }
}


/* ============================================================
   599px
   ============================================================ */
@media (max-width: 599px) {

    .admin-goods-summary {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }


    .admin-goods-item-row {
        grid-template-columns: 1fr;
    }


    .admin-goods-item-action {
        justify-content: flex-start;
    }


    .admin-goods-item-action .admin-button {
        width: 100%;
    }
}

/* ============================================================
   600px
   ============================================================ */

@media (min-width: 600px) {

    .admin-header-inner {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }

    .admin-navigation-inner {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }

    .admin-main {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }

    .admin-footer-inner {
        padding-right: 1.5rem;
        padding-left: 1.5rem;

        flex-direction: row;
        justify-content: space-between;
    }

}

@media (max-width: 767px) {

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

    .admin-form-wide {
        grid-column: auto;
    }

}

/* ============================================================
   768px
   ============================================================ */

@media (min-width: 768px) {

    .admin-header-inner {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .admin-main {
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .admin-page-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

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

}


/* ============================================================
   900px
   ============================================================ */

@media (min-width: 900px) {

    .admin-brand-name {
        font-size: 1.85rem;
    }

    .admin-navigation a {
        padding-right: 1rem;
        padding-left: 1rem;
    }

}


/* ============================================================
   1200px
   ============================================================ */

@media (min-width: 1200px) {

    .admin-main {
        padding-top: 2.5rem;
    }

    .admin-grid {
        gap: 1.25rem;
    }

    .admin-dashboard-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
}


/* ------------------------------------------------------------
   Pointer / Hover
------------------------------------------------------------ */

@media (hover: hover) and (pointer: fine) {

    .admin-navigation a:hover {
        color: #181818;
    }

    .admin-button:hover {
        border-color: #181818;
    }

    .admin-button-primary:hover {
        background: #333333;
    }

    .admin-product-row:hover {
        background: #faf9f7;
    }

    .admin-dashboard-stat:hover {
        border-color: #c9c4be;
        transform: translateY(-1px);
    }

    .admin-dashboard-action:hover strong {
        text-decoration: underline;
    }

    .admin-goods-row:hover {
        background: #faf9f7;
    }

    .admin-login-button:hover {
        background: #333333;
    }

    .admin-password-toggle:hover {
        color: #181818;
    }
}