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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid #e8e8e8;
}

header h1 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-warning {
    background: #faad14;
    color: white;
}

.btn-warning:hover {
    background: #ffc53d;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
}

.btn-danger:hover {
    background: #ff7875;
}

.tabs-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f5f5f5;
    color: #1890ff;
}

.tab-btn.active {
    background: #1890ff;
    color: white;
}

.filter-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    border: 1px solid #e8e8e8;
}

.filter-section input,
.filter-section select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-section input:focus,
.filter-section select:focus {
    outline: none;
    border-color: #1890ff;
}

.filter-section select {
    cursor: pointer;
}

.records-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.record-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.record-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.record-card.closed {
    opacity: 0.6;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.record-info h3 {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.record-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 6px;
}

.record-meta {
    color: #999;
    font-size: 13px;
}

.editable-time {
    cursor: pointer;
    border-bottom: 1px dashed #1890ff;
    transition: all 0.2s;
}

.editable-time:hover {
    color: #1890ff;
}

.record-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.days-badge {
    padding: 6px 12px;
    background: #1890ff;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.flow-container {
    margin-top: 20px;
}

.flow-chart {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding: 16px 0;
}

.flow-node {
    min-width: 180px;
    padding: 16px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.flow-node:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.node-email,
.node-cardkey,
.node-status {
    font-size: 13px;
    margin-bottom: 6px;
    color: #666;
}

.node-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.flow-arrow {
    color: #ccc;
    font-size: 20px;
}

.add-node-btn {
    min-width: 48px;
    height: 48px;
    background: white;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-node-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.close {
    color: #999;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #333;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
}

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

.search-box {
    margin-bottom: 16px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.radio-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.radio-item:hover {
    background: #f5f5f5;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
}

.radio-item span {
    font-size: 14px;
    color: #333;
}

.radio-item.hidden {
    display: none;
}

.empty-hint {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

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