[v-cloak] {
    display: none;
}

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

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    --bg: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #22c55e;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.logo {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-light);
}

.logo h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h2::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 12px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(244,114,182,0.06));
    color: var(--primary);
    font-weight: 600;
}

.menu-item.active .icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-hover);
    transition: all 0.2s ease;
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ===== 搜索栏 ===== */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    opacity: 0.5;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-search {
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== 按钮 ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary span {
    font-size: 16px;
    font-weight: 400;
}

.btn-edit {
    padding: 6px 14px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-right: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-edit:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.btn-delete {
    padding: 6px 14px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-delete:hover {
    background: var(--danger-light);
    border-color: #fecaca;
}

.btn-page {
    padding: 8px 18px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.btn-page:hover:not(:disabled) {
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: var(--shadow);
}

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

.btn-cancel {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-submit {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ===== 表格 ===== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.tech-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.tech-table tbody td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.15s ease;
}

.tech-table tbody tr {
    transition: background 0.15s ease;
}

.tech-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.tech-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.page-info {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal h3 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 1024px) {
    .main-content {
        padding: 24px;
    }
}

/* ===== 响应式 - 手机 ===== */
@media (max-width: 768px) {
    /* 侧边栏改为底部导航 */
    .sidebar {
        width: 100%;
        height: auto;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-right: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        padding: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
        z-index: 200;
    }

    .logo {
        display: none;
    }

    .menu {
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 0;
        gap: 0;
        width: 100%;
    }

    .menu-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 0;
    }

    .menu-item.active {
        background: transparent;
    }

    .icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 80px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* 搜索栏 */
    .search-bar {
        flex-direction: column;
        gap: 10px;
    }

    .btn-search {
        width: 100%;
        text-align: center;
    }

    /* 表格横向滚动 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tech-table {
        min-width: 600px;
    }

    .tech-table thead th,
    .tech-table tbody td {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* 分页 */
    .pagination {
        gap: 10px;
    }

    .btn-page {
        padding: 8px 14px;
        font-size: 12px;
    }

    .page-info {
        font-size: 12px;
    }

    /* 模态框全屏 */
    .modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 24px 20px;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .modal h3 {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .modal-actions {
        margin-top: auto;
        padding-top: 20px;
    }

    .btn-cancel,
    .btn-submit {
        flex: 1;
        text-align: center;
    }
}

/* ===== 响应式 - 小屏手机 ===== */
@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-bottom: 76px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .btn-edit,
    .btn-delete {
        padding: 5px 10px;
        font-size: 12px;
    }

    .tech-table {
        min-width: 520px;
    }
}
