/* Compact glass application frame over the supplied project background. */
:root { --glass: rgba(244, 250, 255, .16); --line: rgba(255, 255, 255, .64); --shadow: 0 22px 52px rgba(25, 89, 143, .20); }
.backdrop { background: linear-gradient(120deg, rgba(7, 135, 180, .16), rgba(249, 178, 112, .10)), url('/Background.avif') center / cover no-repeat #dff3fa; }
.backdrop:after { background: linear-gradient(115deg, rgba(226, 249, 255, .22), rgba(255, 241, 237, .10)); backdrop-filter: blur(.5px); }
.app-shell { grid-template-columns: 224px 1fr; width: min(88vw, 1240px); min-height: 76vh; margin: 2vh auto; background: rgba(213, 242, 249, .08); border-color: rgba(255,255,255,.66); backdrop-filter: blur(28px) saturate(150%); box-shadow: 0 30px 75px rgba(23, 81, 129, .25); }
.sidebar { padding: 27px 15px; background: rgba(210, 243, 250, .10); border-right-color: rgba(255,255,255,.42); }
.page { padding: 10px 28px 30px; }
.app-shell main, .page, .panel, .grid > * { min-width: 0; }
.topbar { display: flex; }
.chat-float { left: auto; right: 26px; }
.chat { left: auto; right: 24px; background: rgba(238, 249, 254, .80); }
@media (max-width:900px) { .app-shell { width:100%; margin:0; min-height:100vh; } .topbar { display:flex; } }
@media (min-width:901px) and (max-width:1200px) { .app-shell { width:92vw; } .stats { grid-template-columns:repeat(2, minmax(0, 1fr)); } .main-grid { grid-template-columns:minmax(0, 1fr); } }
@media (max-width:560px) { .chat-float { left:auto; right:15px; } }


/* Topbar & Searchbar extensions */
.topbar {
    height: 76px !important;
    padding: 14px 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 100% flex wide searchbar (filling remaining width) */
.global-search {
    max-width: none !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    height: 48px !important;
}
.global-search input {
    font-size: 14px !important;
    flex: 1 !important;
}

/* 100% Geometric Perfect Circle Back Button */
.back-circle-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    color: var(--ink) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(75, 143, 192, 0.15) !important;
    backdrop-filter: blur(12px) !important;
    flex-shrink: 0 !important;
}
.back-circle-btn:hover {
    background: #ffffff !important;
    color: var(--blue) !important;
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 8px 22px rgba(25, 89, 143, 0.25) !important;
}
.back-circle-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Shortage Reason Badge */
.reason-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(220, 243, 255, 0.65);
    border: 1px solid rgba(140, 205, 240, 0.5);
    border-radius: 6px;
    font-size: 11px;
    color: #174261;
    font-weight: 500;
    max-width: 320px;
    white-space: normal;
    line-height: 1.35;
}
