/* _17b: 主容器+面板+按钮+输入框 (从 _17_tno_style 拆分) */

/* ==================== 主容器 ==================== */
#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ==================== 面板样式 ==================== */
.panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-primary);
    position: relative;
    padding: 1.25rem;
}

/* L型边角装饰 */
.panel::before,
.panel::after {
    content: '';
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid var(--border-accent);
}

.panel::before {
    top: -0.25vh;
    left: -0.2vw;
    border-right: none;
    border-bottom: none;
}

.panel::after {
    top: -0.25vh;
    right: -0.2vw;
    border-left: none;
    border-bottom: none;
}

/* 右下角装饰 */
.panel .corner-br,
.panel .corner-bl {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid var(--border-accent);
}

.panel .corner-bl {
    bottom: -0.25vh;
    left: -0.2vw;
    border-right: none;
    border-top: none;
}

.panel .corner-br {
    bottom: -0.25vh;
    right: -0.2vw;
    border-left: none;
    border-top: none;
}

/* 面板标题栏 */
.panel-header {
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 0.625rem;
    margin-bottom: 0.9375rem;
    position: relative;
}

.panel-title {
    font-size: var(--font-xl, 1.125rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    font-weight: 700;
}

/* 微缩文字边框 */
.panel-header .microtext-border {
    position: absolute;
    bottom: -0.75vh;
    left: 0;
    font-size: var(--font-canvas-pico, 0.375rem);
    color: var(--text-secondary);
}

/* ==================== 按钮样式 ==================== */
button {
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 2px solid var(--border-accent);
    padding: 0.625rem 1.25rem;
    font-family: 'Courier Prime', monospace;
    font-size: var(--font-canvas-md);
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    transition: background var(--duration-press) var(--ease-out), border-color var(--duration-press) var(--ease-out), transform var(--duration-press) var(--ease-out);
    font-weight: 500;
}

button:hover {
    background: var(--bg-panel-hover);
    border-color: var(--accent-authority);
}

button:active {
    transform: translateY(1px);
}

/* 印章效果按钮 */
button.stamp {
    border-style: dashed;
    border-width: 2px;
    transform: rotate(-1deg);
}

button.stamp:hover {
    transform: rotate(0deg);
}

/* LED状态指示 */
button.status-ok::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--accent-ok);
    margin-right: 0.5rem;
    box-shadow: 0 0 4px var(--accent-ok);
}

button.status-alert::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--accent-alert);
    margin-right: 0.5rem;
    box-shadow: 0 0 4px var(--accent-alert);
}

/* ==================== 输入框 ==================== */
input[type="text"],
input[type="password"],
textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    padding: 0.5rem 0.75rem;
    font-family: 'Courier Prime', monospace;
    font-size: var(--font-canvas-md);
    width: 100%;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-authority);
    box-shadow: 0 0 4px var(--accent-authority);
}

/* S12b 包裹律㉑泛化根治: 全站 textarea 禁横向越父 —— UA 默认 resize:both
   且无限宽钳制, 任何 textarea 都可被拖出父容器 (登录墙"申请理由"用户实锤).
   唯一通用规则落此基座层, 旧 _41 按 id 打地鼠专项已物理删除 (正本清源,
   禁一类组件约束按 id 打地鼠). 纵向拉伸保留 (用户认可); 个别面需要
   禁全部拉伸的 (知识编辑器) 由其后加载的属主规则覆写 resize:none. */
textarea {
    resize: vertical;
    max-width: 100%;
    box-sizing: border-box;
}



/* Public filing belongs to the application shell and reserves layout space. */
body.leu-site-filed { --site-filing-height: 1.75rem; }
body.leu-site-filed #leucs-app { height: calc(100dvh - var(--site-filing-height)); min-height: 0; }
#leu-site-filing { position: fixed; inset: auto 0 0; height: var(--site-filing-height); display: flex; align-items: center; justify-content: center; background: var(--bg-bunker); border-top: 1px solid var(--border-primary); font-size: var(--font-size-xs); z-index: 30; }
#leu-site-filing a { display: inline-flex; gap: .4rem; align-items: center; color: var(--text-primary); text-decoration: none; }
#leu-site-filing img { width: 1rem; height: 1rem; object-fit: contain; }
