/* 无限广播电视总台综合管理终端 - Windows XP 2005风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Tahoma", "Microsoft YaHei", sans-serif;
    font-size: 12px;
    background: linear-gradient(180deg, #5a9fd4 0%, #306ba1 100%);
    min-height: 100vh;
    color: #000;
}

/* 水印样式 */
.watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.watermark {
    position: absolute;
    color: rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: bold;
    transform: rotate(-30deg);
    white-space: nowrap;
    user-select: none;
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
}

/* Windows XP 窗口样式 */
.window {
    background: #ece9d8;
    border: 1px solid #0054e3;
    border-radius: 8px 8px 0 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

.window-title {
    background: linear-gradient(180deg, #0a246a 0%, #0054e3 8%, #0054e3 40%, #0a246a 88%, #0a246a 100%);
    color: white;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 7px 7px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-title .title-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.window-title .title-icon {
    width: 16px;
    height: 16px;
}

.window-buttons {
    display: flex;
    gap: 2px;
}

.window-btn {
    width: 21px;
    height: 21px;
    border: 1px solid #fff;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-btn.minimize {
    background: linear-gradient(180deg, #3c8bdc 0%, #2a6cb8 100%);
    color: white;
}

.window-btn.close {
    background: linear-gradient(180deg, #dc6b4b 0%, #c85a3a 100%);
    color: white;
}

.window-content {
    padding: 15px;
    background: #f5f4ea;
    min-height: 200px;
}

/* 菜单栏 */
.menubar {
    background: #ece9d8;
    border-bottom: 1px solid #aca899;
    padding: 2px 5px;
    display: flex;
    gap: 5px;
}

.menu-item {
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 2px;
}

.menu-item:hover {
    background: #316ac5;
    color: white;
}

/* 侧边栏导航 */
.sidebar {
    width: 200px;
    background: linear-gradient(180deg, #7db3e0 0%, #5a9fd4 50%, #306ba1 100%);
    border-right: 2px solid #17478a;
    padding: 10px;
}

.sidebar-item {
    background: linear-gradient(180deg, #fff 0%, #e8e7dc 100%);
    border: 1px solid #aca899;
    border-radius: 3px;
    padding: 8px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.1s;
}

.sidebar-item:hover {
    background: linear-gradient(180deg, #e8f4fc 0%, #cce8fc 100%);
    border-color: #316ac5;
}

.sidebar-item.active {
    background: linear-gradient(180deg, #cce8fc 0%, #99d1f7 100%);
    border-color: #316ac5;
    font-weight: bold;
}

.sidebar-item .icon {
    width: 16px;
    height: 16px;
}

/* 3D按钮样式 */
.btn-3d {
    background: linear-gradient(180deg, #fff 0%, #e8e7dc 50%, #d4d0c8 100%);
    border: 1px solid #7b7b7b;
    border-radius: 3px;
    padding: 4px 15px;
    font-size: 11px;
    cursor: pointer;
    box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #404040;
    transition: all 0.1s;
}

.btn-3d:hover {
    background: linear-gradient(180deg, #e8f4fc 0%, #cce8fc 100%);
}

.btn-3d:active {
    box-shadow: inset 1px 1px 2px #404040;
    padding: 5px 14px 3px 16px;
}

.btn-3d.primary {
    background: linear-gradient(180deg, #5a9fd4 0%, #306ba1 100%);
    color: white;
    border-color: #17478a;
}

.btn-3d.primary:hover {
    background: linear-gradient(180deg, #6bb0e5 0%, #4080b2 100%);
}

.btn-3d.danger {
    background: linear-gradient(180deg, #dc6b4b 0%, #c85a3a 100%);
    color: white;
    border-color: #8b3a2a;
}

/* 输入框样式 */
.input-xp {
    background: white;
    border: 1px solid #7b9ebd;
    border-radius: 0;
    padding: 4px 6px;
    font-size: 11px;
    font-family: inherit;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
}

.input-xp:focus {
    outline: none;
    border-color: #316ac5;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1), 0 0 3px #316ac5;
}

textarea.input-xp {
    resize: vertical;
    min-height: 80px;
}

select.input-xp {
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23333" d="M0 0l5 6 5-6z"/></svg>') no-repeat right 5px center;
    background-size: 8px;
    padding-right: 20px;
    appearance: none;
    -webkit-appearance: none;
}

/* 表单组 */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #003399;
}

.form-group .input-xp {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 15px;
}

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

/* 表格样式 */
.table-xp {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #7b9ebd;
}

.table-xp th {
    background: linear-gradient(180deg, #f5f4ea 0%, #e8e7dc 100%);
    border: 1px solid #c5c5c5;
    padding: 6px 10px;
    text-align: left;
    font-size: 11px;
    color: #003399;
}

.table-xp td {
    border: 1px solid #e0e0e0;
    padding: 5px 10px;
    font-size: 11px;
}

.table-xp tr:nth-child(even) {
    background: #f9f8f3;
}

.table-xp tr:hover {
    background: #e8f4fc;
}

/* 分组框 */
.groupbox {
    border: 1px solid #0054e3;
    border-radius: 3px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f5f4ea;
}

.groupbox-title {
    background: #f5f4ea;
    color: #003399;
    font-weight: bold;
    padding: 0 5px;
    margin-top: -23px;
    margin-left: 10px;
    display: inline-block;
    font-size: 11px;
}

/* 标签页 */
.tab-container {
    background: #ece9d8;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid #aca899;
    padding-left: 5px;
}

.tab-btn {
    background: linear-gradient(180deg, #fff 0%, #e8e7dc 100%);
    border: 1px solid #aca899;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    padding: 5px 15px;
    margin-right: 2px;
    cursor: pointer;
    font-size: 11px;
    position: relative;
    top: 1px;
}

.tab-btn.active {
    background: #f5f4ea;
    border-bottom: 1px solid #f5f4ea;
    font-weight: bold;
}

.tab-content {
    background: #f5f4ea;
    border: 1px solid #aca899;
    border-top: none;
    padding: 15px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 复选框样式 */
.checkbox-xp {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
}

.checkbox-xp input[type="checkbox"] {
    width: 13px;
    height: 13px;
    accent-color: #0054e3;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.online { background: #00aa00; }
.status-indicator.offline { background: #cc0000; }
.status-indicator.warning { background: #ffaa00; }

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #ece9d8;
    border: 2px solid #0054e3;
    border-radius: 8px;
    min-width: 400px;
    max-width: 600px;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.4);
}

.modal-header {
    background: linear-gradient(180deg, #0a246a 0%, #0054e3 8%, #0054e3 40%, #0a246a 88%);
    color: white;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
    background: #f5f4ea;
}

.modal-footer {
    padding: 10px 20px;
    background: #ece9d8;
    border-top: 1px solid #aca899;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 消息提示 */
.alert {
    padding: 10px 15px;
    border-radius: 3px;
    margin-bottom: 10px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert.success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.alert.error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.alert.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert.info {
    background: #cce5ff;
    border: 1px solid #0066ff;
    color: #004085;
}

/* 布局 */
.layout {
    display: flex;
    gap: 0;
}

.layout-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.layout-main {
    flex: 1;
    min-width: 0;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    width: 380px;
}

.login-logo {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.login-logo h1 {
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 工具栏 */
.toolbar {
    background: linear-gradient(180deg, #f5f4ea 0%, #e8e7dc 100%);
    border-bottom: 1px solid #aca899;
    padding: 5px 10px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #aca899;
    margin: 0 5px;
}

/* 进度条 */
.progress-bar {
    background: #fff;
    border: 1px solid #7b9ebd;
    height: 18px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(180deg, #5a9fd4 0%, #306ba1 100%);
    transition: width 0.3s;
}

/* 消息数量徽章 */
.badge {
    background: #dc3545;
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* 头部信息栏 */
.header-info {
    background: linear-gradient(180deg, #0a246a 0%, #0054e3 100%);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info .logo {
    font-size: 16px;
    font-weight: bold;
}

.header-info .user-info {
    font-size: 11px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #0054e3;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }
    
    .layout-sidebar {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
}
