@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Noto Serif Bengali', serif;
    background-color: #cbd5e1;
    color: #0f172a;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Sticky Locked Topbar + Notice Bar across all profiles */
.ctm-sticky-header {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
}

/* Full-Screen Wide Container */
.ctm-full-container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* CMS Shell Layout (Deep Blood-Red Maroon Sidebar 295px + Full-Screen Main Area) */
.cms-shell {
    display: flex;
    min-height: calc(100vh - 76px);
    width: 100%;
    max-width: 100vw;
}

.cms-sidebar {
    width: 295px;
    min-width: 295px;
    background: linear-gradient(180deg, #5c0a0a 0%, #3b0404 58%, #220202 100%);
    color: #f8fafc;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(251, 191, 36, 0.22);
    padding: 0.9rem 0.85rem;
}

/* Mobile Sidebar Overlay Backdrop */
.cms-sidebar-backdrop {
    display: none;
}

@media (max-width: 1023px) {
    /* Full-height z-index 9990 drawer so nothing is ever hidden under the sticky topbar on mobile */
    .cms-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 86vw;
        min-width: 260px;
        z-index: 9990;
        transform: translateX(-105%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 0.85rem;
        padding-bottom: 2.5rem;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.65);
    }
    .cms-sidebar.open {
        transform: translateX(0);
    }
    .cms-sidebar-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.68);
        backdrop-filter: blur(2px);
        z-index: 9985;
    }
}

.cms-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.58rem 0.82rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fce7f3;
    transition: all 0.18s ease;
    margin-bottom: 0.22rem;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.35;
}

.cms-nav-item:hover {
    background-color: rgba(251, 191, 36, 0.14);
    color: #ffffff;
}

.cms-nav-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.28) 0%, rgba(127, 29, 29, 0.65) 100%);
    border: 1px solid rgba(251, 191, 36, 0.55);
    color: #fef08a;
    font-weight: 700;
}

.cms-nav-badge {
    font-size: 0.68rem;
    padding: 0.12rem 0.48rem;
    border-radius: 9999px;
    background-color: rgba(251, 191, 36, 0.22);
    color: #fef08a;
    font-weight: 700;
    flex-shrink: 0;
}

.cms-main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem;
    background-color: #dbe4f0;
}

@media (min-width: 640px) {
    .cms-main {
        padding: 1rem 1.35rem;
    }
}

/* Smooth Crawling Notice Board Animation */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: ctm-marquee 28s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes ctm-marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb { background: #5c0a0a; border-radius: 3px; }

.canvas-container {
    touch-action: none;
    user-select: none;
}

/* Interactive Video Timeline Track & Left/Right Drag Handles */
.timeline-track {
    position: relative;
    min-height: 76px;
    background: #0f172a;
    border-radius: 0.85rem;
    border: 1px solid #334155;
    user-select: none;
    touch-action: pan-x;
    overflow-x: auto;
}

.timeline-trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    background: #f59e0b;
    color: #0f172a;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 11px;
    user-select: none;
    touch-action: none;
    z-index: 10;
    transition: background 0.15s ease;
}

.timeline-trim-handle.left {
    left: 0;
    border-radius: 0.7rem 0 0 0.7rem;
    border-right: 2px solid #0f172a;
}

.timeline-trim-handle.right {
    right: 0;
    border-radius: 0 0.7rem 0.7rem 0;
    border-left: 2px solid #0f172a;
}

.timeline-trim-handle:hover,
.timeline-trim-handle:active {
    background: #fde047;
}


/* Mobile Date/Time Input Overflow Fix */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        font-size: 13px !important;
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
    }
    .grid > *,
    .flex > * {
        min-width: 0;
    }
}
