﻿/* Set padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}
/* when not authenticated: no sidebar layout */
body.tb-no-sidebar .tb-content {
    margin-left: 0 !important;
    padding-left: 24px;
    padding-right: 24px;
}

body.tb-no-sidebar .tb-sidebar {
    display: none !important;
}

/* Safety style: If body does NOT have tb-has-sidebar, ensure margin-left is 0 */
body:not(.tb-has-sidebar) .tb-content {
    margin-left: 0 !important;
}

/* Navbar dropdown 不要撐開 topbar */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-menu {
    position: absolute;
}

/* 避免被 topbar/父層裁切 */
.navbar {
    overflow: visible;
}

/* ===== layout base (你如果已經有，請確認數值一致) ===== */
.tb-sidebar {
    position: fixed;
    top: 56px; /* 依你的 topbar 高度調整；若 topbar 不是 56px 改這裡 */
    left: 0;
    bottom: 0;
    width: 240px;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid rgba(0,0,0,.08);
}

/*.tb-content {
    margin-left: 240px;
    padding: 24px;
    padding-top: 80px;*/ /* 避開 topbar；依實際高度調整 */
    /*min-height: calc(100vh - 56px);
}*/

/* ===== collapsed ===== */
body.tb-sidebar-collapsed .tb-sidebar {
    width: 72px;
}

body.tb-sidebar-collapsed .tb-content {
    margin-left: 72px;
}

/* 收合後：側欄只留圖示/短字（沒有圖示也先把文字隱藏） */
body.tb-sidebar-collapsed .tb-sidebar .list-group-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    padding-left: 12px;
    padding-right: 12px;
}

/* 收合後：把長文字隱藏（簡單粗暴但有效） */
body.tb-sidebar-collapsed .tb-sidebar .list-group-item {
    font-size: 0; /* 直接讓文字不顯示 */
}

    body.tb-sidebar-collapsed .tb-sidebar .list-group-item::before {
        font-size: 14px;
        content: "•"; /* 沒做 icon 前先用點點佔位 */
    }
/* ===== Sidebar toggle button ===== */
.tb-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 6px 8px;
    color: #fff;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    /* hover: 淡亮、不變白 */
    .tb-toggle-btn:hover {
        background: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.4);
        box-shadow: 0 0 0 2px rgba(255,255,255,.05);
    }

    /* active / click */
    .tb-toggle-btn:active {
        background: rgba(255,255,255,.15);
    }

    /* focus（鍵盤可用性） */
    .tb-toggle-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(13,110,253,.5);
    }

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: auto;
}

/* ====== VCENS Layout Core ====== */
:root {
    --tb-topbar-h: 56px;
    --tb-sidebar-w: 240px;
    --tb-bg: #f5f7fb; /* tabler-ish */
}

body.tb-has-sidebar {
    background: var(--tb-bg);
}

/* Topbar fixed */
.tb-topbar {
    height: var(--tb-topbar-h);
}

/* Sidebar fixed under topbar */
.tb-sidebar {
    position: fixed;
    top: var(--tb-topbar-h);
    left: 0;
    width: var(--tb-sidebar-w);
    height: calc(100vh - var(--tb-topbar-h));
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid rgba(0,0,0,.08);
}

/* Content area */
/*.tb-content {
    padding-top: calc(var(--tb-topbar-h) + 1rem);
    margin-left: var(--tb-sidebar-w);
    padding-left: 1rem;
    padding-right: 1rem;
    flex: 1 0 auto;*/ /* key: let main grow */
/*}*/

.tb-content {
    padding-top: calc(var(--tb-topbar-h) + 1rem);
    margin-left: var(--tb-sidebar-w);
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: calc(100vh - var(--tb-topbar-h));
}

/* Inner wrapper for consistent width */
.tb-content-inner {
    margin-left: var(--tb-sidebar-w);
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Footer */
.tb-footer {
    background: #fff;
}

/* ====== Sidebar collapsed state ====== */
body.tb-sidebar-collapsed .tb-sidebar {
    transform: translateX(calc(-1 * var(--tb-sidebar-w)));
    transition: transform .2s ease;
}

body.tb-sidebar-collapsed .tb-content,
body.tb-sidebar-collapsed .tb-content-inner {
    margin-left: 0;
    transition: margin-left .2s ease;
}

/* Fix for top left title being pushed away */
.navbar-brand {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ensure dropdown menu doesn't affect flow */
.navbar .dropdown-menu {
    position: absolute !important;
}

/* ====== Responsive: small screens ====== */
@media (max-width: 768px) {
    .tb-sidebar {
        transform: translateX(calc(-1 * var(--tb-sidebar-w)));
        transition: transform .2s ease;
        z-index: 1030;
    }

    body.tb-sidebar-open .tb-sidebar {
        transform: translateX(0);
    }

    .tb-content,
    .tb-content-inner {
        margin-left: 0;
    }

    /* ====== Visual polish (VCENS) ====== */
    :root {
        --tb-radius: 14px;
        --tb-shadow: 0 10px 30px rgba(0,0,0,.08);
        --tb-shadow-sm: 0 6px 18px rgba(0,0,0,.06);
        --tb-border: rgba(0,0,0,.08);
        --tb-muted: rgba(33,37,41,.7);
        --tb-bg1: #f4f7ff;
        --tb-bg2: #f7f9fc;
    }

    /* soft gradient background */
    body.tb-has-sidebar {
        background: radial-gradient(1200px 600px at 20% -10%, rgba(13,110,253,.10), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(32,201,151,.08), transparent 55%), linear-gradient(180deg, var(--tb-bg1), var(--tb-bg2));
    }

    /* topbar: slightly translucent */
    .tb-topbar {
        backdrop-filter: blur(8px);
        background: rgba(33,37,41,.92) !important;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    /* sidebar look */
    .tb-sidebar {
        background: rgba(255,255,255,.92);
        backdrop-filter: blur(8px);
        border-right: 1px solid var(--tb-border);
    }

        /* sidebar links: hover + active */
        .tb-sidebar .list-group-item {
            border: 0;
            border-radius: 10px;
            margin: 6px 10px;
            padding: 10px 12px;
            color: rgba(33,37,41,.85);
            transition: all .15s ease;
        }

            .tb-sidebar .list-group-item:hover {
                background: rgba(13,110,253,.08);
                transform: translateX(2px);
            }

            .tb-sidebar .list-group-item.active {
                background: rgba(13,110,253,.14);
                color: rgba(13,110,253,1);
                font-weight: 600;
            }

    /* content header card */
    .tb-content .card {
        border: 1px solid var(--tb-border);
        border-radius: var(--tb-radius);
        box-shadow: var(--tb-shadow-sm);
    }

        .tb-content .card .card-body {
            padding: 16px 18px;
        }

    /* generic cards */
    .card {
        border: 1px solid var(--tb-border);
        border-radius: var(--tb-radius);
        box-shadow: var(--tb-shadow-sm);
        background: rgba(255,255,255,.94);
    }

        .card:hover {
            box-shadow: var(--tb-shadow);
            transform: translateY(-1px);
            transition: box-shadow .15s ease, transform .15s ease;
        }

    /* typography */
    h1, h2, h3, h4 {
        letter-spacing: .2px;
    }

    .text-muted {
        color: var(--tb-muted) !important;
    }

    /* tables a bit nicer */
    .table {
        background: rgba(255,255,255,.92);
        border-radius: var(--tb-radius);
        overflow: hidden;
    }

        .table thead th {
            background: rgba(33,37,41,.03);
        }

    /* footer */
    .tb-footer {
        background: rgba(255,255,255,.85);
    }

    @media (prefers-reduced-motion: no-preference) {
        .tb-content {
            animation: fadeInUp .18s ease both;
        }
    }
}
/* 統一放大所有搜尋欄位 */
.vcrms-search {
    min-width: 380px;
}

@media (min-width: 768px) {
    .vcrms-search {
        min-width: 520px;
    }
}

.showcase-cover-wrap {
    width: 100%;
    height: 220px; /* 桌機高度：更清楚 */
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.08);
    overflow: hidden;
}

.showcase-cover {
    width: 100%;
    height: 100%;
    object-fit: contain; /*不裁切、完整顯示 */
    display: block;
}

@media (max-width: 768px) {
    .showcase-cover-wrap {
        height: 180px;
    }
    /* 手機也放大 */
}

/* ✅ 保留換行（\r\n / \n 都會顯示成換行） */
.tb-preline {
    white-space: pre-line;
}