/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #f4f6f8;
    color: #1f2937;
}


/* =========================================================
   LINKS
========================================================= */

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


/* =========================================================
   HEADER
========================================================= */

.main-header {
    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;

    z-index: 1000;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);
}


.header-container {
    max-width: 1400px;

    margin: 0 auto;
    padding: 0 20px;

    min-height: 68px;

    display: flex;
    align-items: center;
    gap: 30px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;
    align-items: center;

    gap: 10px;

    font-size: 21px;
    font-weight: 700;

    white-space: nowrap;
}


.logo-icon {
    width: 40px;
    height: 40px;

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

    background: #ecfdf5;

    border-radius: 12px;

    font-size: 23px;
}


.logo-text {
    color: #111827;
}


/* =========================================================
   NAVIGATION
========================================================= */

.main-nav {
    display: flex;
    align-items: center;

    gap: 5px;

    flex: 1;
}


.main-nav a {
    padding: 10px 12px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 500;

    color: #4b5563;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


.main-nav a:hover {
    background: #f3f4f6;
    color: #111827;
}


.main-nav a.active {
    background: #ecfdf5;
    color: #047857;

    font-weight: 600;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-button {
    display: none;

    margin-left: auto;

    background: transparent;

    border: 0;

    font-size: 25px;

    cursor: pointer;

    padding: 8px;
}


/* =========================================================
   PAGE
========================================================= */

.page-container {
    max-width: 1400px;

    margin: 0 auto;

    padding: 30px 20px 60px;
}


/* =========================================================
   PAGE TITLES
========================================================= */

.page-header {
    margin-bottom: 25px;
}


.page-header h1 {
    margin: 0 0 7px;

    font-size: 28px;
    color: #111827;
}


.page-header p {
    margin: 0;

    color: #6b7280;
}


/* =========================================================
   CARDS
========================================================= */

.card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 20px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 16px;

    border-radius: 9px;

    border: 0;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        transform 0.1s ease;
}


.btn:active {
    transform: scale(0.98);
}


.btn-primary {
    background: #059669;
    color: white;
}


.btn-primary:hover {
    background: #047857;
}


.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}


.btn-secondary:hover {
    background: #d1d5db;
}


.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}


.btn-danger:hover {
    background: #fecaca;
}


/* =========================================================
   FORMS
========================================================= */

.form-group {
    margin-bottom: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
    font-size: 14px;

    color: #374151;
}


.form-control {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: white;

    color: #111827;

    font-family: inherit;
    font-size: 15px;
}


.form-control:focus {
    outline: none;

    border-color: #10b981;

    box-shadow:
        0 0 0 3px rgba(16, 185, 129, 0.12);
}


/* =========================================================
   TABLES
========================================================= */

.table-wrapper {
    overflow-x: auto;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 14px;
}


table {
    width: 100%;

    border-collapse: collapse;
}


th,
td {
    padding: 13px 15px;

    text-align: left;

    border-bottom: 1px solid #e5e7eb;
}


th {
    background: #f9fafb;

    color: #4b5563;

    font-size: 13px;

    font-weight: 600;
}


td {
    font-size: 14px;
}


tbody tr:hover {
    background: #fafafa;
}


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


/* =========================================================
   BADGES
========================================================= */

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

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}


.badge-green {
    background: #d1fae5;
    color: #065f46;
}


.badge-orange {
    background: #ffedd5;
    color: #9a3412;
}


.badge-red {
    background: #fee2e2;
    color: #991b1b;
}


.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}


/* =========================================================
   ALERTS
========================================================= */

.alert {
    padding: 14px 16px;

    border-radius: 10px;

    margin-bottom: 20px;
}


.alert-success {
    background: #d1fae5;
    color: #065f46;
}


.alert-warning {
    background: #fef3c7;
    color: #92400e;
}


.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}


/* =========================================================
   FOOTER
========================================================= */

.main-footer {
    border-top: 1px solid #e5e7eb;

    background: white;

    color: #9ca3af;

    font-size: 13px;
}


.footer-container {
    max-width: 1400px;

    margin: 0 auto;

    padding: 20px;

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


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 950px) {

    .header-container {
        flex-wrap: wrap;

        padding-top: 10px;
        padding-bottom: 10px;
    }


    .mobile-menu-button {
        display: block;
    }


    .main-nav {
        display: none;

        width: 100%;

        flex-direction: column;
        align-items: stretch;

        padding-bottom: 10px;
    }


    .main-nav.open {
        display: flex;
    }


    .main-nav a {
        padding: 12px 14px;
    }

}


@media (max-width: 600px) {

    .page-container {
        padding:
            20px
            14px
            50px;
    }


    .page-header h1 {
        font-size: 24px;
    }


    .logo-text {
        font-size: 18px;
    }


    .card {
        padding: 16px;
    }

}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.dashboard-header-actions {
    flex-shrink: 0;
}


/* =========================================================
   STATISTICS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 15px;

    margin-bottom: 35px;
}


.stat-card {
    min-height: 110px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 18px;

    display: flex;
    align-items: center;

    gap: 14px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}


.stat-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.07);

    border-color: #d1d5db;
}


.stat-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

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

    background: #f3f4f6;

    border-radius: 13px;

    font-size: 23px;
}


.stat-number {
    font-size: 26px;
    font-weight: 700;

    color: #111827;

    line-height: 1.1;
}


.stat-label {
    margin-top: 4px;

    color: #6b7280;

    font-size: 13px;
}


.stat-warning {
    border-color: #fed7aa;
    background: #fffaf5;
}


.stat-danger {
    border-color: #fecaca;
    background: #fff7f7;
}


.stat-expiring {
    border-color: #fde68a;
    background: #fffdf5;
}


/* =========================================================
   DASHBOARD SECTIONS
========================================================= */

.dashboard-section {
    margin-bottom: 35px;
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 17px;
}


.section-header h2 {
    margin: 0 0 4px;

    font-size: 19px;

    color: #111827;
}


.section-header p {
    margin: 0;

    font-size: 13px;

    color: #9ca3af;
}


.section-link {
    flex-shrink: 0;

    font-size: 13px;
    font-weight: 600;

    color: #059669;
}


.section-link:hover {
    color: #047857;
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

.quick-actions-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}


.quick-action-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 17px;

    display: flex;
    align-items: center;

    gap: 13px;

    transition:
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.quick-action-card:hover {
    transform: translateY(-2px);

    border-color: #a7f3d0;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.05);
}


.quick-action-icon {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

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

    border-radius: 12px;

    background: #ecfdf5;

    font-size: 21px;
}


.quick-action-card strong {
    display: block;

    margin-bottom: 3px;

    font-size: 14px;

    color: #111827;
}


.quick-action-card span {
    display: block;

    font-size: 12px;

    color: #9ca3af;
}


/* =========================================================
   DASHBOARD COLUMNS
========================================================= */

.dashboard-two-columns {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


.dashboard-panel {
    padding: 20px;
}


/* =========================================================
   DASHBOARD LIST
========================================================= */

.dashboard-list {
    display: flex;

    flex-direction: column;
}


.dashboard-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 13px 0;

    border-bottom: 1px solid #f3f4f6;
}


.dashboard-list-row:first-child {
    padding-top: 3px;
}


.dashboard-list-row:last-child {
    border-bottom: 0;

    padding-bottom: 0;
}


.dashboard-list-main {
    min-width: 0;
}


.dashboard-list-main strong {
    display: block;

    margin-bottom: 3px;

    font-size: 14px;

    color: #111827;
}


.dashboard-list-main span {
    display: block;

    font-size: 12px;

    color: #9ca3af;
}


.dashboard-list-value {
    flex-shrink: 0;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    padding: 35px 20px;

    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
}


.empty-state-icon {
    margin-bottom: 10px;

    font-size: 30px;
}


.empty-state strong {
    margin-bottom: 5px;

    font-size: 14px;

    color: #374151;
}


.empty-state span {
    font-size: 12px;

    color: #9ca3af;
}


/* =========================================================
   DASHBOARD RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

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


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

}


@media (max-width: 800px) {

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

}


@media (max-width: 600px) {

    .dashboard-header {
        align-items: flex-start;
    }


    .dashboard-header .btn {
        padding: 10px 12px;
    }


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

        gap: 10px;

        margin-bottom: 27px;
    }


    .stat-card {
        min-height: 95px;

        padding: 13px;

        gap: 10px;
    }


    .stat-icon {
        width: 38px;
        height: 38px;

        font-size: 19px;
    }


    .stat-number {
        font-size: 22px;
    }


    .stat-label {
        font-size: 11px;
    }


    .quick-actions-grid {
        grid-template-columns: 1fr;
    }


    .dashboard-list-row {
        gap: 10px;
    }

}

/* =========================================================
   STOCK PAGE
========================================================= */

.stock-filter-card {
    margin-bottom: 30px;
}


.stock-filter-form {
    display: grid;

    grid-template-columns:
        minmax(200px, 2fr)
        minmax(180px, 1fr)
        auto;

    gap: 15px;

    align-items: end;
}


.stock-filter-field label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 600;

    color: #374151;
}


.stock-filter-actions {
    display: flex;
    gap: 8px;
}


/* =========================================================
   LOCATIONS
========================================================= */

.stock-location-section {
    margin-bottom: 35px;
}


.stock-location-header {
    margin-bottom: 15px;

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


.stock-location-header h2 {
    margin: 0 0 4px;

    font-size: 20px;

    color: #111827;
}


.stock-location-header span {
    font-size: 13px;

    color: #9ca3af;
}


/* =========================================================
   STOCK ITEM CARDS
========================================================= */

.stock-items-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 15px;
}


.stock-item-card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 18px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);
}


.stock-item-low {
    border-color: #fed7aa;
    background: #fffaf5;
}


.stock-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 15px;

    margin-bottom: 13px;
}


.stock-item-header h3 {
    margin: 0 0 4px;

    font-size: 16px;

    color: #111827;
}


.stock-item-id {
    font-size: 11px;

    color: #9ca3af;
}


/* =========================================================
   QUANTITY
========================================================= */

.stock-quantity {
    flex-shrink: 0;

    text-align: right;
}


.stock-quantity strong {
    display: block;

    font-size: 26px;

    color: #059669;

    line-height: 1;
}


.stock-quantity span {
    display: block;

    margin-top: 4px;

    font-size: 11px;

    color: #9ca3af;
}


/* =========================================================
   MINIMUM
========================================================= */

.stock-minimum {
    padding: 9px 0;

    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;

    font-size: 12px;

    color: #6b7280;

    display: flex;
    align-items: center;

    gap: 7px;
}


/* =========================================================
   BATCHES
========================================================= */

.stock-batches {
    padding: 8px 0;
}


.stock-batch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 7px 0;

    font-size: 12px;

    color: #6b7280;

    border-bottom: 1px dashed #f3f4f6;
}


.stock-batch-row:last-child {
    border-bottom: 0;
}


/* =========================================================
   ACTIONS
========================================================= */

.stock-item-actions {
    margin-top: 10px;

    display: flex;
    justify-content: flex-end;
}


.stock-item-actions .btn {
    padding: 7px 12px;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

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

}


@media (max-width: 750px) {

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


    .stock-filter-actions {
        width: 100%;
    }


    .stock-filter-actions .btn {
        flex: 1;
    }


    .stock-items-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   SIMPLE STOCK PAGE
========================================================= */

.simple-stock-filters {
    display: grid;

    grid-template-columns:
        minmax(250px, 2fr)
        minmax(200px, 1fr)
        auto
        auto;

    gap: 12px;

    align-items: center;

    margin-bottom: 25px;
}


/* =========================================================
   LOCATION GRID
========================================================= */

.simple-stock-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    align-items: start;
}


/* =========================================================
   LOCATION CARD
========================================================= */

.simple-location-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    padding: 18px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);
}


.simple-location-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 10px;

    margin-bottom: 16px;
}


.simple-location-title h2 {
    margin: 0;

    font-size: 20px;

    color: #111827;
}


.simple-location-title span {
    font-size: 19px;
}


/* =========================================================
   STOCK TABLE
========================================================= */

.simple-stock-table {
    width: 100%;
}


/* HEADER */

.simple-stock-head {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        45px
        115px;

    gap: 8px;

    align-items: center;

    padding: 10px 8px;

    background: #f3f4f6;

    font-size: 13px;
    font-weight: 700;

    color: #111827;
}


/* ROW */

.simple-stock-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        45px
        115px;

    gap: 8px;

    align-items: center;

    padding: 9px 8px;

    border-bottom: 1px solid #e5e7eb;
}


.simple-stock-row:last-child {
    border-bottom: 0;
}


.simple-stock-item-title {
    min-width: 0;

    overflow-wrap: anywhere;

    font-size: 14px;

    color: #111827;
}


.quantity-column {
    text-align: center;

    font-weight: 600;
}


.actions-column {
    display: flex;

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

    gap: 6px;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.stock-action-btn {
    width: 30px;
    height: 30px;

    display: inline-flex;

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

    border-radius: 50%;

    font-size: 17px;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform 0.1s ease,
        opacity 0.1s ease;
}


.stock-action-btn:hover {
    transform: scale(1.08);
}


.stock-action-btn:active {
    transform: scale(0.95);
}


/* ADD */

.stock-action-add {
    background: #22c55e;
    color: white;
}


/* MOVE */

.stock-action-move {
    background: #3b82f6;
    color: white;
}


/* DELETE */

.stock-action-delete {
    background: #ef4444;
    color: white;

    font-size: 14px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1150px) {

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

}


@media (max-width: 800px) {

    .simple-stock-filters {
        grid-template-columns:
            1fr
            1fr;
    }

}


@media (max-width: 650px) {

    .simple-stock-grid {
        grid-template-columns: 1fr;
    }


    .simple-stock-filters {
        grid-template-columns: 1fr;
    }


    .simple-stock-head,
    .simple-stock-row {
        grid-template-columns:
            minmax(0, 1fr)
            40px
            110px;
    }


    .simple-location-card {
        padding: 14px;
    }


    .simple-location-title h2 {
        font-size: 18px;
    }

}

/* =========================================================
   ADD STOCK
========================================================= */

.add-stock-layout {
    max-width: 600px;
}


.add-stock-card {
    padding: 25px;
}


/* =========================================================
   QUANTITY CONTROL
========================================================= */

.quantity-input-wrapper {
    display: grid;

    grid-template-columns:
        48px
        minmax(80px, 1fr)
        48px;

    gap: 8px;
}


.quantity-button {
    border: 0;

    border-radius: 9px;

    background: #ecfdf5;

    color: #047857;

    font-size: 24px;
    font-weight: 700;

    cursor: pointer;
}


.quantity-button:hover {
    background: #d1fae5;
}


.quantity-input {
    text-align: center;

    font-size: 18px;
    font-weight: 600;
}


/* =========================================================
   ADD STOCK ACTIONS
========================================================= */

.add-stock-actions {
    display: flex;

    gap: 10px;

    margin-top: 25px;
}


.add-stock-submit {
    min-width: 160px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .add-stock-layout {
        max-width: none;
    }


    .add-stock-card {
        padding: 18px;
    }


    .add-stock-actions {
        flex-direction: column;
    }


    .add-stock-actions .btn {
        width: 100%;
    }

}

/* =========================================================
   MOVE STOCK
========================================================= */

.move-stock-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    padding: 15px;

    margin-bottom: 22px;

    background: #f9fafb;

    border-radius: 10px;
}


.move-stock-summary > div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}


.move-stock-label {
    font-size: 11px;
    color: #9ca3af;
}


.move-stock-summary strong {
    font-size: 14px;
    color: #111827;
}


@media (max-width: 600px) {

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

}

/* =========================================================
   DELETE STOCK PAGE
========================================================= */

.delete-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.delete-page-header h1 {
    margin: 0 0 6px;
    font-size: 30px;
    color: #111827;
}

.delete-page-header p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   SUMMARY
========================================================= */

.delete-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin-bottom: 25px;

    padding: 20px 25px;

    background: #ffffff;

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

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.delete-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 0 20px;

    border-right: 1px solid #e5e7eb;
}

.delete-summary > div:first-child {
    padding-left: 0;
}

.delete-summary > div:last-child {
    border-right: 0;
}

.delete-summary span {
    font-size: 13px;
    color: #6b7280;
}

.delete-summary strong {
    font-size: 18px;
    color: #111827;
}


/* =========================================================
   MAIN CARD
========================================================= */

.delete-stock-card {
    padding: 25px;
}

.delete-stock-card-header {
    margin-bottom: 20px;
}

.delete-stock-card-header h2 {
    margin: 0 0 5px;
    font-size: 22px;
    color: #111827;
}

.delete-stock-card-header p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   TABLE
========================================================= */

.delete-stock-table-wrapper {
    overflow-x: auto;

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

.delete-stock-table {
    width: 100%;

    border-collapse: collapse;

    background: #ffffff;
}

.delete-stock-table th {
    padding: 14px 16px;

    background: #f3f4f6;

    text-align: left;

    font-size: 13px;
    font-weight: 700;

    color: #111827;

    border-bottom: 1px solid #e5e7eb;
}

.delete-stock-table td {
    padding: 13px 16px;

    vertical-align: middle;

    border-bottom: 1px solid #e5e7eb;
}

.delete-stock-table tbody tr:last-child td {
    border-bottom: 0;
}

.delete-stock-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   DATE / AVAILABLE
========================================================= */

.no-expiration {
    font-style: italic;
    color: #6b7280;
}

.available-badge {
    display: inline-flex;

    min-width: 36px;

    justify-content: center;

    padding: 5px 9px;

    background: #f3f4f6;

    border-radius: 20px;

    font-weight: 700;

    color: #111827;
}


/* =========================================================
   QUANTITY
========================================================= */

.batch-quantity {
    width: 130px;

    text-align: center;

    font-weight: 600;
}


/* =========================================================
   INFO BOX
========================================================= */

.delete-info-box {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    margin-top: 20px;

    padding: 15px 18px;

    border: 1px solid #bfdbfe;

    border-radius: 10px;

    background: #eff6ff;

    color: #1d4ed8;

    font-size: 13px;

    line-height: 1.7;
}

.delete-info-icon {
    font-size: 20px;
}


/* =========================================================
   BUTTON BAR
========================================================= */

.delete-stock-actions {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-top: 22px;
}

.delete-stock-actions-left {
    display: flex;

    gap: 10px;
}

.delete-all-button {
    padding-left: 20px;
    padding-right: 20px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 750px) {

    .delete-page-header {
        flex-direction: column;
    }

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

    .delete-summary > div {
        padding: 12px 0;

        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .delete-summary > div:first-child {
        padding-top: 0;
    }

    .delete-summary > div:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .delete-stock-card {
        padding: 15px;
    }

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

    .delete-stock-actions-left {
        flex-direction: column;
    }

    .delete-stock-actions .btn {
        width: 100%;
    }

    .batch-quantity {
        width: 90px;
    }
}

/* =========================================================
   ITEMS PAGE
========================================================= */

.items-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}

.items-page-header h1 {
    margin: 0 0 5px;
}

.items-page-header p {
    margin: 0;

    color: #6b7280;
}


/* =========================================================
   SEARCH
========================================================= */

.items-search {
    display: grid;

    grid-template-columns:
        minmax(250px, 1fr)
        auto
        auto;

    gap: 10px;

    margin-bottom: 20px;
}


/* =========================================================
   CARD
========================================================= */

.items-card {
    padding: 0;

    overflow: hidden;
}


/* =========================================================
   TABLE
========================================================= */

.items-table-wrapper {
    overflow-x: auto;
}

.items-table {
    width: 100%;

    border-collapse: collapse;
}

.items-table th {
    padding: 13px 16px;

    background: #f3f4f6;

    text-align: left;

    font-size: 13px;

    color: #374151;

    border-bottom: 1px solid #e5e7eb;
}

.items-table td {
    padding: 13px 16px;

    border-bottom: 1px solid #e5e7eb;

    vertical-align: middle;
}

.items-table tbody tr:last-child td {
    border-bottom: 0;
}

.items-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   ITEM NAME
========================================================= */

.item-name {
    display: flex;

    flex-direction: column;

    gap: 3px;
}

.item-name strong {
    color: #111827;
}

.item-name span {
    font-size: 12px;

    color: #9ca3af;
}


/* =========================================================
   STOCK
========================================================= */

.stock-status {
    display: inline-flex;

    min-width: 36px;

    justify-content: center;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 13px;

    font-weight: 700;
}

.stock-ok {
    background: #dcfce7;

    color: #166534;
}

.stock-low {
    background: #fee2e2;

    color: #991b1b;
}


/* =========================================================
   ACTIONS
========================================================= */

.item-actions {
    display: flex;

    align-items: center;

    gap: 7px;
}

.item-edit-button {
    width: 30px;
    height: 30px;

    display: inline-flex;

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

    border-radius: 50%;

    background: #f3f4f6;

    text-decoration: none;

    font-size: 14px;
}

.item-edit-button:hover {
    background: #e5e7eb;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

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

    .items-page-header .btn {
        width: 100%;
    }

    .items-search {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   ADD ITEM
========================================================= */

.item-description {
    min-height: 110px;
    resize: vertical;
}

.form-help {
    display: block;
    margin-top: 6px;

    font-size: 12px;
    line-height: 1.5;

    color: #6b7280;
}

/* =========================================================
   EDIT ITEM
========================================================= */

.edit-item-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 620px)
        minmax(260px, 1fr);

    gap: 20px;

    align-items: start;
}


.edit-item-card {
    padding: 25px;
}


/* =========================================================
   CURRENT STOCK
========================================================= */

.edit-item-stock-info {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-top: 20px;

    padding: 14px 16px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;
    border-radius: 9px;
}

.edit-item-stock-info span {
    font-size: 13px;
    color: #6b7280;
}

.edit-item-stock-info strong {
    font-size: 20px;
    color: #111827;
}


/* =========================================================
   DELETE ITEM
========================================================= */

.delete-item-card {
    padding: 22px;

    border-color: #fecaca;
}

.delete-item-card h2 {
    margin: 0 0 12px;

    font-size: 18px;

    color: #991b1b;
}

.delete-item-card p {
    margin: 0 0 12px;

    line-height: 1.5;

    font-size: 13px;

    color: #6b7280;
}

.delete-item-card .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 850px) {

    .edit-item-layout {
        grid-template-columns: 1fr;
    }

}

.location-description {
    font-size: 14px !important;
    font-weight: 400;
    color: #6b7280;
}

/* =========================================================
   EXPIRING PAGE
========================================================= */

.expiring-filter {
    display: flex;
    align-items: end;
    gap: 10px;

    margin-bottom: 30px;
}

.expiring-filter > div {
    min-width: 250px;
}

.expiring-filter label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 600;

    color: #374151;
}


/* =========================================================
   SECTIONS
========================================================= */

.expiration-section {
    margin-bottom: 35px;
}

.expiration-section-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 12px;
}

.expiration-section-title h2 {
    margin: 0 0 3px;

    font-size: 20px;
}

.expiration-section-title p {
    margin: 0;

    font-size: 13px;

    color: #6b7280;
}


/* =========================================================
   COUNT
========================================================= */

.expiration-count {
    display: inline-flex;

    min-width: 34px;
    height: 34px;

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

    padding: 0 10px;

    border-radius: 20px;

    font-size: 14px;
    font-weight: 700;
}

.expiration-count-danger {
    background: #fee2e2;
    color: #991b1b;
}

.expiration-count-warning {
    background: #ffedd5;
    color: #9a3412;
}


/* =========================================================
   TABLE
========================================================= */

.expiration-card {
    padding: 0;
    overflow: hidden;
}

.expiration-table-wrapper {
    overflow-x: auto;
}

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

.expiration-table th {
    padding: 13px 16px;

    background: #f3f4f6;

    text-align: left;

    font-size: 13px;
    font-weight: 700;

    color: #374151;

    border-bottom: 1px solid #e5e7eb;
}

.expiration-table td {
    padding: 13px 16px;

    vertical-align: middle;

    border-bottom: 1px solid #e5e7eb;
}

.expiration-table tbody tr:last-child td {
    border-bottom: 0;
}

.expiration-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   EXPIRED ROW
========================================================= */

.expiration-row-expired {
    background: #fffafa;
}

.expiration-row-expired:hover {
    background: #fef2f2 !important;
}


/* =========================================================
   LOCATION
========================================================= */

.expiration-location {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.expiration-location strong {
    font-size: 13px;
}

.expiration-location span {
    font-size: 11px;
    color: #9ca3af;
}


/* =========================================================
   STATUS
========================================================= */

.expiration-status {
    display: inline-flex;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.expiration-status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.expiration-status-warning {
    background: #ffedd5;
    color: #9a3412;
}

.expiration-status-today {
    background: #fecaca;
    color: #7f1d1d;
}

.expiration-date-danger {
    color: #dc2626;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

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

    .expiring-filter > div {
        min-width: 0;
    }

    .expiring-filter .btn {
        width: 100%;
    }

}

/* =========================================================
   SHOPPING PAGE
========================================================= */

.shopping-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.shopping-page-header h1 {
    margin: 0 0 5px;
}

.shopping-page-header p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   SUMMARY
========================================================= */

.shopping-summary-header {
    display: flex;
    gap: 10px;
}

.shopping-summary-box {
    min-width: 105px;
    padding: 10px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;

    background: #ffffff;

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

.shopping-summary-box span {
    font-size: 11px;
    color: #9ca3af;
}

.shopping-summary-box strong {
    margin-top: 2px;

    font-size: 21px;
    color: #111827;
}


/* =========================================================
   SECTIONS
========================================================= */

.shopping-section {
    margin-bottom: 35px;
}

.shopping-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 12px;
}

.shopping-section-header h2 {
    margin: 0 0 3px;

    font-size: 20px;
}

.shopping-section-header p {
    margin: 0;

    font-size: 13px;
    color: #6b7280;
}

.shopping-section-count {
    min-width: 35px;
    height: 35px;

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

    padding: 0 10px;

    border-radius: 20px;

    background: #dcfce7;
    color: #166534;

    font-weight: 700;
}

.shopping-section-count-blue {
    background: #dbeafe;
    color: #1d4ed8;
}


/* =========================================================
   TABLE
========================================================= */

.shopping-card {
    padding: 0;
    overflow: hidden;
}

.shopping-table-wrapper {
    overflow-x: auto;
}

.shopping-table {
    width: 100%;

    border-collapse: collapse;
}

.shopping-table th {
    padding: 13px 16px;

    background: #f3f4f6;

    text-align: left;

    font-size: 13px;
    font-weight: 700;

    color: #374151;

    border-bottom: 1px solid #e5e7eb;
}

.shopping-table td {
    padding: 13px 16px;

    vertical-align: middle;

    border-bottom: 1px solid #e5e7eb;
}

.shopping-table tbody tr:last-child td {
    border-bottom: 0;
}

.shopping-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   CHECK
========================================================= */

.shopping-check-column {
    width: 45px;
    text-align: center !important;
}

.shopping-checkbox {
    width: 18px;
    height: 18px;

    cursor: pointer;
}


/* =========================================================
   ITEM
========================================================= */

.shopping-item-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shopping-item-name span {
    font-size: 11px;
    color: #9ca3af;
}


/* =========================================================
   STOCK
========================================================= */

.shopping-current {
    display: inline-flex;

    min-width: 34px;

    justify-content: center;

    padding: 5px 9px;

    border-radius: 20px;

    background: #fee2e2;
    color: #991b1b;

    font-weight: 700;
}

.shopping-buy-badge {
    display: inline-flex;

    min-width: 34px;

    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    background: #dbeafe;
    color: #1d4ed8;

    font-weight: 700;
}


/* =========================================================
   LOCATION
========================================================= */

.shopping-location {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shopping-location strong {
    font-size: 13px;
}

.shopping-location span {
    font-size: 11px;
    color: #9ca3af;
}


/* =========================================================
   CHECKED ROW
========================================================= */

.shopping-row-completed {
    opacity: 0.4;
}

.shopping-row-completed td {
    text-decoration-color: #9ca3af;
}

.shopping-row-completed strong {
    text-decoration: line-through;
}


/* =========================================================
   MANUAL ADD FORM
========================================================= */

.manual-shopping-add-card {
    margin-bottom: 15px;

    padding: 18px;
}

.manual-shopping-form {
    display: grid;

    grid-template-columns:
        minmax(250px, 1fr)
        220px
        auto;

    gap: 15px;

    align-items: end;
}

.manual-shopping-form label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 600;

    color: #374151;
}

.manual-quantity-control {
    display: grid;

    grid-template-columns:
        42px
        80px
        42px;

    gap: 6px;
}

.manual-add-button {
    height: 42px;

    padding-left: 22px;
    padding-right: 22px;
}


/* =========================================================
   MANUAL FOOTER
========================================================= */

.manual-shopping-footer {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 16px 20px;

    background: #fafafa;

    border-top: 1px solid #e5e7eb;
}

.manual-shopping-footer-info {
    font-size: 13px;
    color: #6b7280;
}

.manual-shopping-footer-info strong {
    color: #111827;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

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

    .manual-add-button {
        width: 100%;
    }

}


@media (max-width: 700px) {

    .shopping-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .shopping-summary-header {
        width: 100%;
    }

    .shopping-summary-box {
        flex: 1;
    }

    .manual-shopping-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .manual-shopping-footer .btn {
        width: 100%;
    }

}

/* =========================================================
   LOCATIONS PAGE
========================================================= */

.locations-page-header {
    margin-bottom: 25px;
}

.locations-page-header h1 {
    margin: 0 0 5px;
}

.locations-page-header p {
    margin: 0;
    color: #6b7280;
}


/* =========================================================
   LAYOUT
========================================================= */

.locations-layout {
    display: grid;

    grid-template-columns:
        minmax(280px, 360px)
        minmax(0, 1fr);

    gap: 20px;

    align-items: start;
}


/* =========================================================
   ADD LOCATION
========================================================= */

.locations-add-card {
    padding: 22px;
}

.locations-add-card h2 {
    margin: 0 0 4px;

    font-size: 19px;
}

.locations-card-help {
    margin: 0 0 20px;

    font-size: 13px;

    color: #6b7280;
}

.location-description-input {
    min-height: 90px;

    resize: vertical;
}


/* =========================================================
   LIST CARD
========================================================= */

.locations-list-card {
    padding: 0;

    overflow: hidden;
}

.locations-list-header {
    padding: 20px;

    border-bottom: 1px solid #e5e7eb;
}

.locations-list-header h2 {
    margin: 0 0 3px;

    font-size: 19px;
}

.locations-list-header p {
    margin: 0;

    font-size: 12px;

    color: #9ca3af;
}


/* =========================================================
   TABLE
========================================================= */

.locations-table-wrapper {
    overflow-x: auto;
}

.locations-table {
    width: 100%;

    border-collapse: collapse;
}

.locations-table th {
    padding: 13px 15px;

    background: #f3f4f6;

    text-align: left;

    font-size: 12px;
    font-weight: 700;

    color: #374151;

    border-bottom: 1px solid #e5e7eb;
}

.locations-table td {
    padding: 13px 15px;

    vertical-align: middle;

    border-bottom: 1px solid #e5e7eb;
}

.locations-table tbody tr:last-child td {
    border-bottom: 0;
}

.locations-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   BADGES
========================================================= */

.location-name {
    color: #111827;
}

.location-count-badge,
.location-stock-badge {
    display: inline-flex;

    min-width: 34px;

    justify-content: center;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 700;
}

.location-count-badge {
    background: #f3f4f6;
    color: #374151;
}

.location-stock-badge {
    background: #dcfce7;
    color: #166534;
}


/* =========================================================
   ACTIONS
========================================================= */

.location-actions {
    display: flex;

    align-items: center;

    gap: 7px;
}

.location-actions form {
    margin: 0;
}

.location-action-btn {
    width: 30px;
    height: 30px;

    display: inline-flex;

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

    border: 0;

    border-radius: 50%;

    cursor: pointer;

    text-decoration: none;

    font-size: 14px;
}

.location-action-edit {
    background: #dbeafe;

    color: #1d4ed8;
}

.location-action-edit:hover {
    background: #bfdbfe;
}

.location-action-delete {
    background: #fee2e2;

    color: #991b1b;
}

.location-action-delete:hover:not(:disabled) {
    background: #fecaca;
}

.location-action-delete:disabled {
    opacity: 0.35;

    cursor: not-allowed;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 950px) {

    .locations-layout {
        grid-template-columns: 1fr;
    }

}
