/* 
 * UI Framework CSS
 * 统一的UI组件样式库
 * Author: Nepton Liu (neptonliu@hotmail.com)
 * Date: 2025-01-27
 */

/* ========== 基础样式 ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ========== 按钮组件 ========== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    min-width: 120px;
    white-space: nowrap;
    box-sizing: border-box;
    height: 40px;
}

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

/* 主要按钮 */
.button.primary {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.button.primary:hover:not(:disabled) {
    background: #5a9bff;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.button.primary:active:not(:disabled) {
    background: #1557b0;
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.5);
}

/* 次要按钮 */
.button.secondary {
    background: white;
    color: #4285f4;
    border-color: #4285f4;
}

.button.secondary:hover:not(:disabled) {
    background: #e3f2fd;
    border-color: #2c5aa0;
    color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.button.secondary:active:not(:disabled) {
    background: #90caf9;
    border-color: #0d47a1;
    color: #0d47a1;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.5);
}

/* 危险按钮 */
.button.danger {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.button.danger:hover:not(:disabled) {
    background: #ff6659;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.button.danger:active:not(:disabled) {
    background: #b52d20;
    box-shadow: 0 6px 16px rgba(234, 67, 53, 0.5);
}

/* 成功按钮 */
.button.success {
    background: #34a853;
    color: white;
    border-color: #34a853;
}

.button.success:hover:not(:disabled) {
    background: #5cbf60;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
}

.button.success:active:not(:disabled) {
    background: #0d5016;
    box-shadow: 0 6px 16px rgba(52, 168, 83, 0.5);
}

/* 警告按钮 */
.button.warning {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.button.warning:hover:not(:disabled) {
    background: #f57c00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.button.warning:active:not(:disabled) {
    background: #e65100;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.6);
}

/* 按钮尺寸 */
.button.small {
    padding: 6px 16px;
    font-size: 12px;
    min-width: 80px;
}

.button.large {
    padding: 14px 28px;
    font-size: 16px;
    min-width: 160px;
}

/* 图标按钮 */
.button.icon {
    width: 40px;
    height: 40px;
    padding: 0;
    min-width: auto;
    border-radius: 6px;
}

.button.icon.primary {
    background: #4285f4;
    color: white;
    border: none;
}

.button.icon.primary:hover:not(:disabled) {
    background: #5a9bff;
}

.button.icon.primary:active:not(:disabled) {
    background: #1557b0;
}

.button.icon.secondary {
    background: white;
    color: #4285f4;
    border: 1px solid #4285f4;
}

.button.icon.secondary:hover:not(:disabled) {
    background: #e3f2fd;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

.button.icon.secondary:active:not(:disabled) {
    background: #90caf9;
    border-color: #0d47a1;
    color: #0d47a1;
}

.button.icon.danger {
    background: #ea4335;
    color: white;
    border: none;
}

.button.icon.danger:hover:not(:disabled) {
    background: #ff6659;
}

.button.icon.danger:active:not(:disabled) {
    background: #b52d20;
}

.button.icon.success {
    background: #34a853;
    color: white;
    border: none;
}

.button.icon.success:hover:not(:disabled) {
    background: #5cbf60;
}

.button.icon.success:active:not(:disabled) {
    background: #0d5016;
}

.button.icon.warning {
    background: #ff9800;
    color: white;
    border: none;
}

.button.icon.warning:hover:not(:disabled) {
    background: #f57c00;
}

.button.icon.warning:active:not(:disabled) {
    background: #e65100;
}

/* 图标按钮尺寸 */
.button.icon.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.button.icon.large {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

/* 圆形图标按钮 */
.button.icon.round {
    border-radius: 50%;
}

/* 按钮组 */
.button-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button-group .button {
    border-radius: 0;
    border-right: none;
}

.button-group .button:first-child {
    border-radius: 8px 0 0 8px;
}

.button-group .button:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid;
}

/* 全宽按钮 */
.button.block {
    width: 100%;
    display: flex;
}

/* 加载状态按钮 */
.button.loading {
    position: relative;
    color: transparent;
}

.button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

@keyframes button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 代码块组件 ========== */
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    color: #495057;
    overflow-x: auto;
    white-space: pre-wrap;
    line-height: 1.5;
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.code-block:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
}

/* 移除了演示按钮组件 - 已迁移到 demo.css */

/* 移除了返回按钮组件 - 已迁移到 demo.css */

/* 移除了页面布局组件 - 已迁移到 demo.css */

/* 移除了演示页面响应式样式 - 已迁移到 demo.css */

/* ========== 网格布局组件 ========== */
/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

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

/* 按钮组 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
}

.button-group.vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.button-group.vertical .button {
    width: 100%;
    margin-bottom: 0;
}

.button-group.compact {
    gap: 8px;
}

.button-group.vertical {
    flex-direction: column;
    align-items: stretch;
}

.button-group.center {
    justify-content: center;
}

.button-group.right {
    justify-content: flex-end;
}

/* 响应式网格 */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .button-group {
        gap: 8px;
    }

    .button-group.vertical {
        gap: 12px;
    }
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: #ea4335;
    margin-left: 2px;
}

.form-label.optional::after {
    content: ' (可选)';
    color: #666;
    font-weight: 400;
    font-size: 12px;
}

.form-input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    height: 40px;
}

/* 文本域特殊处理 */
.form-input[type="textarea"],
textarea.form-input {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* 表单状态 */
.form-input.error {
    border-color: #ea4335;
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.1);
}

.form-input.success {
    border-color: #34a853;
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.1);
}

.error-message {
    color: #ea4335;
    font-size: 12px;
    margin-top: 4px;
}

.success-message {
    color: #34a853;
    font-size: 12px;
    margin-top: 4px;
}

/* 文本域 */
.form-textarea {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* 选择框 */
.form-select {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* 复选框 */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.form-checkbox input[type="checkbox"]:checked {
    background: #4285f4;
    border-color: #4285f4;
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 单选框 */
.form-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.form-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.form-radio input[type="radio"]:checked {
    border-color: #4285f4;
}

.form-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4285f4;
}

/* 开关控件 */
.form-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
}

.switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.3s ease;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch input:checked + .switch-slider {
    background: #4285f4;
}

.form-switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.form-switch input:disabled + .switch-slider {
    background: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

.form-switch input:disabled + .switch-slider::before {
    background: #adb5bd;
}

.form-switch input:disabled:checked + .switch-slider {
    background: #6c757d;
}

.form-switch input:disabled:checked + .switch-slider::before {
    background: #dee2e6;
}

.form-switch:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-switch input {
    display: none;
}

/* 输入组合 */
.input-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-addon {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 16px;
    font-size: 14px;
    color: #6c757d;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    border-radius: 0;
    border-left: none;
    margin: 0;
}

.input-group .input-addon:first-child {
    border-right: none;
}

.input-group .input-addon:last-child {
    border-left: none;
}

/* 输入框与按钮组合 */
.input-button-group {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-button-group .form-input {
    border-radius: 8px 0 0 8px;
    border-right: none;
    flex: 1;
    margin: 0;
}

.input-button-group .form-input:focus {
    z-index: 1;
    position: relative;
    border-right: none;
}

.input-button-group .button {
    border-radius: 0 8px 8px 0;
    min-width: 100px;
    border-left: none;
}

/* 表单布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

/* ========== 模态框组件 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal.small {
    max-width: 400px;
}

.modal.large {
    max-width: 800px;
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e9ecef;
    min-height: 56px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    padding-right: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px;
    min-height: 80px;
}

.modal-body p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #666;
    font-size: 14px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
    min-height: 56px;
    align-items: center;
}

/* ========== 通知组件 ========== */
.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left-color: #34a853;
    background: #f0f9f4;
}

.notification.error {
    border-left-color: #ea4335;
    background: #fef2f2;
}

.notification.warning {
    border-left-color: #fbbc04;
    background: #fffbeb;
}

.notification.info {
    border-left-color: #4285f4;
    background: #f0f7ff;
}

.notification-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: #34a853;
}

.notification.error .notification-icon {
    color: #ea4335;
}

.notification.warning .notification-icon {
    color: #fbbc04;
}

.notification.info .notification-icon {
    color: #4285f4;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.notification-message {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
    position: absolute;
    top: 12px;
    right: 12px;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 通知容器 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
    width: auto;
    min-width: 300px;
}

/* ========== 标签页组件 ========== */
.tabs {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #4285f4;
    border-bottom-color: #4285f4;
}

.tab-content-wrapper {
    position: relative;
}

.tab-content {
    padding: 24px;
    display: none;
}

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

/* 卡片式标签页 */
.tabs.card-style .tab-nav {
    background: white;
    border-bottom: none;
    padding: 0;
}

.tabs.card-style .tab-button {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    background: #f8f9fa;
}

.tabs.card-style .tab-button.active {
    background: #4285f4;
    color: white;
}

.tabs.card-style .tab-button:hover {
    background: #e3f2fd;
}

.tabs.card-style .tab-button.active:hover {
    background: #4285f4;
}

/* 垂直标签页 */
.tabs.vertical {
    display: flex;
    max-width: 800px;
}

.tabs.vertical .tab-nav {
    flex-direction: column;
    width: 200px;
    background: #f8f9fa;
    border-bottom: none;
    border-right: 1px solid #e9ecef;
}

.tabs.vertical .tab-button {
    text-align: left;
    border-bottom: none;
    border-right: 3px solid transparent;
}

.tabs.vertical .tab-button.active {
    background: white;
    border-right-color: #4285f4;
}

.tabs.vertical .tab-content-wrapper {
    flex: 1;
}

/* ========== 布局组件 ========== */
/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 576px;
}

.container-md {
    max-width: 768px;
}

.container-lg {
    max-width: 992px;
}

.container-xl {
    max-width: 1200px;
}

/* 网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Flexbox 工具类 */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-stretch { align-items: stretch; }

/* 间距工具类 */
.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }
.m-5 { margin: 20px; }
.m-6 { margin: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tabs.vertical {
        flex-direction: column;
    }

    .tabs.vertical .tab-nav {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .tabs.vertical .tab-button {
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    .tabs.vertical .tab-button.active {
        border-right: none;
        border-bottom-color: #4285f4;
    }

    .modal {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
        min-width: auto;
    }
}

/* ========== 输入框组合组件 ========== */
/* 输入框组 */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-group .form-input {
    border-radius: 0;
    border-right: none;
    flex: 1;
    margin: 0;
    box-shadow: none;
}

.input-group .form-input:first-child {
    border-radius: 8px 0 0 8px;
}

.input-group .form-input:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid #ddd;
}

.input-group .form-input:only-child {
    border-radius: 8px;
    border-right: 1px solid #ddd;
}

.input-group .form-input:focus {
    z-index: 1;
    position: relative;
    border-right: 1px solid #4285f4;
}

/* 输入框附加内容 */
.input-addon {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

.input-addon:first-child {
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.input-addon:last-child {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* 移除重复的输入框与按钮组合定义 */

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.three-columns {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-row.four-columns {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* 表单操作区 */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.form-actions.center {
    justify-content: center;
}

.form-actions.right {
    justify-content: flex-end;
}

.form-actions.space-between {
    justify-content: space-between;
}

/* 完整表单样式 */
.complete-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-bottom: 32px;
}

/* 响应式表单 */
@media (max-width: 768px) {
    .input-button-group {
        flex-direction: column;
        border-radius: 8px;
    }

    .input-button-group .form-input {
        border-radius: 8px 8px 0 0;
        border-right: 1px solid #ddd;
        border-bottom: none;
    }

    .input-button-group .button {
        border-radius: 0 0 8px 8px;
        border-left: 1px solid #ddd;
        border-top: none;
    }

    .form-row,
    .form-row.three-columns,
    .form-row.four-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .complete-form {
        padding: 24px 20px;
    }
}

/* ========== 数据展示组件 ========== */
/* 表格组件 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.table td {
    color: #666;
    font-size: 14px;
}

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

.table.striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.table.hover tbody tr:hover {
    background: #f1f3f4;
}

/* 卡片组件 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* 徽章组件 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.primary {
    background: #e3f2fd;
    color: #1976d2;
}

.badge.secondary {
    background: #f5f5f5;
    color: #666;
}

.badge.success {
    background: #e8f5e8;
    color: #2e7d32;
}

.badge.danger {
    background: #ffebee;
    color: #c62828;
}

.badge.warning {
    background: #fff3e0;
    color: #f57c00;
}

.badge.info {
    background: #e1f5fe;
    color: #0288d1;
}

/* 进度条组件 */
.progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: #4285f4;
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar.success {
    background: #34a853;
}

.progress-bar.warning {
    background: #ff9800;
}

.progress-bar.danger {
    background: #ea4335;
}

.progress.large {
    height: 12px;
}

.progress.small {
    height: 4px;
}

/* ========== 反馈组件 ========== */
/* 加载组件 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.large {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton.text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton.title {
    height: 24px;
    margin-bottom: 16px;
}

.skeleton.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton.button {
    height: 36px;
    width: 100px;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* 弹出框 */
.popover {
    position: absolute;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    max-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popover.show {
    opacity: 1;
    visibility: visible;
}

.popover-header {
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.popover-body {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ========== 导航组件 ========== */
/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: #4285f4;
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #ccc;
    margin: 0 4px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    margin: 20px 0;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.pagination-item:hover {
    border-color: #4285f4;
    color: #4285f4;
    background: #f8f9ff;
}

.pagination-item.active {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    border-color: #4285f4;
    background: #f8f9ff;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #4285f4;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

/* ========== 输入增强组件 ========== */
/* 文件上传 */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #4285f4;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #4285f4;
    background: #f0f7ff;
}

.file-upload-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.file-upload-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 8px;
}

.file-upload-hint {
    color: #999;
    font-size: 12px;
}

/* 标签输入 */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    min-height: 40px;
    align-items: center;
}

.tag-input:focus-within {
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.tag-remove {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-input input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
    padding: 4px;
    font-size: 14px;
}

/* 搜索框 */
.search-box {
    position: relative;
    display: inline-block;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-box:hover .search-clear {
    opacity: 1;
}

/* 评分组件 */
.rating {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.rating-star {
    font-size: 20px;
    color: #e9ecef;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rating-star.active {
    color: #ffc107;
}

.rating-star:hover {
    color: #ffc107;
}
