
/* CSS : THEME */
:root {
    --background: #ffffff;
    --text: #5e6064;
    --text-gray: #727477;

    --gray: #ececec;
    --red: #c95151;
    --green: #65c951;
    --white: #5e6064;
    --realwhite: #ffffff;
}

.dark-mode {
    --background: #131414;
    --text: #ffffff;
    --text-gray: #727477;
    
    --gray: #212224;
    --red: #c95151;
    --green: #65c951;
    --white: #ffffff;
    --realwhite: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: block !important;
    justify-content: center;
    align-items: center;
    
    min-height: 100vh;
    padding: 0;
    margin: 0;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;

    background-color: var(--background);
    color: var(--text);
    color-scheme: light;
}

body.dark-mode { color-scheme: dark; }

/* CSS : BLOCK */

html, body {
  height: 100%;
}

.dashboard-container,
.dashboard-body,
.dashboard-content,
.dashboard-table {
  min-height: 0;
}

.dashboard-container {
    /* border: 1px solid #00aeff !important; */

    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    align-items: stretch;

    width: 100%;
    height: 100vh;
    min-height: 0;

    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    
    border-radius: 8px;
}

.dashboard-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--gray);
    transition: transform 0.2s ease;
}

.dashboard-image:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.dashboard-header {
    /* border: 1px solid #ff00c8 !important;	 */
    
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 20px;
}

.dashboard-body {
    /* border: 1px solid #ff00c8 !important;	 */
    display: flex;
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 0;

    overflow: hidden;
}

.dashboard-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.dashboard-nav {
    /* border: 1px solid #00ff40 !important; */
    display: flex;
    flex: 1;
    flex-basis: 30vh;
    width: 30vh;
    margin-right: 20px;
    border-right: 1px solid var(--gray);
    padding-right: 20px;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
}

html.menu-hidden-preload .dashboard-nav {
    display: none !important;
}

.dashboard-nav-inner{
    /* border: 1px solid #f6fa00 !important; */
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 768px) {
    .dashboard-nav {
        position: fixed !important;
        inset: 0;
        width: 100vw !important;
        height: 100vh !important;
        overflow-x: auto;
        overflow-y: auto;
        margin: 0;
        padding: 20px;
        flex-basis: auto;
        border-right: none;
        background-color: var(--background);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .dashboard-nav:not(.hidden) {
        transform: translateX(0);
    }
}

.dashboard-content {
    /* border: 1px solid #00ff40 !important; */
    
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 0;
    
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-title {
    padding-bottom: 20px;
}

.dashboard-table {
    /* border: 1px solid #ff0000 !important; */

    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 0;

    /* overflow: hidden; */
}

.dashboard-table-content {
    /* border: 1px solid #0004ff !important; */

    display: flex;
    flex-direction: column;

    flex: 1 1 auto;
    position: relative;
    min-height: 0;
    min-width: 0;
    max-height: min(60vh, calc(100vh - 320px));

    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-table-content.is-filtering::after {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--white) 45%, transparent 100%);
    background-size: 200% 100%;
    animation: tableFilterLoading 0.9s linear infinite;
    z-index: 3;
}

@keyframes tableFilterLoading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.dashboard-table-content.has-open-dropdown {
    overflow-x: auto;
    overflow-y: visible;
}

.dashboard-flex {
    /* border: 1px solid #9583fc !important; */
    display: flex;
    box-sizing: border-box;
    width: 100%;
    /* min-height: 0; */
}

.dashboard-toolbar {
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dashboard-toolbar-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-toolbar-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    position: relative;
}

.toggle-button.is-active {
    background: rgba(101, 201, 81, 0.18) !important;
    border-color: rgba(101, 201, 81, 0.45) !important;
    color: var(--green) !important;
}

.bulk-menu {
    position: fixed;
    display: none;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 16px));
    padding: 8px;
    border: 1px solid var(--gray);
    border-radius: 12px;
    background: var(--background);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 9999;
}

.bulk-menu.open {
    display: block;
}

.bulk-menu .select-item {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 8px;
}

.bulk-menu .select-item:hover {
    background: var(--gray);
}

@media (max-width: 768px) {
    .dashboard-flex {
        flex-direction: column;
    }

    .dashboard-toolbar {
        align-items: stretch;
    }

    .dashboard-toolbar-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.dashboard-flex-left {
    /* border: 1px solid #fc83f6 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 20px;
    margin-right: 12px;

    flex: 1 1 0;
    min-width: 0;
    /* min-height: 0; */
    left: 0;
}


.dashboard-flex-right {
    /* border: 1px solid #5fdd46 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 12px;

    flex: 1 1 0;
    min-width: 0;
    /* min-height: 0; */
    right: 0;
}

#rowCount {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    #rowCount {
        font-size: 12px;
        letter-spacing: -0.01em;
    }
}

.dashboard-login-left {
    /* border: 1px solid #fc83f6 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex: 1 1 0;
    min-width: 0;
    left: 0;

    background: url("../../assets/images/login_background.jpg");
    background-color: var(--background);
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
}

@media (max-width: 1024px) {
    .dashboard-login-left {
        display: none !important;
    }
}

/* CSS : TABLE */

.task-table {
    width: 100%;
    min-width: 0;
    min-height: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    overflow: visible;
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.08) 0%, rgba(127, 127, 127, 0.04) 100%);
}

.task-table th,
.task-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(127, 127, 127, 0.22);
}
  
.task-table th {
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(127, 127, 127, 0.16);
    background: color-mix(in srgb, var(--gray) 80%, var(--background) 20%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-table td {
    background: transparent;
}

.task-table tbody tr {
    transition: background-color 180ms ease;
}

.task-table tbody tr:nth-child(even) {
    background: rgba(127, 127, 127, 0.05);
}

.task-table tbody tr:hover {
    background: rgba(94, 96, 100, 0.075);
    background: color-mix(in srgb, var(--text) 7.5%, transparent);
}

.task-table tbody tr:last-child td {
    border-bottom: none;
}

.task-table thead th:first-child {
    border-top-left-radius: 12px;
}

.task-table thead th:last-child {
    border-top-right-radius: 12px;
}

.task-table .table-empty-row td {
    padding: 22px 14px;
    text-align: center;
    background: transparent;
}

@media (max-width: 768px) {
    .task-table th,
    .task-table td {
        padding: 10px 12px;
    }

    .task-table th {
        font-size: 11px;
    }
}

/* CSS : SELECT / INPUT / BUTTON / TEXTAREA */

textarea {    
    resize: none;
    width: auto;
    height: auto;
    min-height: 100px;
}

input, button, select, .select-dropdown, textarea {
    appearance: none;
    line-height: 1.2;
    margin: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    background-color: var(--gray);
    color: var(--white);
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    transition: color 0.2s ease !important;
    min-width: 0;    
}

@media (max-width: 768px) {
    input, button, select, .select-dropdown, textarea {
        padding: 12px 16px;
        font-size: 16px !important;
        line-height: 1.4;
    }
}

button {
    text-align: center;
}

.toolbar-icon-btn {
    margin: 0px;
}

.qty-btn{
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.qty-btn:disabled{
    opacity: .4;
    cursor: not-allowed;
}

.qty-input{
    width: 50px;
    text-align: center;
}

.qty-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 28px;
}

.task-table td[data-column="number"] {
    text-align: center;
    vertical-align: middle;
}

select option,
.select-dropdown option {
    background-color: var(--gray);
    border-radius: 8px;
    color: var(--white);
}

select {
    padding-right: 38px;
    border: 1px solid transparent;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 1px),
        calc(100% - 12px) calc(50% - 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
  
select option:hover,
.select-dropdown option:hover {
    color: var(--white);
    background-color: var(--background);
}
  
.select-dropdown {
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.select-item {
    padding: 9px 12px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

select:focus,
.select-item:focus,
select:hover,
.select-item:hover {
    color: var(--white);
    background-color: var(--gray);
    outline: none;
} 

select:hover {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 8px 18px rgba(0, 0, 0, 0.12);
}

select:focus {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 0 3px rgba(255, 255, 255, 0.06),
        0 10px 22px rgba(0, 0, 0, 0.18);
}

.select-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: var(--background);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    padding: 6px;
}

.select-item:hover,
.select-item:focus {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

button:hover {
    background-color: var(--white) !important;
    color: var(--background) !important;
}

.form-inline {
    display: inline;
}

.btn-icon-plain {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
}

#stats .stats-toolbar-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

#stats .stats-toolbar-form select {
    margin: 0;
}

#stats .stats-period-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

#stats .stats-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

#stats .stats-panel {
    min-width: 0;
}

#stats .stats-panel-summary {
    position: sticky;
    top: 0;
    align-self: start;
}

#stats .stats-summary-grid,
#stats .stats-dynamic-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#stats .stats-toolbar-summary {
    justify-content: flex-start;
}

#stats .stats-toolbar-dynamic {
    justify-content: flex-end;
    margin-bottom: 10px;
}

#stats .stats-toolbar-dynamic select,
#stats .stats-toolbar-summary select {
    min-width: 240px;
}

#stats .stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 12px;
}

#stats .stats-kpi-card {
    background: var(--gray);
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#stats .stats-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 196, 107, 0.2);
    color: #41c46b;
    flex-shrink: 0;
}

#stats .stats-kpi-icon.warn {
    background: rgba(255, 175, 70, 0.2);
    color: #ffaf46;
}

#stats .stats-kpi-icon.danger {
    background: rgba(255, 101, 101, 0.2);
    color: #ff6565;
}

#stats .stats-kpi-icon.money {
    background: rgba(61, 167, 255, 0.2);
    color: #3da7ff;
}

#stats .stats-kpi-icon.cold {
    background: rgba(82, 196, 255, 0.2);
    color: #52c4ff;
}

#stats .stats-kpi-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#stats .stats-kpi-body small {
    color: var(--text-gray);
}

#stats .stats-kpi-body strong {
    font-size: 1rem;
    line-height: 1.2;
}

#stats .stats-kpi-body span {
    font-size: 12px;
}

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

#stats .stats-visual-card {
    grid-column: span 4;
    background: var(--gray);
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    padding: 14px;
}

#stats .stats-visual-card-wide {
    grid-column: span 12;
}

#stats .stats-donut-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

#stats .stats-donut {
    --pct: 50;
    --accent: #3da7ff;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(127, 127, 127, 0.25) 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#stats .stats-donut::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: var(--background);
}

#stats .stats-donut span {
    position: relative;
    font-weight: 700;
    font-size: 1.05rem;
}

#stats .stats-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

#stats .stats-ok {
    color: #41c46b;
}

#stats .stats-ko {
    color: #ff6565;
}

#stats .stats-good {
    color: #41c46b;
}

#stats .stats-bad {
    color: #ff6565;
}

#stats .stats-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

#stats .stats-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#stats .stats-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#stats .stats-bar-label,
#stats .stats-bar-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#stats .stats-bar-value {
    font-weight: 600;
    white-space: nowrap;
}

#stats .stats-bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.25);
    overflow: hidden;
}

#stats .stats-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3da7ff 0%, #41c46b 100%);
    animation: stats-bar-grow 800ms ease;
}

#stats .stats-trend {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

#stats .stats-trend-item {
    width: 52px;
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#stats .stats-trend-item.is-last .stats-trend-bar {
    background: linear-gradient(180deg, #41c46b 0%, #3da7ff 100%);
}

#stats .stats-trend-bar-wrap {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.2);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

#stats .stats-trend-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #3da7ff 0%, #1e5eff 100%);
    transition: height 400ms ease;
}

#stats .stats-trend-value {
    font-weight: 700;
}

#stats .stats-trend-label {
    color: var(--text-gray);
    white-space: nowrap;
}

#stats .stats-trend-meta {
    margin-top: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

#stats .stats-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

#stats .stats-chip.ok {
    background: rgba(65, 196, 107, 0.15);
    color: #41c46b;
}

#stats .stats-chip.warning {
    background: rgba(255, 175, 70, 0.15);
    color: #ffaf46;
}

#stats .stats-chip.critical {
    background: rgba(255, 101, 101, 0.15);
    color: #ff6565;
}

@keyframes stats-bar-grow {
    from { width: 0; }
}

@media (max-width: 1200px) {
    #stats .stats-layout {
        grid-template-columns: 1fr;
    }
    #stats .stats-panel-summary {
        position: static;
    }
    #stats .stats-toolbar-dynamic {
        justify-content: flex-start;
    }
    #stats .stats-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #stats .stats-visual-card {
        grid-column: span 6;
    }
    #stats .stats-visual-card-wide {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    #stats .stats-toolbar-form {
        flex-direction: column;
        align-items: stretch;
    }
    #stats .stats-toolbar-dynamic select,
    #stats .stats-toolbar-summary select {
        min-width: 0;
        width: 100%;
    }
    #stats .stats-kpi-grid {
        grid-template-columns: 1fr;
    }
    #stats .stats-visual-card,
    #stats .stats-visual-card-wide {
        grid-column: span 12;
    }
    #stats .stats-donut-row {
        flex-direction: column;
        align-items: flex-start;
    }
    #stats .stats-trend-item {
        width: 44px;
        min-width: 44px;
    }
}

button.qty-btn:hover,
button.btn-icon-plain:hover {
    background-color: transparent !important;
    color: inherit !important;
}

button.active {
    color: var(--background) !important;
    background-color: var(--white) !important;
}

input:focus {
    outline: none;
    border: none;
}

input::placeholder {
    color: var(--text-gray);
}

textarea::placeholder {
    color: var(--text-gray);
}

input[disabled],select[disabled],button[disabled] {
    cursor: not-allowed !important;
    opacity: 0.5;
}

input[disabled]:hover, select[disabled]:hover,button[disabled]:hover {
    background-color: var(--gray) !important;
    color: var(--white) !important;
    cursor: not-allowed !important;
}

input[type="file"] {
    display: none;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    appearance: none;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
  
input[type="checkbox"]:checked {
    background-color: var(--white);
}
  
input[type="checkbox"]:checked::after {
    content: '✔';
    font-size: 10px;
    font-weight: bold;
    color: var(--background);
    position: absolute;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    background-color: var(--gray) !important;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--background) inset !important;
}

.table-searchbar, .select-search {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

#global_fixture_id .doc-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#global_fixture_id .doc-link-row input {
    flex: 1 1 auto;
    min-width: 0;
}

#global_fixture_id .doc-link-preview-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #global_fixture_id .doc-link-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    #global_fixture_id .doc-link-preview-button {
        width: calc(100% - 10px);
    }
}

/* CSS : PREFAB */

.bold {
    font-weight: bold;
}

.block {
    display: block;
}

.hidden {
    display: none !important;
}

.force-hidden {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.back_red:hover {
    background-color: var(--red) !important;
    color: var(--background) !important;
}

.txt_red:hover {
    color: var(--red) !important;
}

.back_green:hover {
    background-color: var(--green) !important;
    color: var(--background) !important;
}

.txt_green:hover {
    color: var(--green) !important;
}

.flex-column {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
}

.flex-no-column {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: row !important;
}

.flex-left {
    display: flex;
    justify-content: flex-start;
    left: 0;
}

.flex-right {
    justify-content: flex-end;
    right: 0;
}

.flex-center {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.flex-large { 
    flex: 2 1 0;
    min-width: 0;
}

.flex-space-bottom {
    padding-bottom: 20px;
}

.u-text-center {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
}

.u-cell-center {
    align-items: center;
    text-align: center;
}

.u-w-100 {
    width: 100%;
}

.form-alert {
    margin: 5px;
    padding: 10px 12px;
    border-radius: 8px;
}

.form-alert p {
    margin: 0 0 6px;
}

.form-alert p:last-child {
    margin-bottom: 0;
}

.form-alert-error {
    border: 1px solid var(--red);
    background: rgba(201, 81, 81, 0.15);
    color: var(--white);
}

.form-alert-warning {
    border: 1px solid #ffb400;
    background: rgba(255, 180, 0, 0.15);
    color: var(--white);
}

.form-alert-success {
    border: 1px solid var(--green);
    background: rgba(101, 201, 81, 0.15);
    color: var(--white);
}

.form-alert-info {
    border: 1px solid #78b4ff;
    background: rgba(120, 180, 255, 0.15);
    color: var(--white);
}

.fold-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.fold-section-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.fold-section-body > .title-menu {
    display: none !important;
}

.fold-section-toggle {
    width: 100%;
    margin: 0;
    padding: 12px 14px !important;
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.12), rgba(127, 127, 127, 0.06)) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.fold-section-toggle:hover {
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.18), rgba(127, 127, 127, 0.08)) !important;
    color: var(--white) !important;
}

.fold-section-toggle.is-static {
    width: 100%;
    cursor: default;
}

.fold-section-toggle.is-static:hover {
    color: inherit !important;
}

.fold-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
}

.fold-section-caret {
    flex: 0 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.75;
}

.fold-section.is-open .fold-section-caret {
    transform: rotate(180deg);
}

.fold-section-body[hidden] {
    display: none !important;
}

.type-quick-edit {
    position: relative;
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
}

.catalog-label-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.catalog-label-link {
    display: block;
    min-width: 0;
}

.type-quick-trigger {
    margin: 0;
    padding: 3px 8px !important;
    min-height: 24px;
    border-radius: 999px;
    font-size: 11px !important;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    background: rgba(255, 255, 255, 0.06) !important;
}

.type-quick-trigger:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--white) !important;
}

.type-quick-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.type-quick-caret {
    font-size: 10px;
    opacity: 0.7;
}

.type-quick-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    min-width: 220px;
    max-width: 280px;
    padding: 6px;
    border: 1px solid var(--gray);
    border-radius: 10px;
    background: var(--background);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .catalog-label-cell .type-quick-edit {
        margin-right: 0;
        margin-bottom: 2px;
    }

    .catalog-label-cell .type-quick-trigger {
        max-width: min(100%, 180px);
    }

    .catalog-label-cell .type-quick-label {
        max-width: 138px;
    }
}

.type-quick-menu.is-floating {
    position: fixed;
    top: auto;
    left: auto;
    z-index: 9999;
}

.type-quick-menu.is-open-upward {
    top: auto;
    bottom: calc(100% + 4px);
}

.type-quick-menu[hidden] {
    display: none !important;
}

.type-quick-menu-list {
    max-height: var(--type-quick-menu-max-height, 180px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.type-quick-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

#breakdown .breakdown-mobile-shell {
    width: min(80%, 760px);
    max-width: 90%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
}

#breakdown .breakdown-mobile-hero {
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(127, 127, 127, 0.24);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.1), rgba(127, 127, 127, 0.04));
    box-sizing: border-box;
}

#breakdown .breakdown-mobile-hero-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#breakdown .breakdown-mobile-eyebrow {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

#breakdown .breakdown-mobile-zz {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(127, 127, 127, 0.24);
    background: rgba(127, 127, 127, 0.12);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#breakdown .breakdown-mobile-model {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    line-height: 1.15;
}

#breakdown .breakdown-mobile-location-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(127, 127, 127, 0.2);
    box-sizing: border-box;
}

#breakdown .breakdown-mobile-location-card-muted {
    background: rgba(127, 127, 127, 0.08);
}

#breakdown .breakdown-mobile-location-label {
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 700;
}

#breakdown .breakdown-mobile-location-value {
    font-size: clamp(18px, 2.8vw, 26px);
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

#breakdown .breakdown-mobile-location-date {
    color: var(--text-gray);
    font-size: 12px;
}

#breakdown .breakdown-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

#breakdown .breakdown-quick-link,
#breakdown .breakdown-quick-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    min-height: 132px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(127, 127, 127, 0.22);
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.1), rgba(127, 127, 127, 0.04));
    text-decoration: none;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

#breakdown .breakdown-quick-link:hover,
#breakdown .breakdown-quick-status:hover {
    background: linear-gradient(180deg, rgba(127, 127, 127, 0.16), rgba(127, 127, 127, 0.08)) !important;
}

#breakdown .breakdown-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(127, 127, 127, 0.14);
    font-size: 18px;
}

#breakdown .breakdown-quick-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

#breakdown .breakdown-quick-subtitle {
    color: var(--text-gray);
    font-size: 12px;
    /* line-height: 1.35; */
}

#breakdown .breakdown-quick-link .breakdown-quick-icon + .breakdown-quick-title,
#breakdown .breakdown-quick-status .breakdown-quick-icon + .breakdown-quick-title {
    margin-top: -42px;
    padding-left: 52px;
    min-height: 42px;
    align-items: center;
}

/* #breakdown .breakdown-quick-link .breakdown-quick-subtitle,
#breakdown .breakdown-quick-status .breakdown-quick-subtitle {
    margin-top: 6px;
} */

#breakdown .breakdown-quick-status {
    align-items: flex-start !important;
}

#breakdown .breakdown-move-card {
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
}

#breakdown .breakdown-move-submit {
    margin-top: 12px;
    min-height: 48px;
    font-weight: 700;
}

@media (max-width: 768px) {
    #breakdown .breakdown-mobile-shell {
        width: 100%;
    }

    #breakdown .breakdown-mobile-hero {
        padding: 14px;
        border-radius: 16px;
    }

    #breakdown .breakdown-mobile-hero-compact,
    #breakdown .breakdown-quick-grid {
        grid-template-columns: 1fr;
    }

    #breakdown .breakdown-quick-link,
    #breakdown .breakdown-quick-status {
        min-height: 108px;
    }
}

.type-quick-option {
    margin: 0 !important;
    flex: 1 1 auto;
    width: 100%;
    min-height: 26px;
    padding: 4px 8px !important;
    background: transparent !important;
    border-radius: 6px;
    font-size: 12px !important;
    text-align: left;
}

.type-quick-option:hover {
    background: var(--gray) !important;
    color: var(--white) !important;
}

.type-quick-item.is-active .type-quick-option {
    background: var(--gray) !important;
}

.type-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--text-gray);
}

.type-quick-action:hover {
    color: var(--white);
}

.type-quick-add {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--gray);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--white);
}

.type-quick-empty {
    padding: 6px 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.dashboard-global-alerts {
    position: fixed;
    top: calc(90px + env(safe-area-inset-top));
    right: 20px;
    z-index: 9998;
    width: min(420px, calc(100vw - 40px));
    pointer-events: none;
}

.dashboard-global-alerts .form-alert {
    margin-bottom: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    animation: global-alert-fade 6s ease forwards;
}

@keyframes global-alert-fade {
    0%, 78% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@media (max-width: 768px) {
    .dashboard-global-alerts {
        top: calc(78px + env(safe-area-inset-top));
        right: 10px;
        width: calc(100vw - 20px);
    }
}

/* CSS : KIT */

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

a:visited {
  color: inherit;
}

a[disabled] {
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* CSS : MENU NAVIGATEUR */

.dashboard-nav-item {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
    color: var(--white);
    cursor: pointer;
    border-radius: 8px;
    padding: 10px;
    margin: 5px;
    width: 100%;
}

.dashboard-nav-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    right: 0;
}

@media (max-width: 768px) {
    .dashboard-nav-title {
        font-weight: bold;
    }
}

.dashboard-nav-item i {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    left: 0;
    width: 10%;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .dashboard-nav-item i {
        width: 100%;
        font-size: 1.8rem;
    }
}

.dashboard-nav-item.active i {
    color: var(--white);
}

#output_id .output-selection-dropdown .dropdown-button {
    min-height: 44px;
}

#output_id .dropdown-selection-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

#output_id .dropdown-selection-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray);
    border-radius: 999px;
    background: color-mix(in srgb, var(--gray) 58%, transparent);
    font-size: 12px;
    line-height: 1.2;
    color: var(--white);
    cursor: pointer;
    text-align: left;
}

#output_id .dropdown-selection-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

#output_id .dropdown-selection-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--background);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
}

#output_id .dropdown-selection-empty {
    color: var(--text-gray);
    font-size: 12px;
}

#output_id .dropdown-selection-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    line-height: 1;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    #output_id .dropdown-selection-chip {
        width: 100%;
        justify-content: space-between;
        border-radius: 12px;
    }
}
  
.dashboard-nav-item:hover {
    background-color: var(--gray);
}
  
.dashboard-nav-item.active {
    background-color: var(--gray);
}
  
.dashboard-nav-item.open {
    background-color: var(--background);
}

.dashboard-nav-item.open.active {
    background-color: var(--background);
}

.dashboard-nav-list-submenu {
    display: flex;
    flex-direction: column;
}

.dashboard-nav-list-submenu.open {
    border-radius: 8px;
    border: 1px solid var(--gray);
}


.dashboard-nav-list-submenu > span {
    display: flex;
    align-items: center;
     justify-content: flex-start;
    width: 100%;
    gap: 8px;
}

.dashboard-nav-list-submenu .dashboard-nav-item-submenu {
    flex-direction: column;
}

.dashboard-nav-list-submenu.open .dashboard-nav-item-submenu {
    display: flex;
}
  
.dashboard-nav-item-submenu {
    display: none;
    list-style: none;
    flex-direction: column;
    width: 100%;
} 

.dashboard-nav-item-submenu i {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    left: 0;
}
.dashboard-nav-item-submenu > span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    right: 0;
}
  
.dashboard-nav-item-submenu li {
    background: var(--background);
}
  
.dashboard-nav-item-submenu li:hover {
    background: var(--gray);
}

.dashboard-nav-version {
    list-style: none;
    right: 0;
    color: var(--text-gray);
    font-size: 10px;
    text-decoration: none;
}
