* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: #16213e;
    padding: 1rem 2rem;
    border-bottom: 1px solid #0f3460;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: #e94560;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #a0a0b0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #e94560;
    background: rgba(233, 69, 96, 0.1);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 卡片 */
.card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: #e94560;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #0f3460;
}

/* 表单 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a0a0b0;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #e94560;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #e94560;
    color: #fff;
}

.btn-primary:hover {
    background: #d63851;
}

.btn-secondary {
    background: #0f3460;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #1a4a80;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 验证码区域 */
.code-row {
    display: flex;
    gap: 1rem;
}

.code-row .form-group {
    flex: 1;
}

.btn-code {
    white-space: nowrap;
    height: 48px;
    padding: 0 1rem;
    margin-top: 1.65rem;
}

/* 提示消息 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid #28a745;
    color: #28a745;
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #dc3545;
}

.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid #17a2b8;
    color: #17a2b8;
}

/* 信息行 */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #0f3460;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #a0a0b0;
    font-weight: 500;
}

.info-value {
    color: #e0e0e0;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* 终端页面 */
.terminal-container {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
}

/* Terminal security notice banner */
.terminal-notice {
    background: #2a1a0e;
    border-bottom: 2px solid #ffc107;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #ffc107;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 100;
}

.terminal-notice kbd {
    background: #0f3460;
    color: #e0e0e0;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #1a4a80;
    margin: 0 2px;
}

.terminal-toolbar {
    background: #16213e;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #0f3460;
}

.terminal-toolbar span {
    color: #a0a0b0;
    font-size: 0.875rem;
}

#terminal {
    height: calc(100vh - 146px);
    padding: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}



/* 链接 */
.link {
    color: #e94560;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.text-center {
    text-align: center;
    margin-top: 1rem;
}

/* 密码提示 */
.password-hint {
    font-size: 0.8rem;
    color: #a0a0b0;
    margin-top: 0.25rem;
}

/* 注册成功提示 */
.register-success {
    text-align: center;
    padding: 2rem;
}

.register-success h2 {
    color: #28a745;
    margin-bottom: 1rem;
}

/* 管理控制台 */
.admin-container {
    max-width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-title {
    color: #e94560;
    font-size: 1.75rem;
    margin-bottom: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

.admin-table th {
    color: #a0a0b0;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.05);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #0f3460;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #e0e0e0;
    margin-left: 0.5rem;
}

.badge-warning {
    background: #856404;
    color: #ffc107;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.action-cell {
    white-space: nowrap;
}

/* Email link in admin table */
.email-link {
    cursor: pointer;
    color: #e94560;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

/* Modal overlay */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #0f3460;
}

.modal-header h3 {
    color: #e94560;
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    color: #a0a0b0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #e94560;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #0f3460;
}

/* ===== System Banner / MOTD ===== */
.banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #16213e 0%, #1a1a3e 100%);
    border: 1px solid #0f3460;
    border-left: 4px solid #e94560;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.banner-ascii {
    flex-shrink: 0;
}

.banner-ascii pre {
    color: #e94560;
    font-size: 0.6rem;
    line-height: 1.05;
    font-family: 'Courier New', monospace;
    margin: 0;
}

/* "EasyLogic" hollow label above ECO block */
.easylogic-label {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: transparent;
    -webkit-text-stroke: 2px #e94560;
    text-stroke: 2px #e94560;
    margin-bottom: 2px;
    text-align: left;
}

/* "ECO" solid block container (3 pre side by side) */
.eco-container {
    display: flex;
    gap: 6px;
}

.eco-block {
    color: #e94560;
    font-size: 0.6rem;
    line-height: 1.05;
    font-family: 'Courier New', monospace;
    margin: 0;
}

/* Hollow title text */
.hollow-title {
    color: transparent;
    -webkit-text-stroke: 1px #e0e0e0;
    text-stroke: 1px #e0e0e0;
}

/* Solid title text */
.solid-title {
    color: #e94560;
    font-weight: bold;
}

.banner-info {
    flex: 1;
    min-width: 0;
}

.banner-title {
    color: #e0e0e0;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.banner-version {
    color: #a0a0b0;
    font-size: 0.85rem;
    font-weight: normal;
}

.banner-desc {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.banner-meta-item {
    color: #7a7a8a;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.banner-meta-item::before {
    content: '●';
    color: #28a745;
    margin-right: 0.4rem;
    font-size: 0.6rem;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .banner-ascii pre {
        font-size: 0.55rem;
    }
}

/* Welcome card extras */
.welcome-text {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.welcome-notice {
    background: rgba(233, 69, 96, 0.1);
    border-left: 3px solid #e94560;
    padding: 0.6rem 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #a0a0b0;
}

.welcome-notice strong {
    color: #e94560;
}

.welcome-tips {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #0f3460;
    color: #7a7a8a;
    font-size: 0.85rem;
}

.tip-icon {
    margin-right: 0.3rem;
}

/* Badge variants */
.badge-info {
    background: #0f3460;
    color: #a0a0b0;
}

/* Warning card (安全声明) */
.card-warning {
    border-color: #856404;
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a0e 100%);
}

.card-title-warning {
    color: #ffc107;
    border-bottom-color: #856404;
}

.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: #c0c0c0;
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(133, 100, 4, 0.2);
}

.warning-list li:last-child {
    border-bottom: none;
}

.warning-list li::before {
    content: '\2716';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-size: 0.8rem;
}

.warning-list li strong {
    color: #ffc107;
}

.warning-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(133, 100, 4, 0.3);
    color: #856404;
    font-size: 0.8rem;
    text-align: center;
}

/* ===== Audit Console ===== */
.audit-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.audit-filter-bar label {
    color: #a0a0b0;
    font-size: 0.875rem;
}

.audit-filter-bar select {
    padding: 0.4rem 0.75rem;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.875rem;
    cursor: pointer;
}

.audit-filter-bar select:focus {
    outline: none;
    border-color: #e94560;
}

.badge-action {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-register {
    background: rgba(30, 136, 229, 0.2);
    color: #1e88e5;
    border: 1px solid rgba(30, 136, 229, 0.3);
}

.badge-approve {
    background: rgba(67, 160, 71, 0.2);
    color: #43a047;
    border: 1px solid rgba(67, 160, 71, 0.3);
}

.badge-reject {
    background: rgba(229, 57, 53, 0.2);
    color: #e53935;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.badge-admin_add {
    background: rgba(117, 117, 117, 0.2);
    color: #bdbdbd;
    border: 1px solid rgba(117, 117, 117, 0.3);
}

.badge-terminal_open {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.badge-terminal_close {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge-idle_timeout {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-change_password {
    background: rgba(0, 150, 136, 0.2);
    color: #80cbc4;
    border: 1px solid rgba(0, 150, 136, 0.3);
}

.badge-login {
    background: rgba(33, 150, 243, 0.2);
    color: #90caf9;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge-logout {
    background: rgba(158, 158, 158, 0.2);
    color: #e0e0e0;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.badge-delete_user {
    background: rgba(244, 67, 54, 0.2);
    color: #ef9a9a;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.badge-system_cleanup {
    background: rgba(255, 87, 34, 0.2);
    color: #ffab91;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.audit-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #0f3460;
}

.audit-pagination .page-btn {
    padding: 0.35rem 0.75rem;
    background: #0f3460;
    border: 1px solid #1a4a80;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.audit-pagination .page-btn:hover:not(:disabled) {
    background: #1a4a80;
}

.audit-pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.audit-pagination .page-btn.active {
    background: #e94560;
    border-color: #e94560;
}

.audit-pagination .page-info {
    color: #a0a0b0;
    font-size: 0.8rem;
}

.audit-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}
