/* ============================================================================
 * NET OPS - api(1).php 专属业务样式 (依赖 Universal.css)
 * ============================================================================ */

/* 隐藏滚动条 */
html, body { -ms-overflow-style: none; scrollbar-width: none; }

/* 基础页面排版 */
body {
    font-family: var(--font-ui);
    color: var(--text-primary);
    background: transparent;
    padding: 12px 2px;
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh;
    transition: color 0.3s ease;
}

.ark-wrapper { width: 100%; max-width: 1200px; position: relative; }

/* --- 命令台 (Command Deck) --- */
.ark-cmd-deck { margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.ark-input-group {
    display: flex; width: 100%; max-width: 800px;
    background: var(--bg-white);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    box-shadow: var(--shadow-md);
    transition: 0.3s;
}
.ark-input-group:focus-within { border-color: var(--primary-color); box-shadow: 0 0 20px rgba(59, 130, 246, 0.15); }
.ark-input-group.error { border-color: var(--c-alert); box-shadow: 0 0 20px rgba(234, 88, 12, 0.3); animation: shake 0.4s ease-in-out; }

.ark-prefix {
    padding: 0 20px; display: flex; align-items: center;
    font-family: var(--font-ui); font-weight: 700; color: var(--primary-color);
    border-right: 1px solid var(--border-color); font-size: 14px; user-select: none;
    white-space: nowrap; cursor: pointer; transition: background 0.2s;
    min-height: 48px;
}
.ark-prefix:hover { background: rgba(59, 130, 246, 0.1); }

.ark-input {
    flex: 1; border: none; background: transparent;
    padding: 15px; font-family: var(--font-ui); font-size: 16px;
    color: var(--text-primary); text-align: left; min-width: 0; 
}
.ark-input::placeholder { color: var(--text-secondary); opacity: 0.5; font-size: 14px; }

.ark-btns { display: flex; flex-shrink: 0; }
.ark-btn-exec {
    border: none; background: transparent; padding: 0 20px; cursor: pointer;
    color: var(--text-secondary); font-family: var(--font-ui);
    font-weight: 700; font-size: 14px; letter-spacing: 1px;
    border-left: 1px solid var(--border-color);
    transition: 0.3s; display: flex; align-items: center; gap: 6px;
    white-space: nowrap; min-height: 48px;
}
.ark-btn-exec:hover { background: var(--primary-color); color: #fff; }

/* --- 状态栏 --- */
.ark-status-bar { display: flex; align-items: center; gap: 15px; font-family: var(--font-ui); font-size: 13px; color: var(--text-secondary); opacity: 0.8; }
.ark-dot { width: 8px; height: 8px; background: var(--text-secondary); border-radius: 50%; transition: 0.3s; }
.ark-dot.active { background: var(--c-warn); box-shadow: 0 0 10px var(--c-warn); }
.ark-dot.ready { background: var(--primary-color); box-shadow: 0 0 5px var(--primary-color); }
.ark-dot.err { background: var(--c-alert); box-shadow: 0 0 5px var(--c-alert); }
.ark-loader { width: 100px; height: 4px; background: rgba(128,128,128,0.2); border-radius: 2px; overflow: hidden; }
.ark-loader-fill { width: 0%; height: 100%; background: var(--primary-color); transition: width 0.3s ease; }

/* --- 指引 & 结果网格 --- */
.ark-guide {
    text-align: center; padding: 40px; margin-top: 20px;
    background: var(--bg-white); border: 1px solid var(--border-color);
    clip-path: polygon(40px 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%, 0 40px);
}
.ark-guide h2 { color: var(--primary-color); text-transform: uppercase; margin-bottom: 10px; text-shadow: var(--glow-text); }
.ark-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.ark-guide-item { color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ark-guide-item i { font-size: 24px; color: var(--text-primary); }

.ark-grid { display: none; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; width: 100%; }
.ark-grid.active { display: grid; }

/* --- 卡片通用样式 --- */
.ark-card {
    background: var(--bg-white); border: 1px solid var(--border-color); padding: 2px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: all 0.3s; display: flex; flex-direction: column; min-width: 0;
    animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.ark-card:hover { border-color: var(--primary-color); z-index: 10; transform: translateY(-3px); }

.ark-card-head {
    background: rgba(128,128,128,0.05); padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; color: var(--text-primary); font-size: 14px;
    border-bottom: 1px solid var(--border-color); white-space: nowrap; overflow: hidden; 
}
.ark-card-head div { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ark-card-head i { color: var(--primary-color); flex-shrink: 0; }
.ark-card-head .ark-badge { font-size: 11px; padding: 2px 6px; background: rgba(128,128,128,0.1); border-radius: 4px; color: var(--text-secondary); flex-shrink: 0; }
.ark-card-head small { margin-left: auto; font-family: var(--font-ui); font-size: 11px; color: var(--text-secondary); opacity: 0.7; }

.ark-card-body { padding: 20px; font-family: var(--font-ui); font-size: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.ark-card-foot { padding: 10px 20px; border-top: 1px solid var(--border-color); font-size: 11px; color: var(--text-secondary); text-align: right; font-family: var(--font-ui); }

/* --- 卡片详细元素 (合并了原内联样式) --- */
.ark-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-width: 0; }
.ark-label { color: var(--text-secondary); font-size: 12px; font-weight: 600; text-transform: uppercase; flex-shrink: 0; white-space: nowrap; }
.ark-value, .ark-mono { color: var(--text-primary); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.ark-copy-btn { cursor: pointer; transition: color 0.2s; border-bottom: 1px dashed rgba(128,128,128,0.3); }
.ark-copy-btn:hover { color: var(--primary-color); border-bottom-color: var(--primary-color); }

.ark-stat-flex { display: flex; align-items: center; gap: 15px; }
.ark-big-stat { font-size: 32px; font-weight: 700; line-height: 1; text-shadow: var(--glow-text); }
.ark-stat-info { display: flex; flex-direction: column; font-size: 12px; color: var(--text-secondary); }

.ark-badge { font-size: 11px; padding: 1px 5px; color: #fff; font-weight: bold; border-radius: 2px; flex-shrink: 0; }
.ark-bg-cyan { background: var(--primary-color); }
.ark-bg-warn { background: var(--c-warn); }
.ark-bg-alert { background: var(--c-alert); }
.ark-bg-dim { background: var(--text-secondary); }
.ark-divider { height: 1px; background: var(--border-color); margin: 8px 0; opacity: 0.5; }
.ark-full { grid-column: 1 / -1; }

.ark-progress { height: 4px; background: rgba(128,128,128,0.1); margin: 5px 0 10px; }
.ark-progress div { height: 100%; background: var(--primary-color); }
.ark-check-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.ark-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.ark-kv { display: flex; flex-direction: column; overflow: hidden; }
.ark-kv span { font-size: 11px; color: var(--text-secondary); }
.ark-geo-box { text-align: center; margin-bottom: 10px; border: 1px dashed rgba(128,128,128,0.2); padding: 10px; overflow: hidden; }
.ark-geo-main { font-size: 18px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ark-geo-sub { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ark-btn-group { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; border-top: 1px solid rgba(128,128,128,0.1); padding-top: 15px; }
.ark-btn-s { background: transparent; border: 1px solid rgba(128,128,128,0.3); color: var(--text-secondary); padding: 8px; font-family: var(--font-ui); font-size: 12px; cursor: pointer; text-decoration: none; text-align: center; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ark-btn-s:hover { border-color: var(--primary-color); color: var(--primary-color); background: rgba(59, 130, 246, 0.05); }

.ark-raw { background: #000; color: #aaa; padding: 15px; font-size: 12px; margin-top: 15px; white-space: pre-wrap; display: block; overflow-x: auto; }
.ark-raw.hidden { display: none; }
.ark-dim { opacity: 0.5; font-style: italic; }
.ark-empty { text-align: center; padding: 20px; color: var(--text-secondary); opacity: 0.6; }

.ark-result-block { background: rgba(128,128,128,0.05); border: 1px solid var(--border-color); padding: 15px; margin-bottom: 15px; border-radius: 4px; overflow: hidden; }
.ark-result-title { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }
.ark-result-content { line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ark-msg-box { grid-column: 1 / -1; text-align: center; padding: 50px 20px; animation: fadeIn 0.5s ease; }
.ark-msg-title { font-size: 24px; color: var(--c-warn); font-weight: 700; margin-bottom: 10px; text-shadow: var(--glow-text); }
.ark-msg-sub { font-family: var(--font-ui); color: var(--text-secondary); font-size: 15px; }

.risk-trigger { color: var(--c-alert); cursor: pointer; transition: color 0.2s; margin-left: 8px; font-size: 15px; }
.risk-trigger:hover { color: var(--c-warn); }

.ark-list { list-style: none; padding: 0; margin: 0; }
.ark-list li { padding-left: 10px; border-left: 2px solid rgba(128,128,128,0.2); margin-bottom: 4px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ark-list-head { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.ark-value-lg { font-size: 16px; font-weight: 700; color: var(--primary-color); text-shadow: var(--glow-text); font-family: var(--font-ui); }

.ark-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.ark-tag {
    padding: 6px 10px; font-size: 12px; border: 1px solid rgba(128,128,128,0.2);
    cursor: pointer; transition: 0.2s; color: var(--text-primary);
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border-radius: 4px; flex-grow: 1; text-align: center; font-weight: 600;
}
.ark-tag i { font-size: 14px; margin-bottom: 2px; }
.ark-tag.ark-cyan { color: var(--primary-color); border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.05); }
.ark-tag:hover { border-color: var(--primary-color); background: var(--primary-color); color: #fff !important; }

/* 模态窗 */
.ark-modal-mask {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: transparent; z-index: 100; display: none; align-items: center; justify-content: center;
}
.ark-modal-mask.active { display: flex; }
.ark-modal {
    width: 90%; max-width: 600px;
    background: var(--bg-white); border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    max-height: 85vh; display: flex; flex-direction: column;
}
.ark-modal-head { 
    padding: 15px 25px; background: var(--c-primary); color: #fff;
    font-weight: 700; display: flex; justify-content: space-between; align-items: center;
    text-transform: uppercase; letter-spacing: 1px; flex-shrink: 0;
}
.ark-modal-body { padding: 25px; font-family: var(--font-ui); font-size: 14px; overflow-y: auto; color: var(--text-primary); }
.ark-close-btn { cursor: pointer; font-size: 18px; } .ark-close-btn:hover { opacity: 0.8; }

/* 动画 */
@keyframes cardIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-5px);} 75% {transform: translateX(5px);} }

/* 移动端适配 */
@media (max-width: 768px) {
    .ark-input-group { flex-direction: column; clip-path: none; border-radius: 8px; }
    .ark-prefix { border-right: none; border-bottom: 1px solid var(--border-color); padding: 10px; justify-content: center; }
    .ark-btns { border-left: none; border-top: 1px solid var(--border-color); width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .ark-btn-exec { padding: 12px; justify-content: center; border-left: 1px solid var(--border-color); border-top: none; }
    .ark-btn-exec:nth-child(1), .ark-btn-exec:nth-child(3) { border-left: none; }
    .ark-btn-exec:nth-child(3), .ark-btn-exec:nth-child(4) { border-top: 1px solid var(--border-color); }
    .ark-modal, .ark-guide, .ark-card { clip-path: none; border-radius: 12px; }
    .ark-btn-group { grid-template-columns: repeat(3, 1fr); }
    .ark-value-lg { font-size: 11px !important; }
}