/* 公司管理后台样式 - 统一配色方案 */

@import url('./variables.css');

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dashboard 特定样式 - 导航栏调整 */
.dashboard-page .navbar {
    background: var(--primary-gradient);
    color: var(--text-white);
}

.dashboard-page .nav-logo {
    color: var(--text-white);
}

.dashboard-page .nav-menu a {
    color: rgba(255,255,255,0.9);
}

.dashboard-page .nav-menu a:hover {
    color: var(--text-white);
}

.dashboard-page .nav-cta {
    background: rgba(255,255,255,0.2);
    color: var(--text-white) !important;
}

.dashboard-page .nav-cta:hover {
    background: rgba(255,255,255,0.3);
    transform: none;
    box-shadow: none;
}

/* 主容器 */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* 标签页导航 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-light);
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    position: relative;
    top: 2px;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 标签页内容 */
.tab-content {
    display: none;
}

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

/* 卡片样式 */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--error-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* ========== 按钮样式 - 统一为login-button样式 ========== */
.btn {
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:active {
    background: #5568d3;
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background: #5568d3;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-edit:hover {
    background: #5568d3;
}

.btn-danger {
    background: var(--primary-color);
    color: white;
}

.btn-danger:hover {
    background: #5568d3;
}

.btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

table tr:hover {
    background: var(--bg-tertiary);
}

table .actions {
    white-space: nowrap;
}

table .btn {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-dark);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-dark);
}

/* 搜索和分页 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
}

.search-bar .btn {
    padding: 10px 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination .btn {
    padding: 8px 12px;
    min-width: 40px;
}

.pagination .btn.active {
    background: var(--primary-color);
    color: var(--text-white);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* 模态框 */
.modal {
    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: 1000;
    backdrop-filter: blur(2px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-normal);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* 消息提示 */
.message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-dark);
    border: 1px solid var(--success-color);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-dark);
    border: 1px solid var(--error-color);
}

.message.show {
    display: block;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 响应式 */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
}

/* ========== Staff Console Link 输入和按钮样式 ========== */
.staff-console-link-container {
    position: relative;
    margin-top: 10px;
}

.staff-console-link-input {
    width: 100%;
    padding: 12px 200px 12px 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #fff;
    border: 2px solid #2196f3;
    border-radius: 4px;
    color: #333;
}

.staff-console-link-button {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0 20px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
}

.staff-console-link-button-open {
    right: 100px;
    background: var(--primary-color);
    color: white;
    border-radius: 0;
    border-right: 1px solid #2196f3;
}

.staff-console-link-button-open:hover {
    background: #5568d3;
}

.staff-console-link-button-copy {
    right: 0;
    background: var(--primary-color);
    color: white;
    border-radius: 0 4px 4px 0;
}

.staff-console-link-button-copy:hover {
    background: #5568d3;
}

.staff-console-link-hint {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

/* ========== Copy Code按钮样式（绝对定位） ========== */
.copy-code-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 12px;
    font-size: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-code-button:hover {
    background: #5568d3;
}

