:root {
    --primary-theme: #006B4F;
    --secondary-theme: #222222;
    --header-bg: #222222;
    --footer-bg: #111111;
    --border-color: #e3e6ec;
    --body-bg: #f8f9fa;
    --toolbox-height: 54px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* =====================================================
   HEADER & MARQUEE PERFORMANCE TICKER LOCKS
   ===================================================== */
.top-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--primary-theme);
    padding: 6px 0;
    z-index: 1040;
    position: relative;
}

.breaking-badge {
    background: var(--primary-theme);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.ticker-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    display: flex;
}

.ticker-track {
    display: inline-block;
    animation: marquee-scroll-loop 30s linear infinite;
}

.ticker-track a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    margin-right: 35px;
}

.ticker-track a:hover {
    color: #ffc107;
}

@keyframes marquee-scroll-loop {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* =====================================================
   UNIFIED FIXED CROSS-PLATFORM STICKY TOOLBOX
   ===================================================== */
.unified-sticky-toolbox {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    height: var(--toolbox-height);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.action-btn-square {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
    background: #ffffff;
    color: #495057;
}

.vertical-divider {
    width: 1px;
    height: 22px;
    background-color: var(--border-color);
    display: inline-block;
}

/* Enhanced Native Calendar Styling Scope Block */
.style-archive-inline-group {
    border-radius: 6px;
    overflow: hidden;
    margin-right: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.style-archive-clickable-label {
    cursor: pointer !important;
    padding: 0 10px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ffc107 !important;
}

.style-archive-native-input {
    width: 115px !important;
    height: 34px;
    font-size: 12px !important;
    padding: 0 6px !important;
    font-weight: 600;
    cursor: pointer;
    border-left: none !important;
}

/* =====================================================
   SIDEBAR LAYOUT CHANNELS
   ===================================================== */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    height: calc(100vh - var(--toolbox-height) - 100px);
    overflow: hidden;
}

.sidebar-tabs .nav-link {
    font-size: 12px;
    font-weight: bold;
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 0;
    border-radius: 0;
}

.sidebar-tabs .nav-link.active {
    color: var(--primary-theme);
    border-bottom: 2px solid var(--primary-theme);
    background: transparent;
}

.sidebar-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.thumb-item {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.thumb-item.active, .thumb-item:hover {
    border-color: var(--primary-theme);
    transform: scale(1.02);
}

.clip-thumb-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #ffffff;
}

.clip-thumb-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* =====================================================
   CORE ENGINE VIEWER SYSTEM CANVAS LAYOUTS
   ===================================================== */
.container-viewer-main {
    max-width: 100% !important;
}

.viewer-container {
    background: #4e5255;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: calc(100vh - var(--toolbox-height) - 60px);
}

.canvas-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
    padding: 15px;
    display: block;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.canvas-wrapper.dragging{
    cursor: grabbing !important;
}

#canvasViewer {
    display: block;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    user-select: none;
    -webkit-user-select: none;
    max-width: none !important;
}

/* =====================================================
   CROSS-PLATFORM INTEGRATED HYBRID CROP OVERLAYS
   ===================================================== */
#cropOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}

#cropSelection {
    position: absolute;
    border: 2px dashed #ffc107;
    background: rgba(255, 193, 7, 0.12);
    box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.55);
    display: none;
    pointer-events: none;
}

.crop-handle-badge {
    position: absolute;
    top: -24px;
    left: 0;
    background: #ffc107;
    color: #000000;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 3px;
}

/* =====================================================
   MOBILE FLUID FLOATING OVERLAYS
   ===================================================== */
.mobile-floating-navigation {
    position: fixed;
    top: 55%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
    z-index: 999;
    transform: translateY(-50%);
}

.floating-nav-btn {
    width: 42px;
    height: 42px;
    background: rgba(0, 107, 79, 0.8);
    border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.floating-nav-btn:active {
    background: rgba(0, 107, 79, 1);
    transform: scale(0.95);
}

/* =====================================================
   RESPONSIVE DESIGN SYSTEM RETUNINGS
   ===================================================== */
@media (max-width: 767.98px) {
    :root {
        --toolbox-height: 48px;
    }
    .unified-sticky-toolbox {
        padding: 4px 6px !important;
    }
    .style-archive-native-input {
        width: 34px !important;
        padding: 0 !important;
        color: transparent !important;
        background-color: #fff !important;
        border: 1px solid #ffc107 !important;
        border-radius: 0 6px 6px 0;
    }
    /* Mobile-optimized inline HTML5 date selector wrapper overrides */
    .style-archive-native-input::-webkit-calendar-picker-indicator {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        opacity: 0;
        cursor: pointer;
    }
    .viewer-container {
        height: calc(100vh - var(--toolbox-height) - 40px);
    }
    .core-page-tracker-input {
        font-size: 12px;
    }
}

@media(max-width:767px){

    .footer-fixed-bottom{
        padding-bottom:60px;
    }

}