:root {
    --main-color: #0C0A53;
    --digital-color: #0B1A84;
    --creative-color: #FF001E;
    --pay-color: #FFAE00;
    --talk-color: #191919;
}

.studio-account-select {
    min-width: 160px;
    max-width: 240px;
    font-size: 0.8125rem;
    padding: 0.3rem 2rem 0.3rem 0.75rem;
    border-color: #d9dee3;
    border-radius: 0.375rem;
    cursor: pointer;
}

.studio-account-select:focus {
    border-color: #7367f0;
    box-shadow: 0 0 0 0.15rem rgba(115, 103, 240, 0.25);
}

@media screen and (max-width: 767px) {
    .studio-account-select {
        min-width: 100px;
        max-width: 140px;
        font-size: 0.75rem;
        padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    }
}

/* ==================================== 사이드바 하단 고정 ==================================== */
#layout-menu {
    display: flex;
    flex-direction: column;
}

#layout-menu .menu-inner {
    flex: 1;
    overflow-y: auto;
}

.studio-menu-bottom {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.studio-menu-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background-color 0.15s, color 0.15s;
}

.studio-menu-logout:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.studio-menu-logout .material-symbols-outlined {
    font-size: 20px;
}

.studio-menu-cs {
    padding: 0.5rem 0.75rem 0;
    text-align: left;
}

.studio-menu-cs-phone {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2px;
    letter-spacing: 0.5px;
}

.studio-menu-cs-time {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.4;
}
/* ==================================== 사이드바 하단 고정 ==================================== */

/* ===== 모바일 하단 독바 ===== */
.studio-dockbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-around;
    justify-content: space-around;
    gap: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .studio-dockbar {
    background: var(--bs-card-bg);
}

.studio-dockbar .studio-dock-btn {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-width: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: none;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: 10px;
    padding: 6px 2px;
    transition: color .12s, background .12s;
}

.studio-dockbar .studio-dock-btn i {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.studio-dockbar .studio-dock-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
}

.studio-dockbar .studio-dock-btn:active,
.studio-dockbar .studio-dock-btn:hover {
    color: var(--bs-primary);
    background: rgba(115, 103, 240, 0.06);
}

.studio-dockbar .studio-dock-btn span {
    font-weight: 600;
    letter-spacing: -0.2px;
}

@media (max-width: 1199.98px) {
    .content-wrapper {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }
}

/* ===== 모바일 상단 네비게이션 ===== */
@media (max-width: 1199.98px) {

    #layout-navbar.layout-navbar {
        padding-left: 12px !important;
        padding-right: 12px !important;
        min-height: 58px;
    }

    #layout-navbar .layout-menu-toggle {
        margin-right: 10px !important;
    }

    .studio-mobile-menu-btn {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(115, 103, 240, 0.08);
        color: var(--bs-primary);
        transition: background .12s;
    }

    .studio-mobile-menu-btn:hover,
    .studio-mobile-menu-btn:active {
        background: rgba(115, 103, 240, 0.16);
        color: var(--bs-primary);
    }

    .studio-mobile-menu-btn i {
        font-size: 22px;
    }

    .studio-mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1 1 auto;
        min-width: 0;
        text-decoration: none;
        color: inherit;
        padding-right: 8px;
    }

    .studio-mobile-brand-logo {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: linear-gradient(135deg, #7367f0, #9c8cff);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 3px 10px rgba(115, 103, 240, 0.28);
    }

    .studio-mobile-brand-logo img {
        width: 22px;
        height: auto;
        filter: brightness(0) invert(1);
    }

    .studio-mobile-brand-text {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.2;
        flex: 1 1 auto;
    }

    .studio-mobile-brand-title {
        font-size: 13px;
        font-weight: 800;
        color: var(--bs-heading-color);
        letter-spacing: -0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .studio-mobile-brand-sub {
        font-size: 11px;
        color: var(--bs-secondary-color);
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .studio-mobile-iconbtn {
        width: 26px;
        height: 26px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 0;
        background: transparent !important;
        border: 0 !important;
        color: var(--bs-heading-color);
        position: relative;
        padding: 0 !important;
        transition: color .12s;
    }

    .studio-mobile-iconbtn:hover,
    .studio-mobile-iconbtn:active {
        background: transparent !important;
        border: 0 !important;
        color: var(--bs-primary);
    }

    .studio-mobile-iconbtn i {
        font-size: 22px;
        line-height: 1;
    }

    .studio-mobile-iconbtn-dot {
        position: absolute;
        top: -2px;
        right: -2px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ea5455;
        border: 2px solid var(--bs-card-bg);
    }

    #layout-navbar .navbar-nav-right {
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }

    #layout-navbar .navbar-nav-right .nav-item {
        margin-left: 12px !important;
    }

    #layout-navbar .navbar-nav-right .nav-item:first-child {
        margin-left: 0 !important;
    }
}

/* ===== 업체 전환 바텀시트 ===== */
.studio-account-sheet .modal-dialog {
    margin: 0;
    max-width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.studio-account-sheet .modal-content {
    pointer-events: auto;
    border: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    max-height: 82vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: hidden;
}

.studio-account-sheet.fade .modal-dialog {
    transition: transform .28s ease;
    transform: translateY(100%);
}

.studio-account-sheet.show .modal-dialog {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .studio-account-sheet .modal-dialog {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        max-width: 460px;
        margin: 1.75rem auto;
        pointer-events: auto;
    }

    .studio-account-sheet .modal-content {
        border-radius: 18px;
        max-height: 80vh;
    }

    .studio-account-sheet.fade .modal-dialog {
        transform: translateY(-20px);
        opacity: 0;
    }

    .studio-account-sheet.show .modal-dialog {
        transform: translateY(0);
        opacity: 1;
    }
}

.studio-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #dfe1e6;
    margin: 10px auto 4px;
}

@media (min-width: 768px) {
    .studio-sheet-handle {
        display: none;
    }
}

.studio-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 20px 10px;
}

.studio-sheet-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 2px;
    color: var(--bs-heading-color);
    letter-spacing: -0.3px;
}

.studio-sheet-sub {
    font-size: 12px;
    color: var(--bs-secondary-color);
    margin: 0;
}

.studio-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}

.studio-sheet-close:hover,
.studio-sheet-close:active {
    background: rgba(234, 84, 85, 0.1);
    color: #ea5455;
}

.studio-sheet-close i {
    font-size: 18px;
}

.studio-account-sheet .modal-body {
    padding: 6px 14px 18px;
}

.studio-account-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.studio-account-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--bs-border-color);
    border-radius: 14px;
    text-align: left;
    transition: all .15s ease;
    cursor: pointer;
    color: var(--bs-body-color);
}

.studio-account-card:hover {
    border-color: rgba(115, 103, 240, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(115, 103, 240, 0.08);
}

.studio-account-card:active {
    transform: translateY(0);
}

.studio-account-card.is-active {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, rgba(115, 103, 240, 0.06), rgba(115, 103, 240, 0.02));
}

.studio-account-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(115, 103, 240, 0.1);
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.studio-account-card-icon i {
    font-size: 22px;
}

.studio-account-card.is-active .studio-account-card-icon {
    background: linear-gradient(135deg, #7367f0, #9c8cff);
    color: #fff;
    box-shadow: 0 4px 12px rgba(115, 103, 240, 0.3);
}

.studio-account-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.studio-account-card-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--bs-heading-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.studio-account-card-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--bs-primary);
}

.studio-account-card-arrow,
.studio-account-card-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.studio-account-card-arrow {
    color: var(--bs-secondary-color);
}

.studio-account-card:hover .studio-account-card-arrow {
    color: var(--bs-primary);
    transform: translateX(2px);
    transition: all .15s;
}

.studio-account-card-check {
    background: var(--bs-primary);
    color: #fff;
}

.studio-account-card-check i {
    font-size: 16px;
    font-weight: 800;
}

/* ===== 전역 로딩 오버레이 ===== */
.studio-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.studio-loading-overlay.is-show {
    display: flex;
}

.studio-loading-box {
    text-align: center;
}

.studio-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(115, 103, 240, 0.15);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: studioSpin .8s linear infinite;
}

@keyframes studioSpin {
    to {
        transform: rotate(360deg);
    }
}

.studio-loading-text {
    font-size: 13px;
    color: var(--bs-heading-color);
    margin: 0;
    font-weight: 600;
}

.studio-mobile-iconbtn.is-disabled,
.studio-mobile-iconbtn:disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* ===== PC 상단 네비게이션 ===== */
@media (min-width: 1200px) {
    #layout-navbar.layout-navbar {
        min-height: 64px;
        box-shadow: 0 2px 12px rgba(21, 28, 66, 0.04);
    }

    .studio-pc-hello {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 5px 16px 5px 5px;
        border-radius: 999px;
        background: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        transition: border-color .15s, background .15s;
    }

    .studio-pc-hello:hover {
        border-color: rgba(115, 103, 240, 0.35);
        background: rgba(115, 103, 240, 0.03);
    }

    .studio-pc-hello-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7367f0, #9c8cff);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(115, 103, 240, 0.28);
        flex-shrink: 0;
    }

    .studio-pc-hello-avatar i {
        font-size: 18px;
    }

    .studio-pc-hello-text {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .studio-pc-hello-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--bs-heading-color);
        white-space: nowrap;
    }

    .studio-pc-hello-sub {
        font-weight: 500;
        color: var(--bs-secondary-color);
        margin-left: 1px;
    }

    .studio-pc-hello-hint {
        font-size: 10px;
        color: var(--bs-secondary-color);
        letter-spacing: -0.2px;
    }

    .studio-pc-account-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    .studio-pc-account-icon {
        position: absolute;
        left: 14px;
        font-size: 16px;
        color: var(--bs-primary);
        pointer-events: none;
        z-index: 2;
    }

    .studio-pc-account-select {
        height: 40px;
        min-width: 200px;
        max-width: 260px;
        padding: 0 36px 0 36px !important;
        border-radius: 999px;
        border: 1px solid var(--bs-border-color) !important;
        background-color: var(--bs-body-bg) !important;
        font-size: 13px;
        font-weight: 600;
        color: var(--bs-heading-color);
        transition: border-color .15s, box-shadow .15s;
        cursor: pointer;
    }

    .studio-pc-account-select:hover:not(:disabled) {
        border-color: rgba(115, 103, 240, 0.4) !important;
    }

    .studio-pc-account-select:focus {
        border-color: var(--bs-primary) !important;
        box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.1) !important;
    }

    .studio-pc-account-select:disabled {
        cursor: default;
        opacity: 1;
        background-color: var(--bs-body-bg) !important;
    }

    .studio-pc-iconbtn {
        width: 40px;
        height: 40px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        color: var(--bs-heading-color);
        position: relative;
        text-decoration: none;
        transition: border-color .15s, background .15s, color .15s;
    }

    .studio-pc-iconbtn:hover {
        border-color: rgba(115, 103, 240, 0.4);
        background: rgba(115, 103, 240, 0.05);
        color: var(--bs-primary);
    }

    .studio-pc-iconbtn i {
        font-size: 20px;
    }

    .studio-pc-iconbtn-dot {
        position: absolute;
        top: 7px;
        right: 8px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #ea5455;
        border: 2px solid var(--bs-card-bg);
    }
}