:root {
    --sidebar: #15344c;
    --sidebar-light: #1e4664;
    --accent: #3184b9;
    --accent-light: #eaf5fb;
    --background: #f3f6f9;
    --card: #ffffff;
    --text: #173148;
    --muted: #7b8d9e;
    --border: #e5ebef;
    --success: #158768;
    --danger: #cf4d4d;
    --warning: #d28a25;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

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

.sidebar {
    width: 255px;
    background: var(--sidebar);
    color: white;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.brand {
    height: 92px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 12px;
    font-size: 28px;
    font-weight: 400;
}

.brand strong {
    display: block;
    font-size: 18px;
}

.brand span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.58);
    margin-top: 3px;
}

.sidebar-nav {
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-nav a {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 15px;
    text-decoration: none;
    border-radius: 10px;
    color: rgba(255,255,255,.72);
    font-size: 14px;
    font-weight: 600;
    transition: .15s;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,.07);
    color: white;
}

.sidebar-nav a.active {
    background: var(--sidebar-light);
    color: white;
}

.sidebar-nav .terminal-link {
    margin-top: 22px;
    background: rgba(49,132,185,.16);
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 22px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.system-ok {
    color: rgba(255,255,255,.67);
    font-size: 12px;
    margin-bottom: 17px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #35c895;
    margin-right: 7px;
}

.admin-link {
    text-decoration: none;
    color: rgba(255,255,255,.64);
    font-size: 13px;
}

.main-area {
    margin-left: 255px;
    min-height: 100vh;
    width: calc(100% - 255px);
}

.topbar {
    height: 92px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
}

.topbar-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

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

.status-pill,
.user-pill {
    border: 1px solid var(--border);
    background: #f8fafb;
    border-radius: 20px;
    padding: 8px 13px;
    font-size: 12px;
}

.content {
    padding: 36px 38px 60px;
    max-width: 1600px;
    margin: 0 auto;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-heading h1 {
    font-size: 28px;
    margin: 0;
}

.page-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

.primary-button {
    text-decoration: none;
    background: var(--accent);
    color: white;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

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

.stats-grid.compact {
    grid-template-columns: repeat(3, 1fr);
    max-width: 850px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    min-height: 112px;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 5px 18px rgba(27,57,78,.035);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 39px 0 18px;
}

.section-header h2 {
    margin: 0;
    font-size: 21px;
}

.section-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.text-link {
    text-decoration: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

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

.zone-grid.large {
    grid-template-columns: repeat(2, 1fr);
}

.zone-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 24px;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(27,57,78,.035);
    transition: transform .15s, box-shadow .15s;
}

.zone-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(27,57,78,.09);
}

.zone-card-top {
    display: flex;
    align-items: center;
}

.zone-symbol {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-right: 15px;
}

.zone-symbol.cold {
    background: #e9f5fd;
    color: #267db5;
}

.zone-symbol.pantry {
    background: #fff5e9;
    color: #cc7b20;
}

.zone-card-title {
    flex: 1;
}

.zone-card-title h3 {
    margin: 0;
    font-size: 17px;
}

.zone-card-title span {
    color: var(--muted);
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.zone-arrow {
    color: var(--accent);
    font-size: 22px;
}

.zone-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 23px;
}

.metric {
    background: #f7f9fb;
    padding: 14px;
    border-radius: 10px;
}

.metric span,
.metric small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.metric strong {
    display: block;
    font-size: 18px;
    margin: 6px 0 4px;
}

.success {
    color: var(--success) !important;
}

.danger {
    color: var(--danger) !important;
}

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

.progress {
    height: 7px;
    background: #e9eef2;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 19px;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(27,57,78,.035);
}

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

.data-table th {
    background: #f8fafb;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table td small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

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

.empty-state {
    text-align: center;
    padding: 50px 25px;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    color: var(--text);
    margin-top: 10px;
}

.empty-state p {
    margin: 8px 0 0;
}

.empty-icon {
    font-size: 31px;
    color: #adc0cc;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
}

.zone-hero {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.zone-hero h1 {
    margin: 8px 0 4px;
}

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

.zone-type {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.temperature-card {
    min-width: 220px;
    border-left: 1px solid var(--border);
    padding-left: 30px;
}

.temperature-card span,
.temperature-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.temperature-card strong {
    font-size: 30px;
    display: block;
    margin: 7px 0;
}

.temperature-range {
    color: var(--muted);
    font-size: 11px;
    margin-top: 10px;
}

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

.location-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 19px;
}

.location-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.location-top strong {
    display: block;
}

.location-top span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

.capacity-status {
    font-size: 9px !important;
    font-weight: 700;
    text-align: right;
}

.location-number {
    font-size: 28px;
    font-weight: 700;
    margin-top: 24px;
}

.location-footer {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 10px;
    margin-top: 13px;
}

.search-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 8px 10px 8px 17px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 11px;
    font-size: 14px;
}

.search-bar button {
    border: 0;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    padding: 11px 17px;
    cursor: pointer;
}

.timeline {
    max-width: 900px;
}

.timeline-item {
    display: flex;
    gap: 18px;
    margin-bottom: 15px;
}

.timeline-symbol {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 20px;
}

.timeline-content {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    flex: 1;
}

.timeline-top {
    display: flex;
    justify-content: space-between;
}

.timeline-top span {
    color: var(--muted);
    margin-left: 10px;
    font-size: 11px;
}

.timeline-content h3 {
    margin: 15px 0 5px;
    font-size: 15px;
}

.timeline-content p,
.timeline-content small {
    color: var(--muted);
    margin: 0;
    font-size: 12px;
}

.terminal-wrapper {
    max-width: 1100px;
    margin: 20px auto;
}

.terminal-header {
    text-align: center;
    margin-bottom: 40px;
}

.terminal-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.terminal-header p {
    color: var(--muted);
}

.terminal-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.terminal-action {
    background: white;
    border: 2px solid transparent;
    border-radius: 19px;
    min-height: 270px;
    padding: 35px 28px;
    text-align: center;
    box-shadow: 0 6px 25px rgba(27,57,78,.06);
}

.terminal-action-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--accent-light);
    color: var(--accent);
}

.terminal-action h2 {
    font-size: 24px;
    margin: 0 0 12px;
}

.terminal-action p {
    color: var(--muted);
    min-height: 40px;
}

.terminal-action span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.terminal-action.entry:hover {
    border-color: #50b995;
}

.terminal-action.exit:hover {
    border-color: #e68484;
}

.terminal-action.transfer:hover {
    border-color: var(--accent);
}

.terminal-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 25px;
}

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

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

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

@media (max-width: 800px) {
    .sidebar {
        width: 74px;
    }

    .brand > div:not(.brand-icon),
    .sidebar-nav a {
        font-size: 0;
    }

    .sidebar-nav a {
        justify-content: center;
    }

    .sidebar-bottom {
        display: none;
    }

    .main-area {
        margin-left: 74px;
        width: calc(100% - 74px);
    }

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

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 25px 20px;
    }
}

.terminal-action-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: .18s;
}

.terminal-action-link:hover {
    transform: translateY(-4px);
}

.operation-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.operation-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 8px 30px rgba(27,57,78,.06);
}

.operation-card h1 {
    text-align: center;
    margin: 14px 0 8px;
}

.operation-card > p {
    text-align: center;
    color: var(--muted);
    margin-bottom: 30px;
}

.operation-symbol {
    width: 68px;
    height: 68px;
    margin: 0 auto;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    background: var(--accent-light);
    color: var(--accent);
}

.operation-card form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.operation-card label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.operation-card input[type="text"],
.operation-card input[type="number"],
.operation-card input[type="date"] {
    width: 100%;
    height: 54px;
    border: 1px solid #dce4e9;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 17px;
    outline: none;
    background: #fbfcfd;
}

.operation-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49,132,185,.10);
    background: white;
}

.checkbox-line {
    flex-direction: row !important;
    align-items: center;
    background: #f6f9fb;
    padding: 15px;
    border-radius: 10px;
}

.checkbox-line input {
    width: 19px;
    height: 19px;
}

.operation-submit {
    margin-top: 8px;
    height: 56px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.operation-submit:hover {
    filter: brightness(.95);
}

.messages {
    margin: 22px 0;
}

.message {
    padding: 15px 17px;
    border-radius: 10px;
    font-size: 13px;
}

.message.success {
    background: #e9f8f2;
    color: #117357;
}

.message.error {
    background: #fff0f0;
    color: #ae3939;
}

/* Listes opérateur */

.operation-card select {
    width: 100%;
    height: 54px;
    border: 1px solid #dce4e9;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    background: #fbfcfd;
}

.operation-card select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49,132,185,.10);
    background: white;
}


/* Emplacements cliquables */

.location-link {
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}

.location-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 23px rgba(27,57,78,.09);
}

.location-detail-link {
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

/* Listes opérateur */

.operation-card select {
    width: 100%;
    height: 54px;
    border: 1px solid #dce4e9;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    background: #fbfcfd;
}

.operation-card select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49,132,185,.10);
    background: white;
}


/* Emplacements cliquables */

.location-link {
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}

.location-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 23px rgba(27,57,78,.09);
}

.location-detail-link {
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}


/* ==========================================================
   AUTHENTIFICATION
   ========================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            135deg,
            #eef5f8 0%,
            #f7f9fb 100%
        );
}

.login-shell {
    width: 430px;
}

.login-brand {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    width: 60px;
    height: 60px;
    margin: auto;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3184b9;
    color: white;
    font-size: 40px;
}

.login-brand h1 {
    margin: 15px 0 5px;
}

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

.login-card {
    background: white;
    border-radius: 18px;
    padding: 34px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 45px rgba(27,57,78,.10);
}

.login-card h2 {
    margin: 0;
    font-size: 25px;
}

.login-subtitle {
    color: var(--muted);
    margin-bottom: 28px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.login-card label {
    font-size: 13px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    border: 1px solid #dce4e9;
    border-radius: 9px;
    padding: 0 14px;
    font-size: 16px;
}

.login-card button {
    height: 54px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}


/* ==========================================================
   MODE OPERATEUR
   ========================================================== */

.operator-shell {
    min-height: 100vh;
    background: #f3f6f9;
}

.operator-topbar {
    height: 78px;
    background: #15344c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.operator-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: white;
    text-decoration: none;
    font-size: 19px;
    font-weight: 700;
}

.operator-brand span {
    width: 37px;
    height: 37px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3184b9;
    font-size: 27px;
}

.operator-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.operator-user strong,
.operator-user small {
    display: block;
}

.operator-user small {
    color: #aac3d5;
    margin-top: 2px;
}

.operator-content {
    padding: 35px;
}

.logout-button {
    border: 1px solid rgba(255,255,255,.25);
    color: white;
    background: transparent;
    padding: 9px 13px;
    border-radius: 8px;
    cursor: pointer;
}

.logout-icon {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}

.user-pill strong,
.user-pill span {
    display: block;
}

.user-pill span {
    color: var(--muted);
    font-size: 9px;
    margin-top: 2px;
}

/* Déconnexion superviseur / administrateur */

.logout-button-light {
    color: #173148;
    border-color: #d9e2e8;
    background: #ffffff;
    font-weight: 600;
}

.logout-button-light:hover {
    background: #f3f6f9;
    border-color: #c5d2db;
}


/* ==========================================================
   JOURNAL DES MOUVEMENTS
   ========================================================== */

.movement-search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.movement-search-main {
    flex: 1;
    height: 52px;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 15px;
}

.search-icon {
    font-size: 21px;
    color: var(--muted);
    margin-right: 8px;
}

.movement-search-main input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 14px;
    background: transparent;
    color: var(--text);
}

.movement-search select {
    height: 52px;
    min-width: 190px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 11px;
    padding: 0 14px;
    color: var(--text);
    font-size: 13px;
}

.movement-search-button {
    border: 0;
    height: 52px;
    cursor: pointer;
}

.reset-search {
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
}

.movement-results-info {
    color: var(--muted);
    font-size: 12px;
    margin: 15px 3px;
}

.movement-results-info strong {
    color: var(--text);
}

.movement-table-panel {
    overflow: hidden;
}

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

.movement-table {
    min-width: 1050px;
}

.movement-table td {
    vertical-align: middle;
}

.movement-date strong {
    white-space: nowrap;
}

.movement-user {
    color: #225c82;
}

.movement-quantity {
    font-size: 15px;
}

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


/* Badges audit */

.audit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.audit-entree {
    color: #13775c;
    background: #e7f7f1;
}

.audit-sortie {
    color: #b44343;
    background: #fff0f0;
}

.audit-transfert {
    color: #286f9d;
    background: #eaf5fb;
}

.audit-correction {
    color: #956219;
    background: #fff4dd;
}


/* Pagination */

.pagination {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    font-size: 12px;
    color: var(--muted);
}

.pagination a {
    text-decoration: none;
    color: var(--accent);
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 13px;
}

.pagination a:hover {
    background: #f6f9fb;
}


@media (max-width: 900px) {

    .movement-search {
        flex-wrap: wrap;
    }

    .movement-search-main {
        flex-basis: 100%;
    }

    .movement-search select {
        flex: 1;
    }
}


/* Informations de stock dans le terminal */

.stock-info {
    margin-top: -8px;
    padding: 12px 15px;
    background: #eef7fc;
    border: 1px solid #d5e9f5;
    border-radius: 9px;
    color: #315d78;
    font-size: 12px;
}

.operation-card select:disabled,
.operation-card input:disabled {
    background: #f0f3f5;
    color: #9aa7b1;
    cursor: not-allowed;
}


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

.stock-search {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
}

.stock-search-main {
    flex: 1;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.stock-search-main input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
}

.stock-search select {
    min-width: 180px;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 12px;
    background: white;
}

.stock-global-table td {
    vertical-align: middle;
}

.stock-quantity {
    font-size: 16px;
}

.product-detail-link {
    color: var(--text);
    text-decoration: none;
}

.product-detail-link:hover {
    color: var(--accent);
}

.product-detail-link strong {
    color: inherit;
}


/* ==========================================================
   PEREMPTIONS
   ========================================================== */

.expiry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.expiry-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 18px;
    background: white;
    border: 1px solid var(--border);
    border-left-width: 5px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--text);
}

.expiry-card strong,
.expiry-card span,
.expiry-card small {
    display: block;
}

.expiry-card span,
.expiry-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.expiry-right {
    text-align: right;
    white-space: nowrap;
}

.expiry-expired {
    border-left-color: #b94747;
}

.expiry-urgent {
    border-left-color: #d77638;
}

.expiry-soon {
    border-left-color: #c79832;
}

.expiry-ok {
    border-left-color: #398b72;
}

.expiry-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
}

.expiry-badge.expiry-expired {
    background: #fff0f0;
    color: #a73e3e;
}

.expiry-badge.expiry-urgent {
    background: #fff1e9;
    color: #a85c2d;
}

.expiry-badge.expiry-soon {
    background: #fff7df;
    color: #8c6a1f;
}

.expiry-badge.expiry-ok {
    background: #e9f7f2;
    color: #29755d;
}


/* ==========================================================
   FICHE PRODUIT
   ========================================================== */

.product-hero {
    margin: 15px 0 25px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
}

.product-hero h1 {
    margin: 7px 0;
}

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

.product-code {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 9px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 11px;
}


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

.correction-link {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff7df;
    color: #80601d;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.correction-link:hover {
    background: #f9ebbd;
}

.operation-symbol.correction {
    background: #fff4d9;
    color: #9c721d;
}

.correction-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 25px 0;
    padding: 18px;
    background: #f6f9fb;
    border-radius: 11px;
}

.correction-summary div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.correction-summary span {
    color: var(--muted);
}

.correction-summary .current-stock {
    padding-top: 12px;
    margin-top: 5px;
    border-top: 1px solid var(--border);
}

.correction-summary .current-stock strong {
    font-size: 21px;
}

.correction-card textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #dce4e9;
    border-radius: 9px;
    padding: 12px;
    resize: vertical;
    font-family: inherit;
}

.correction-warning {
    padding: 13px 15px;
    background: #fff8e8;
    border: 1px solid #f1dfae;
    border-radius: 9px;
    color: #7c6425;
    font-size: 12px;
}

@media (max-width: 1000px) {
    .stock-search {
        flex-wrap: wrap;
    }

    .stock-search-main {
        flex-basis: 100%;
    }

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