/* === Base === */
body {
    font-size: .875rem;
    font-family: Arial, sans-serif;
}

/* === Feather Icons === */
.feather {
    width: 16px;
    height: 16px;
}

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

.sidebar-sticky {
    height: calc(100vh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #fff;
}

.sidebar .nav-link:hover {
    background-color: lightblue;
    color: #000;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #727272;
}

.sidebar .nav-link.active {
    color: #2470dc;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
    color: inherit;
}

.sidebar-heading {
    font-size: .75rem;
}

/* === Navbar === */
.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .navbar-toggler {
    top: .25rem;
    right: 1rem;
}

.navbar .form-control {
    padding: .75rem 1rem;
}

.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

/* === Message Container === */
#messageContainer {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#messageContainer .alert {
    pointer-events: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    width: auto;
    padding: 10px;
    margin-bottom: 10px;
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* === Spinner (Clock) === */
.cssload-clock {
    display: none;
    z-index: 9999;
    background-color: #b9e8e7;
    border-radius: 200px;
    border: 5px solid rgb(0, 0, 0);
    height: 200px;
    width: 200px;
    position: fixed;
    top: 50%;
    left: calc(50% - 100px);
}

.cssload-clock:after {
    content: "";
    position: absolute;
    background-color: rgb(0, 0, 0);
    top: 5px;
    left: 49%;
    height: 95px;
    width: 5px;
    border-radius: 5px;
    transform-origin: 50% 97%;
    animation: grdAiguille 2.3s linear infinite;
}

.cssload-clock:before {
    content: "";
    position: absolute;
    background-color: rgb(0, 0, 0);
    top: 20px;
    left: 49%;
    height: 80px;
    width: 5px;
    border-radius: 5px;
    transform-origin: 50% 94%;
    animation: ptAiguille 13.8s linear infinite;
}

@keyframes grdAiguille {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ptAiguille {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Login Page === */
.login-form-head {
    color: #191919;
    font-weight: 400;
    margin: 0;
    text-align: center;
    font-size: 1.8em;
}

.login-error-message {
    padding: 7px 10px;
    background: #fff1f2;
    border: #ffd5da 1px solid;
    color: #d6001c;
    border-radius: 4px;
    margin: 30px 10px 10px 10px;
}

.login-table {
    background: #ffffff;
    border-spacing: initial;
    margin: 15px auto;
    word-break: break-word;
    table-layout: auto;
    line-height: 1.8em;
    color: #333;
    border-radius: 4px;
    padding: 30px;
    width: 380px;
    border: 1px solid;
    border-color: #e5e6e9 #dfe0e4 #d0d1d5;
}

.login-table .field-column {
    padding: 15px 10px;
}

.login-input-box {
    padding: 13px;
    border: #CCC 1px solid;
    border-radius: 4px;
    width: 100%;
}

.btnLogin {
    padding: 13px;
    background-color: #5d9cec;
    color: #f5f7fa;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    border: #5791da 1px solid;
    font-size: 1.1em;
}

.error-info {
    color: #FF0000;
    margin-left: 10px;
}

/* === Utility === */
.cursor-pointer {
    cursor: pointer;
}

.highlight-row {
    background-color: #fff000 !important;
}

/* === Pagination active page === */
.page-link-active {
    color: #b9e8e7;
    font-weight: bold;
}

/* === Article color coding === */
.article-status-empty { background-color: #FDB5B5 !important; }
.article-status-new { background-color: #FDB5B5 !important; }
.article-status-active { background-color: #B5FDB5 !important; }
.article-status-inactive { background-color: #FFEB3B !important; }
.article-status-excluded { background-color: #673ab7 !important; }

/* === Zulauf highlighted search === */
.zulauf-highlight {
    background-color: #e48c5d;
}

/* === Error log link in navbar === */
.error-log-link {
    color: #fff !important;
    background-color: #ff0000;
    border-radius: 4px;
    margin-right: 10px;
    padding: 4px 8px;
    text-decoration: none;
}

/* === Order Detail V2 - Grid Layout === */
.articles-wrapper {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    font-size: 13px;
}

.kw-badge { background-color: #dc3545; color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.note-badge { background-color: #FDB5B5; font-size: 12px; padding: 1px 4px; border-radius: 3px; display: inline-block; margin-top: 1px; }
.gls-box { margin-top: 4px; padding: 3px 6px; background: #fff3cd; border-radius: 4px; font-size: 11px; line-height: 1.4; }
.hl { background: #fff000; color: #000; padding: 2px 6px; border-radius: 3px; }
.auslauf-badge { background: red; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 12px; font-weight: 700; }

.section-badge {
    display: inline-block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
}
.badge-img { background: #8899aa; color: #fff; }
.badge-in { background: #a0b8d0; color: #fff; }
.badge-stock { background: #7a9bb5; color: #fff; }
.badge-order { background: #4CAF50; color: #fff; }
.badge-ret { background: #d0a8a0; color: #fff; }

.article-body {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
    border-bottom: 2px solid #eee;
}
.article-body:last-of-type { border-bottom: none; }
.article-body.article-search-match { outline: 4px solid #e48c5d; outline-offset: -4px; }
.article-separator { height: 10px; background: #f5f5f5; }

.zone {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid #ddd;
}
.zone:last-child { border-right: none; }
.zone-bild { background: #f0f0f0; }
.zone-bild img { width: 100%; height: auto; border-radius: 4px; }
.zone-eingang { background: #edf2f7; }
.zone-bestand { background: #e8eef5; }
.zone-bestellung { background: #f0f9e8; }
.zone-retoure { background: #f7eeea; }

.mini-card {
    background: #fff;
    border-radius: 5px;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
}
.field-label {
    font-size: 10px;
    color: #777;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.article-info {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 6px;
}
.article-info .hl { font-size: 12px; }
.article-id-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    font-size: 16px;
}

.price-row {
    display: flex;
    gap: 6px;
}
.price-row > .mini-card { flex: 1; }

/* Zulauf cards */
.zulauf-card {
    background: #fff;
    border-radius: 5px;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
}
.zulauf-card .zulauf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}
.zulauf-card .zulauf-info { flex: 1; min-width: 0; }
.zulauf-card .zulauf-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.zulauf-card .zulauf-action input {
    width: 55px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 4px;
}
.zulauf-card .zulauf-action .btn {
    font-size: 16px;
    font-weight: 600;
    padding: 4px 14px;
}

/* Shipping workflow grid */
.shipping-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.shipping-grid .shipping-header {
    background: #e8edf2;
    padding: 6px 10px;
    border-right: 1px solid #ddd;
    font-weight: 700;
    font-size: 13px;
}
.shipping-grid .shipping-header:last-child { border-right: none; }
.shipping-grid .shipping-cell {
    padding: 10px;
    border-right: 1px solid #ddd;
    font-size: 13px;
}
.shipping-grid .shipping-cell:last-child { border-right: none; }
