/* 1. 基础全局设置 */
body {
    margin: auto;
    width: 1200px;
    background-color: #d0d0d0; /* 页面大背景色 */
    font: 10pt arial, sans-serif;
    text-align: center;
    /* 增加 body 的顶部填充，作为第一道防线 */
    padding-top: 10px !important;
}

/* 2. 头部 Logo 与按钮容器：修复靠左与离顶间距 */
.header-container {
    display: flex !important;
    justify-content: space-between !important; /* Logo 靠左，按钮靠右 */
    align-items: flex-end !important;    /* 垂直方向居中对齐 */
    width: 1100px !important;           /* 宽度对齐下方的卡片 */
    margin: 0 auto 0px auto !important; /* 顶部0(靠body padding控制)，底部留30px间距 */
    padding: 0 !important;
}

.logo-left {
    display: block !important;
    margin: 0 !important; 
    height: auto; 
    max-height: 80px; /* 适当调大一点 Logo 的显示上限 */
}

.buttons-right {
    display: flex !important;
    gap: 12px; /* 按钮之间的间距 */
}

/* 3. 核心布局：DMR 风格容器 (下方表格卡片) */
fieldset, .card {
    background-color: #e6e6e6; 
    border-radius: 10px;
    margin: 40px auto;  
    padding: 35px 10px 10px 10px !important; 
    border: 0.8px solid #bcbcbc !important; 
    width: 1100px;
    display: block;
    position: relative; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 4. 标题样式：14pt 彻底透明且精准压线 */
legend, .card-header {
    text-align: left !important;
    padding: 0 10px !important; 
    font-size: 14pt !important; 
    font-weight: bold !important;
    color: #002d62 !important; 
    background-color: transparent !important; 
    background: transparent !important;
    border: none !important;
    position: absolute;
    top: -16px;  
    left: 15px; 
    margin: 0 !important;
    width: auto !important;
    z-index: 10;
}

/* 5. 表格与表头样式 */
table, td, th {
    border: 0.8px solid #d0d0d0;
    text-align: center;
    border-collapse: collapse;
}

th {
    background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%) !important;
    color: white !important;
    font-weight: bold !important;
    height: 25px !important;      
    line-height: 25px !important; 
    padding: 1px 4px !important;  
    font-size: 10pt !important;
}

td {
    border: 0.5px solid #d0d0d0 !important;
    padding: 5px 4px !important; 
    background-color: #f9f9f9;
    font-size: 10pt;
    color: #333;
}

tr:nth-child(even) td {
    background-color: #e6e6e69d !important;
}

/* 呼号与目标气泡 */
.badge-callsign {
    background-color: #0065ff !important;
    color: white !important;
    padding: 2px 10px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    display: inline-block;
}

.badge-target {
    background-color: #f37301 !important;
    color: white !important;
    padding: 2px 10px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    display: inline-block;
}

/* 6. 链接与清除 */
a:link, a:visited { color: #0066ff; text-decoration: none; font-weight: bold; }
a:hover { color: #ff6600; text-decoration: underline; }
.table-responsive { overflow: hidden !important; }


/* 确保按钮组容器靠右显示 */
.buttons-right {
    display: flex !important;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap; /* 防止按钮换行 */
}

/* ============================================================
   完全参考 DMR 源代码修改按钮风格
   ============================================================ */
.btn-sm, .button, .dropbtn {
    /* 设置为 DMR 默认的蓝色渐变 */
    background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%) !important;
    color: white !important;
    text-shadow: none !important;
    border: none !important;
    padding: 8px 10px !important; 
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 14px !important; 
    font-weight: 500 !important;
    margin: 7px 3px !important;
    border-radius: 8px !important; 
    box-shadow: 0px 8px 10px rgba(0,0,0,0.1) !important; /* DMR 核心投影 */
    transition: background-color 0.2s;
}

/* 悬停效果：参考 DMR .button:hover 使用灰色 */
.btn-sm:hover, .button:hover, .dropbtn:hover {
    background-image: none !important; /* 必须清除渐变才能显示纯灰色 */
    background-color: rgb(140,140,140) !important; 
    background: rgb(140,140,140) !important; 
    color: white !important;
}