﻿body html {
    width: 100%;
    height: 100%;
}

html,
body,
app-root {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: Roboto;
    font-size: 13px;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

.tab {
    padding-top: 2px;
    padding-bottom: 18px;
    cursor: pointer
}

.active {
    background-color: burlywood;
}

.e-dbrd-blueWaitingIndcator {
    -webkit-animation: rotate 2s linear infinite;
    animation: rotate 2s linear infinite;
    height: 54px;
    width: 54px;
    top: 50%;
    left: 50%;
    position: relative;
}

.e-waiting {
    position: fixed;
    display: block;
    margin: 0px auto;
    width: 54px;
    height: 54px;
    zoom: 0.5;
    margin-left: 55px;
}

#container {
    width: 13%;
    float: left;
    height: 100%;
    float: left;
    background: #f4f4f4;
    height: 100%;
    box-shadow: 2px 0 4px 0 rgba(0, 0, 0, .12);
    overflow: auto;
    overflow-x: hidden;
}

#grid-title {
    font-size: 17px;
    border-bottom: 1px solid #333;
    padding: 15px;
}

#panel {
    width: 100%;
    float: left;
    background: #f4f4f4;
    overflow: auto;
}

#dashboard {
    width: 100%;
    float: left;
    height: 100%;
    display: block;
}

.dashboard-item {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

#viewer-section {
    width: 87%;
    height: 100%;
    float: left;
}

#viewer-header {
    padding: 10px;
    display: block;
    float: left;
    width: 100%;
}

#create-dashboard {
    float: right;
    margin-right: 20px;
    background: #0565ff;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    height: 28px;
    line-height: 28px;
    min-width: 90px;
    outline: none;
    text-align: center;
    border: 1px solid #0450cc;
}

#edit-dashboard {
    float: right;
    background: #fff;
    margin-right: 20px;
    border: 0;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    height: 28px;
    line-height: 28px;
    min-width: 90px;
    outline: none;
    text-align: center;
    border: 1px solid #b3b3b3;
}

#dashboardDesigner {
    height: 900px;
    border: 2px solid #333;
}

#custom_ok_button {
    margin: 10px 0;
    padding: 4px 8px;
    font-size: 16px;
    line-height: 24px;
    border-radius: 4px;
    background: #fff;
    border: 0.5px solid #e2e8f0;
    color: #2d3748;
    float: right;
    margin-left: 12px;
    margin-right: 17px;
}

#sample_dialog {
    width: 385px;
}

/* =========================================================
   MobileDOCK application shell (sidebar + topbar + content)
   ========================================================= */
* {
    box-sizing: border-box;
}

body.app-body {
    background: #f5f6fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1c2033;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: #ffffff;
    border-right: 1px solid #eef0f4;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f2f3f6;
}

.sidebar-logo .logo-mark {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    font-size: 17px;
    font-weight: 700;
    color: #1c2033;
    letter-spacing: .2px;
}

.sidebar-logo .logo-text-accent {
    color: #f0512b;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 12px;
}

.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #667085;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, color .12s ease;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
}

.nav-item:hover {
    background: #f7f8fa;
    color: #1c2033;
}

.nav-item.active {
    background: #fdece6;
    color: #f0512b;
}

.sidebar-footer {
    border-top: 1px solid #f2f3f6;
    padding: 10px 12px 16px;
}

.sidebar-footer .footer-copy {
    text-align: center;
    font-size: 12px;
    color: #98a2b3;
    margin-top: 8px;
}

/* ---------- Main area ---------- */
.main-area {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.topbar {
    height: 64px;
    min-height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.topbar-title {
    font-size: 17px;
    font-weight: 700;
    color: #1c2033;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    cursor: pointer;
}

.icon-btn:hover {
    background: #f7f8fa;
}

.icon-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}

.icon-btn .badge {
    position: absolute;
    top: 4px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f0512b;
    border: 1.5px solid #fff;
}

/* ---------- User switcher ---------- */
.user-switcher {
    position: relative;
    margin-left: 8px;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 6px 6px 8px;
    border-radius: 10px;
}

.user-trigger:hover {
    background: #f7f8fa;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2b3674;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1c2033;
}

.user-role {
    font-size: 11px;
    color: #98a2b3;
}

.chevron {
    color: #98a2b3;
    font-size: 11px;
    margin-left: 2px;
}

/* Positioned via JS (top/right set from the trigger's bounding rect) and
   reparented to <body> so it always renders above the embedded Bold BI
   dashboard's own floating toolbar (refresh / auto-refresh / menu), which
   otherwise can paint over it and hide part of the switcher. */
.user-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    width: 230px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(20, 24, 40, .12);
    padding: 6px;
    display: none;
    z-index: 2147483647;
}

.user-dropdown.open {
    display: block;
}

.user-dropdown-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #98a2b3;
    padding: 8px 10px 4px;
}

.user-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.user-option:hover {
    background: #f7f8fa;
}

.user-option.selected {
    background: #fdece6;
}

.user-option.selected .user-name {
    color: #f0512b;
}

/* ---------- Content ---------- */
.content {
    flex: 1 1 auto;
    overflow: auto;
    padding: 20px;
}

.tab-panel {
    height: 100%;
}

.tab-panel.hidden {
    display: none;
}

#panel-dashboard,
#panel-dashboard #dashboard {
    height: 100%;
    width: 100%;
}

.empty-panel {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
    background: #fff;
    border: 1px dashed #e3e6ec;
    border-radius: 12px;
    font-size: 13px;
}