/*
 * 天达云 VNC 网关界面现代化覆盖样式（在 Default.css / tdvnc.css 之后加载）
 * 目标：阿里云/腾讯云风格——紧凑浅色工具栏、胶囊按钮、隐藏低频功能、登录页卡片化。
 * 只覆盖外观与显隐，不改任何控件 id 与事件，Myrtille.Web.dll 逻辑不受影响。
 */

/* ===== 页面底色 ===== */
body {
    background: linear-gradient(135deg, #1f2d3d 0%, #34495e 100%) !important;
}

/* ===== 工具栏：整行浅色平板条 ===== */
#toolbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    margin: 0;
    overflow: visible;
    background: linear-gradient(180deg, #ffffff 0%, #f2f5f9 100%);
    border-bottom: 1px solid #dfe6ee;
}

/* 连接信息由外层控制台展示；低频按钮收编（调试/渲染模式 Default.css 已隐藏） */
#serverInfo,
#userInfo,
#mrc,
#vswipe,
#share {
    display: none !important;
}

/* 工具栏按钮：胶囊扁平 */
#toolbar input[type="button"] {
    float: none !important;
    width: auto !important;
    min-width: 84px;
    padding: 6px 16px;
    border: 1px solid #d0d7de;
    border-radius: 18px;
    background: #fff;
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: all .15s ease;
}

#toolbar input[type="button"]:hover:not(:disabled) {
    border-color: #409eff;
    color: #409eff;
    background: #ecf5ff;
}

#toolbar input[type="button"]:disabled {
    color: #b0b8c1;
    background: #f5f7fa;
    border-color: #e4e9ef;
    cursor: default;
}

/* Ctrl+Alt+Del 宽一点 */
#cad {
    min-width: 110px !important;
}

/* 断开连接：红色语义 */
#disconnect {
    border-color: #f3c1c3 !important;
    color: #d9534f !important;
}

#disconnect:hover:not(:disabled) {
    background: #fdf0f0 !important;
    border-color: #d9534f !important;
    color: #c9302c !important;
}

/* 工具栏折叠图标：小圆角按钮 */
#toolbarToggle {
    position: absolute;
    left: 4px;
    top: 4px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
    padding: 2px 6px;
    z-index: 200;
}

/* 嵌入外壳(cloudvnc.aspx)时折叠图标多余，隐藏 */
.td-embedded #toolbarToggle {
    display: none !important;
}

/* ===== 状态栏 ===== */
#statDiv {
    margin-left: 14px;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, .78);
    color: #9fd3ff;
    border-radius: 0 0 6px 6px;
}

/* ===== 登录页：白色卡片（直接访问网关时可见） ===== */
#login {
    width: 420px !important;
    height: auto !important;
    margin-top: -210px !important;
    margin-left: -240px !important;
    padding: 24px 28px 26px !important;
    background: rgba(255, 255, 255, .97);
    color: #333 !important;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

#logo {
    display: none;
}

#login label,
#login .inputDiv label {
    float: left;
    width: 110px;
    margin-top: 7px;
    color: #5a6a7a;
    font-size: 13px;
}

#login input[type="text"],
#login input[type="password"] {
    width: 240px;
    padding: 7px 9px;
    border: 1px solid #ccd4dc;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #fff;
}

#login select {
    width: 258px;
    padding: 6px;
    border: 1px solid #ccd4dc;
    border-radius: 4px;
    background: #fff;
    color: #333;
}

#connect {
    width: 258px !important;
    margin-left: 110px !important;
    margin-top: 8px !important;
    padding: 9px 0;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, #409eff, #2f7fe0);
    color: #fff !important;
    font-size: 14px;
    cursor: pointer;
}

#connect:hover {
    background: linear-gradient(135deg, #5aabff, #3c8cf0);
}

#errorDiv {
    margin-left: 110px !important;
}

/* 输入区行距 */
#login .inputDiv {
    display: block;
    margin-bottom: 10px;
}

/* ===== 弹窗（虚拟键盘/剪贴板等）===== */
.modalPopup {
    background-color: #fff !important;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
    overflow: auto;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    #toolbar {
        padding: 6px 8px;
        gap: 6px;
    }

    #toolbar input[type="button"] {
        min-width: 0;
        padding: 5px 10px;
        font-size: 12px;
    }

    #login {
        width: 92%;
        margin-left: -46%;
        padding: 18px;
    }
}
